diff --git a/src/chart-addons/stacked-legend.js b/src/chart-addons/stacked-legend.js index 14f65dbf4..5bc707abe 100644 --- a/src/chart-addons/stacked-legend.js +++ b/src/chart-addons/stacked-legend.js @@ -260,7 +260,7 @@ export async function getLegendStateFromChart(chart, useMap, selectedLayer) { version: 2.0 } } else { - // TODO(croot): this can be removed once all raster layer types are + // TODO: this can be removed once all raster layer types are // transitioned to the getPrimaryColorScaleName/getLegendDefinitionForProperty // form above const layerState = layer.getState() @@ -845,7 +845,7 @@ function legendState_v2(state, useMap) { return {} } const min_size = Math.min(domain.length, range.length) - // TODO(croot): may want to consider filling out the auto-gradient here + // TODO: may want to consider filling out the auto-gradient here // using a max-number of stops. The best way to do this will most likely // be to create a d3 scale of similar type, and generate new ranges from // it at auto-gradient stops. Unforunately the legendables library will only diff --git a/src/charts/geo-choropleth-chart.js b/src/charts/geo-choropleth-chart.js index 64a5c9748..24d4ad7c8 100644 --- a/src/charts/geo-choropleth-chart.js +++ b/src/charts/geo-choropleth-chart.js @@ -197,7 +197,7 @@ export default function geoChoroplethChart(parent, useMap, chartGroup, mapbox) { /* OVERRIDE EXTEND ----------------------------------------------------------*/ function accentPoly(label) { - const layerNameClass = geoJson(0).name // hack for now as we only allow one layer currently + const layerNameClass = geoJson(0).name // Currently limited to single layer support _chart.selectAll("g." + layerNameClass).each(function(d) { if (getKey(0, d) == label) { _chart.accentSelected(this) @@ -206,7 +206,7 @@ export default function geoChoroplethChart(parent, useMap, chartGroup, mapbox) { } function unAccentPoly(label) { - const layerNameClass = geoJson(0).name // hack for now as we only allow one layer currently + const layerNameClass = geoJson(0).name // Currently limited to single layer support _chart.selectAll("g." + layerNameClass).each(function(d) { if (getKey(0, d) == label) { _chart.unAccentSelected(this) diff --git a/src/charts/heatmap.js b/src/charts/heatmap.js index 3ce75cf4c..d3af4484f 100644 --- a/src/charts/heatmap.js +++ b/src/charts/heatmap.js @@ -47,7 +47,6 @@ export function heatMapKeyAccessor({ key0 }) { } } -// TODO - remove me. Trying to get TravisCI to work export const heatMapKeyAccessorNoFormat = function({ key0 }, forceMax = false) { if (Array.isArray(key0)) { const keyIndex = forceMax && key0[1] ? 1 : 0 diff --git a/src/charts/raster-chart.js b/src/charts/raster-chart.js index 3ead9d3bd..aac3cde47 100644 --- a/src/charts/raster-chart.js +++ b/src/charts/raster-chart.js @@ -235,7 +235,7 @@ export default function rasterChart(parent, useMap, chartGroup, _mapboxgl) { } if ( - // pointmap prioritized color hack + // Special handling for pointmap prioritized color rendering layer.getState().mark === "point" && layerName !== "backendScatter" && layer.getState().encoding.color.prioritizedColor && @@ -379,7 +379,7 @@ export default function rasterChart(parent, useMap, chartGroup, _mapboxgl) { return _chart } - // TODO(croot): pixel ratio should probably be configured on the backend + // TODO: pixel ratio should probably be configured on the backend // rather than here to deal with scenarios where data is used directly // in pixel-space. _chart.usePixelRatio = function(usePixelRatio) { @@ -568,7 +568,7 @@ export default function rasterChart(parent, useMap, chartGroup, _mapboxgl) { } // if _chart.useLonLat() is not true, the chart bounds have already been projected into mercator space - // TODO(adb): could probably collape this into line 353 + // TODO: could probably collape this into line 353 if ( _useGeoTypes && typeof _chart.useLonLat === "function" && @@ -800,7 +800,7 @@ export default function rasterChart(parent, useMap, chartGroup, _mapboxgl) { const vega_metadata = JSON.parse(data.vega_metadata) for (const layerName in _layerNames) { if (typeof _layerNames[layerName]._updateFromMetadata === "function") { - // TODO(croot): I don't understand this logic. Why would the selectedLayer + // TODO: I don't understand this logic. Why would the selectedLayer // be set only on the existence of the _updateFromMetadata() method? // My guess is that it's an attempt to get the last layer, but there are // so many better ways to get at that. @@ -931,7 +931,7 @@ export default function rasterChart(parent, useMap, chartGroup, _mapboxgl) { _chart.measureValue = function(value, key) { const customFormatter = _chart.valueFormatter() - // hack to undo the popup concatenation like "AVG(arrdelay)" + // Parse aggregation function from popup key format (e.g., "AVG(arrdelay)") let keyTrimmed = null if (key) { keyTrimmed = key.replace(/.*\((.*)\).*/, "$1") @@ -981,7 +981,7 @@ export default function rasterChart(parent, useMap, chartGroup, _mapboxgl) { const layerName = _layers[i] const layer = _layerNames[layerName] if (layer) { - // TODO(croot): can this be improved? I presume only + // TODO: can this be improved? I presume only // one popup can be shown at a time if (animate) { layer.hidePopup(_chart, () => { @@ -1078,7 +1078,7 @@ function checkMultiYScaleLayers(chart, scales) { mesh2dLayer.length > 0 ) { // ensure the domain of the y scale is the range set from the mesh2d yDim - // TODO(C): need to check how multi 2-D CS's are handled to tell if this is the + // TODO: need to check how multi 2-D CS's are handled to tell if this is the // correct approach for setting the y domain or not scales[1].domain = mesh2dLayer[0].yDim().getFilter()[0] // add a new y scale for the terrain layer, updating the name in the layer and setting @@ -1128,7 +1128,7 @@ function genLayeredVega(chart) { nullValue: -100 } ] - // TODO(matzy): This can probably be cleaned up now that chart.y2() exists + // TODO: This can probably be cleaned up now that chart.y2() exists checkMultiYScaleLayers(chart, scales) // NOTE(adb): When geo types are enabled, vega spatial projections are applied and the scales for the x and y properties are not being used. However, we still need the legacy scaling terms to properly size poly popups on hover, which is why _xLatLngBnds, etc are separate scales diff --git a/src/charts/row-chart.js b/src/charts/row-chart.js index b60a4150d..ea303350c 100644 --- a/src/charts/row-chart.js +++ b/src/charts/row-chart.js @@ -134,7 +134,7 @@ export default function rowChart(parent, chartGroup) { const key = _chart.getMeasureName() // We have no good way of knowing if the valueFormatter has a formatter for the X axis in // particular, since that code is a black box. So we run through a test value and if it returns - // `null`, we know it doesn't know how to format it. It's dumb, but it works. + // `null`, we know it doesn't know how to format it. const validFormatting = numberFormatter && numberFormatter(0, key) !== null if (validFormatting) { xFormatCache.setTickFormat(d => numberFormatter(d, key)) diff --git a/src/core/core.js b/src/core/core.js index 6ef4464ca..31d0c3640 100644 --- a/src/core/core.js +++ b/src/core/core.js @@ -226,7 +226,7 @@ export function transition(selections, duration, callback, name) { return s } -/* somewhat silly, but to avoid duplicating logic */ +/* to avoid duplicating logic */ export function optionalTransition(enable, duration, callback, name) { if (enable) { return function(selection) { diff --git a/src/mixins/coordinate-grid-raster-mixin.js b/src/mixins/coordinate-grid-raster-mixin.js index 4cb0a020e..e56f52352 100644 --- a/src/mixins/coordinate-grid-raster-mixin.js +++ b/src/mixins/coordinate-grid-raster-mixin.js @@ -202,7 +202,7 @@ export default function coordinateGridRasterMixin (_chart, _mapboxgl, browser) { return _maxBounds } - // TODO(croot): verify max bounds? + // TODO: verify max bounds? if (!(maxBounds instanceof Array) || maxBounds.length !== 2 || !(maxBounds[0] instanceof Array) || maxBounds[0].length !== 2 || !(maxBounds[1] instanceof Array) || maxBounds[1].length !== 2) { throw new Error("Invalid bounds argument. A bounds object should be: [[xmin, ymin], [xmax, ymax]]") } @@ -707,7 +707,7 @@ export default function coordinateGridRasterMixin (_chart, _mapboxgl, browser) { if (prevWidth !== _chartBody.style("width") || prevHeight !== _chartBody.style("height")) { - // TODO(croot): What about when the margins change? + // TODO: What about when the margins change? // That's not truly a resize event _chart.map().fire("resize", { width, @@ -879,7 +879,7 @@ export default function coordinateGridRasterMixin (_chart, _mapboxgl, browser) { } _lastXDomain = xdom - // TODO(croot): support ordinal scales? + // TODO: support ordinal scales? // If BE supports ordinal scales for X axis, use // rangeBands here: i.e. x.rangeBands([0, _chart.xAxisLength()], ...) @@ -1077,7 +1077,7 @@ export default function coordinateGridRasterMixin (_chart, _mapboxgl, browser) { } if (text !== "") { - // TODO(croot): should add the rotation and labelXPosition here + // TODO: should add the rotation and labelXPosition here // As of now (09/02/2016) the chart.css is breaking this. if (axisClass === "y2") { diff --git a/src/mixins/dc-legend-mixin.js b/src/mixins/dc-legend-mixin.js index 0a051a685..809ed215d 100644 --- a/src/mixins/dc-legend-mixin.js +++ b/src/mixins/dc-legend-mixin.js @@ -72,7 +72,7 @@ export default function legendMixin(legend) { const bodyNode = body.node() if (bodyNode) { - // fix for #4196#issuecomment-376704328 + // Preserve scroll position when legend is redrawn (dc.js issue #4196) bodyNode.scrollTop = legend._scrollPos } } diff --git a/src/mixins/lock-axis-mixin.js b/src/mixins/lock-axis-mixin.js index 9e38a90fe..5470c5f78 100644 --- a/src/mixins/lock-axis-mixin.js +++ b/src/mixins/lock-axis-mixin.js @@ -264,8 +264,8 @@ export default function lockAxisMixin(chart) { .domain() .slice() - // Horrible hack to ensure the inputs aren't inverted from whatever order - // the Y axis decides to display. Mea culpa. + // Ensure the inputs aren't inverted from whatever order + // the Y axis decides to display. let shouldFlipYMinMax = false const isHeatY = chart.isHeatMap && type === "y" if (isHeatY) { diff --git a/src/mixins/map-mixin.js b/src/mixins/map-mixin.js index 6dac3d5c8..019e57a4a 100644 --- a/src/mixins/map-mixin.js +++ b/src/mixins/map-mixin.js @@ -696,7 +696,7 @@ export default function mapMixin( coordinates: boundsToUse }) } else { - // for some reason, the source is lost some of the time, so adding it again FE-9833 + // for some reason, the source is lost some of the time, so adding it again setSourceAndAddLayer(overlayName) } } @@ -826,7 +826,6 @@ export default function mapMixin( _lastWidth = width _lastHeight = height - // this is a dumb hack, but it works and there doesn't seem to be another sensible way. // problem is, mapbox looks to the size of "mapboxgl-canvas-container" to determine the // render size of the canvas, regardless of what we feed it above. if there is an overlay // drawer open, even if it sits at a higher z-index, the canvas size will be calculated diff --git a/src/mixins/raster-draw-mixin.js b/src/mixins/raster-draw-mixin.js index 3ec0a72f3..3b3b25b67 100644 --- a/src/mixins/raster-draw-mixin.js +++ b/src/mixins/raster-draw-mixin.js @@ -514,7 +514,7 @@ export function rasterDrawMixin(chart) { chart.addDrawControl = (lassoToolSetTypes = LassoToolSetTypes.kStandard) => { if (drawEngine) { - // TODO(croot): if the requested tool set types are different, + // TODO: if the requested tool set types are different, // should we update the button group controller here? return chart } diff --git a/src/mixins/raster-layer-cross-section-terrain-mixin.js b/src/mixins/raster-layer-cross-section-terrain-mixin.js index 99bb96ca7..6ffae4fe4 100644 --- a/src/mixins/raster-layer-cross-section-terrain-mixin.js +++ b/src/mixins/raster-layer-cross-section-terrain-mixin.js @@ -281,13 +281,13 @@ export default function rasterLayerCrossSectionTerrainMixin(_layer) { _layer._addRenderAttrsToPopupColumnSet = function(chart, popupColumnsSet) { // currently no-op // eslint-disable-next-line no-warning-comments - // TODO(croot): needs to be filled in to support mesh2d hit-testing + // TODO: needs to be filled in to support mesh2d hit-testing } // eslint-disable-next-line no-unused-vars _layer._areResultsValidForPopup = function(results) { // eslint-disable-next-line no-warning-comments - // TODO(croot): needs to be filled in to support mesh2d hit-testing + // TODO: needs to be filled in to support mesh2d hit-testing return true } @@ -295,7 +295,7 @@ export default function rasterLayerCrossSectionTerrainMixin(_layer) { _layer._displayPopup = function(svgProps) { // currently a no-op // eslint-disable-next-line no-warning-comments - // TODO(croot): needs to be filled in to support mesh2d hit-testing + // TODO: needs to be filled in to support mesh2d hit-testing return AABox2d.create() } @@ -303,7 +303,7 @@ export default function rasterLayerCrossSectionTerrainMixin(_layer) { _layer._hidePopup = function(chart, hideCallback) { // currently a no-op // eslint-disable-next-line no-warning-comments - // TODO(croot): needs to be filled in to support mesh2d hit-testing + // TODO: needs to be filled in to support mesh2d hit-testing } _layer._destroyLayer = function() { diff --git a/src/mixins/raster-layer-mesh2d-mixin.js b/src/mixins/raster-layer-mesh2d-mixin.js index 2805f6383..aa33931c9 100644 --- a/src/mixins/raster-layer-mesh2d-mixin.js +++ b/src/mixins/raster-layer-mesh2d-mixin.js @@ -20,7 +20,7 @@ import VegaPropertyOutputState from "./render-vega-lite/VegaPropertyOutputState" import { LEGEND_POSITIONS } from "../chart-addons/stacked-legend" // eslint-disable-next-line no-warning-comments -// TODO(croot): this seems like it is used in at least one other layer mixin. Make into a utility somewhere +// TODO: this seems like it is used in at least one other layer mixin. Make into a utility somewhere function create_post_filter_transform(post_filters) { const post_filter = post_filters && Array.isArray(post_filters) ? post_filters[0] : null // may change to map when we have more than one postFilter @@ -260,13 +260,13 @@ export default function rasterLayerMesh2dMixin(_layer) { _layer._addRenderAttrsToPopupColumnSet = function(chart, popupColumnsSet) { // currently no-op // eslint-disable-next-line no-warning-comments - // TODO(croot): needs to be filled in to support mesh2d hit-testing + // TODO: needs to be filled in to support mesh2d hit-testing } // eslint-disable-next-line no-unused-vars _layer._areResultsValidForPopup = function(results) { // eslint-disable-next-line no-warning-comments - // TODO(croot): needs to be filled in to support mesh2d hit-testing + // TODO: needs to be filled in to support mesh2d hit-testing return true } @@ -274,7 +274,7 @@ export default function rasterLayerMesh2dMixin(_layer) { _layer._displayPopup = function(svgProps) { // currently a no-op // eslint-disable-next-line no-warning-comments - // TODO(croot): needs to be filled in to support mesh2d hit-testing + // TODO: needs to be filled in to support mesh2d hit-testing return AABox2d.create() } @@ -282,7 +282,7 @@ export default function rasterLayerMesh2dMixin(_layer) { _layer._hidePopup = function(chart, hideCallback) { // currently a no-op // eslint-disable-next-line no-warning-comments - // TODO(croot): needs to be filled in to support mesh2d hit-testing + // TODO: needs to be filled in to support mesh2d hit-testing } _layer._destroyLayer = function() { diff --git a/src/mixins/raster-layer-point-mixin.js b/src/mixins/raster-layer-point-mixin.js index e0858b2e5..a34c14995 100644 --- a/src/mixins/raster-layer-point-mixin.js +++ b/src/mixins/raster-layer-point-mixin.js @@ -239,7 +239,6 @@ export default function rasterLayerPointMixin(_layer) { as: alias, // For some reason, we're receiving duplicate tables here, causing headaches w/ export SQL generation // in heavyai-data-layer2. So, just gonna filter them out. - // https://heavyai.atlassian.net/browse/FE-14213 groupby: [...new Set(transform.groupby)].map((g, i) => ({ type: "project", expr: `${isDataExport && i === 0 ? "/*+ cpu_mode */ " : ""}${g}`, @@ -701,7 +700,7 @@ export default function rasterLayerPointMixin(_layer) { } _layer._genVega = function(chart, layerName, group, query) { - // Pointmap prioritized color hack. Need to use the real layer name for crossfilter + // Pointmap prioritized color handling: use the actual layer name for crossfilter operations let realLayerName = layerName if ( layerName && diff --git a/src/mixins/raster-layer-poly-mixin.js b/src/mixins/raster-layer-poly-mixin.js index 8a8145c3f..4d3b30d72 100644 --- a/src/mixins/raster-layer-poly-mixin.js +++ b/src/mixins/raster-layer-poly-mixin.js @@ -824,7 +824,7 @@ export default function rasterLayerPolyMixin(_layer) { (i !== _layer.dimension().getDimensionIndex() && f !== "" && f !== null && - // Kinda hacky, we don't want to include rowId filter in vega query, but we want everything else + // Exclude rowId filter from vega query while including all other filters !f.includes("rowid")) ) @@ -966,7 +966,7 @@ export default function rasterLayerPolyMixin(_layer) { return __displayPopup({ ...svgProps, _vega, _layer, state }) } - // We disabled polygon selection filter from Master layer if the chart has more than one poly layer in 4.7 release, FE-8685. + // We disabled polygon selection filter from Master layer if the chart has more than one poly layer in 4.7 release. // Since we run rowid filter on poly selection filter, it is not correct to run same rowid filter for all overlapping poly layers. // We need better UI/UX design for this function chartHasMoreThanOnePolyLayers(chart) { @@ -985,7 +985,7 @@ export default function rasterLayerPolyMixin(_layer) { chartHasMoreThanOnePolyLayers(chart)) || !_onClickFiltering ) { - // don't filter from Master, FE-8685 + // don't filter from Master return } const isInverseFilter = Boolean(event && (event.metaKey || event.ctrlKey)) diff --git a/src/mixins/raster-layer-windbarb-mixin.js b/src/mixins/raster-layer-windbarb-mixin.js index d75fcf900..dd93aae6f 100644 --- a/src/mixins/raster-layer-windbarb-mixin.js +++ b/src/mixins/raster-layer-windbarb-mixin.js @@ -114,7 +114,6 @@ export default function rasterLayerWindBarbMixin(_layer) { as: alias, // For some reason, we're receiving duplicate tables here, causing headaches w/ export SQL generation // in heavyai-data-layer2. So, just gonna filter them out. - // https://heavyai.atlassian.net/browse/FE-14213 groupby: [...new Set(transform.groupby)].map((g, i) => ({ type: "project", expr: `${isDataExport && i === 0 ? "/*+ cpu_mode */ " : ""}${g}`, @@ -213,7 +212,7 @@ export default function rasterLayerWindBarbMixin(_layer) { prop_descriptors.set("y", new PositionChannelDescriptor("y")) // eslint-disable-next-line no-warning-comments - // TODO(croot): support geo columns + // TODO: support geo columns // prop_descriptors.set( // "longitude", // new GeographicChannelDescriptor("longitude", "x") @@ -378,26 +377,26 @@ export default function rasterLayerWindBarbMixin(_layer) { _layer._addRenderAttrsToPopupColumnSet = function(chart, popupColumnsSet) { // currently no-op // eslint-disable-next-line no-warning-comments - // TODO(croot): needs to be filled in to support windbarb hit-testing + // TODO: needs to be filled in to support windbarb hit-testing } _layer._areResultsValidForPopup = function(results) { // eslint-disable-next-line no-warning-comments - // TODO(croot): needs to be filled in to support windbarb hit-testing + // TODO: needs to be filled in to support windbarb hit-testing return true } _layer._displayPopup = function(svgProps) { // currently a no-op // eslint-disable-next-line no-warning-comments - // TODO(croot): needs to be filled in to support windbarb hit-testing + // TODO: needs to be filled in to support windbarb hit-testing return AABox2d.create() } _layer._hidePopup = function(chart, hideCallback) { // currently a no-op // eslint-disable-next-line no-warning-comments - // TODO(croot): needs to be filled in to support windbarb hit-testing + // TODO: needs to be filled in to support windbarb hit-testing } _layer._destroyLayer = function() { diff --git a/src/mixins/raster-layer.js b/src/mixins/raster-layer.js index 340d787a1..16d1c50a7 100644 --- a/src/mixins/raster-layer.js +++ b/src/mixins/raster-layer.js @@ -65,7 +65,7 @@ export default function rasterLayer(layerType) { } }) - _layer.othersGrouper(false) // TODO(croot): what does othersGrouper in capMixin do exactly? + _layer.othersGrouper(false) // TODO: what does othersGrouper in capMixin do exactly? // Always set to false for now, tho user can override. if (layerType === "points") { @@ -286,13 +286,13 @@ export default function rasterLayer(layerType) { } function addPopupColumnToSet(colAttr, popupColSet) { - // TODO(croot): getProjectOn for groups requires the two arguments, + // TODO: getProjectOn for groups requires the two arguments, // dimension.getProjectOn() doesn't have any args. // Need to come up with a better API for group.getProjectOn() // and improve the api so that "as key0" are not automatically // added to those projection statements. - // TODO(croot): performance could be improved here with a better + // TODO: performance could be improved here with a better // data structure, but probably not an issue given the amount // of popup col attrs to iterate through is small const dim = _layer.group() || _layer.dimension() @@ -644,7 +644,7 @@ export default function rasterLayer(layerType) { const overlapSz = AABox2d.getSize(Point2d.create(), overlapBounds) const overlapCtr = AABox2d.getCenter(Point2d.create(), overlapBounds) - const padding = 6 // in pixels TODO(croot): expose in css? + const padding = 6 // in pixels TODO: expose in css? let topOffset = 0 const popupDiv = parentElem diff --git a/src/mixins/render-vega-lite/Definitions/Encoding/Scale/Continuous/ContinuousScale.js b/src/mixins/render-vega-lite/Definitions/Encoding/Scale/Continuous/ContinuousScale.js index 18b7d6d8e..208aa9105 100644 --- a/src/mixins/render-vega-lite/Definitions/Encoding/Scale/Continuous/ContinuousScale.js +++ b/src/mixins/render-vega-lite/Definitions/Encoding/Scale/Continuous/ContinuousScale.js @@ -283,7 +283,7 @@ export default class ContinuousScale extends ScaleDefinitionObject { // density accumulation will force on clamp // eslint-disable-next-line no-warning-comments - // TODO(croot): is this too heavy handed? + // TODO: is this too heavy handed? vega_scale_object.clamp = true } } diff --git a/src/mixins/render-vega-lite/Definitions/Encoding/Scale/Discrete/DiscreteScale.js b/src/mixins/render-vega-lite/Definitions/Encoding/Scale/Discrete/DiscreteScale.js index e56b07931..979765476 100644 --- a/src/mixins/render-vega-lite/Definitions/Encoding/Scale/Discrete/DiscreteScale.js +++ b/src/mixins/render-vega-lite/Definitions/Encoding/Scale/Discrete/DiscreteScale.js @@ -146,7 +146,7 @@ export default class DiscreteScale extends ScaleDefinitionObject { super._materializeExtraVegaScaleProps(prop_descriptor, vega_scale_obj) if (this.default_value_ !== null) { // eslint-disable-next-line no-warning-comments - // TODO(croot): should we validate the default value? + // TODO: should we validate the default value? vega_scale_obj.default = this.default_value_ } } diff --git a/src/mixins/render-vega-lite/Definitions/Encoding/Scale/ScaleDefinitionObject.js b/src/mixins/render-vega-lite/Definitions/Encoding/Scale/ScaleDefinitionObject.js index 3c07bc5c5..d220ec743 100644 --- a/src/mixins/render-vega-lite/Definitions/Encoding/Scale/ScaleDefinitionObject.js +++ b/src/mixins/render-vega-lite/Definitions/Encoding/Scale/ScaleDefinitionObject.js @@ -115,7 +115,7 @@ export default class ScaleDefinitionObject extends PropertiesDefinitionInterface if (this.null_value_ !== null) { // eslint-disable-next-line no-warning-comments - // TODO(croot): validate null value, at least object-wise? + // TODO: validate null value, at least object-wise? vega_scale_obj.nullValue = this.null_value_ } diff --git a/src/mixins/render-vega-lite/Definitions/Encoding/ValueDefinitionObject.js b/src/mixins/render-vega-lite/Definitions/Encoding/ValueDefinitionObject.js index 15a2cbc0e..644e1c967 100644 --- a/src/mixins/render-vega-lite/Definitions/Encoding/ValueDefinitionObject.js +++ b/src/mixins/render-vega-lite/Definitions/Encoding/ValueDefinitionObject.js @@ -15,7 +15,7 @@ export default class ValueDefinitionObject extends PropertiesDefinitionInterface if (Object.keys(value_definition_object).length !== 1) { this.error_message = `Value definitions must have only 1 property called value` // eslint-disable-next-line no-warning-comments - // TODO(croot): not sure about this early return in + // TODO: not sure about this early return in // a constructor. The caller should check for the error_message // pretty much immediately after. return diff --git a/src/mixins/render-vega-lite/Definitions/Mark/MarkConfigDefinitionObject.js b/src/mixins/render-vega-lite/Definitions/Mark/MarkConfigDefinitionObject.js index c7f049667..3c6ea0f9e 100644 --- a/src/mixins/render-vega-lite/Definitions/Mark/MarkConfigDefinitionObject.js +++ b/src/mixins/render-vega-lite/Definitions/Mark/MarkConfigDefinitionObject.js @@ -52,7 +52,7 @@ export default class MarkConfigDefinitionObject extends ConfigDefinitionInterfac this.strokeOpacity_ = definition_object.strokeOpacity } // eslint-disable-next-line no-warning-comments - // TODO(croot): make stroke join an enum + // TODO: make stroke join an enum this.strokeJoin_ = MarkConfigDefinitionObject.defaults.strokeJoin if (Object.hasOwn(definition_object, "strokeJoin")) { this.strokeJoin_ = definition_object.strokeJoin diff --git a/src/mixins/render-vega-lite/Definitions/Transform/Transforms/CrossSection2dDefinitionObject.js b/src/mixins/render-vega-lite/Definitions/Transform/Transforms/CrossSection2dDefinitionObject.js index 1a6a7a804..f120646f5 100644 --- a/src/mixins/render-vega-lite/Definitions/Transform/Transforms/CrossSection2dDefinitionObject.js +++ b/src/mixins/render-vega-lite/Definitions/Transform/Transforms/CrossSection2dDefinitionObject.js @@ -323,7 +323,7 @@ export default class CrossSection2dDefinitionObject extends PropertiesDefinition // vega_mark_prop_obj[vega_prop_name].field = vega_prop_name // } } - // TODO(croot): may want to do a Geographic channel check here, but that would require the prop_descriptors input + // TODO: may want to do a Geographic channel check here, but that would require the prop_descriptors input // to this function to only be the prop descriptors that were "handled" // else if (prop_descriptor instanceof GeographicChannelDescriptor) { // throw new Error( diff --git a/src/mixins/render-vega-lite/Definitions/Transform/Transforms/LimitDefinitionObject.js b/src/mixins/render-vega-lite/Definitions/Transform/Transforms/LimitDefinitionObject.js index 68ae9d38a..f15d8764a 100644 --- a/src/mixins/render-vega-lite/Definitions/Transform/Transforms/LimitDefinitionObject.js +++ b/src/mixins/render-vega-lite/Definitions/Transform/Transforms/LimitDefinitionObject.js @@ -24,7 +24,7 @@ export default class LimitDefinitionObject extends PropertiesDefinitionInterface } this.limit_ = definition_object[LimitDefinitionObject.key] // eslint-disable-next-line no-warning-comments - // TODO(croot): validate limit ranges? + // TODO: validate limit ranges? /** * @type {number} @@ -38,7 +38,7 @@ export default class LimitDefinitionObject extends PropertiesDefinitionInterface } this.offset_ = definition_object.offset // eslint-disable-next-line no-warning-comments - // TODO(croot): validate tableSize? + // TODO: validate tableSize? } } diff --git a/src/mixins/render-vega-lite/Definitions/Transform/Transforms/SampleDefinitionObject.js b/src/mixins/render-vega-lite/Definitions/Transform/Transforms/SampleDefinitionObject.js index c81882acf..2467d73c5 100644 --- a/src/mixins/render-vega-lite/Definitions/Transform/Transforms/SampleDefinitionObject.js +++ b/src/mixins/render-vega-lite/Definitions/Transform/Transforms/SampleDefinitionObject.js @@ -24,7 +24,7 @@ export default class SampleDefinitionObject extends PropertiesDefinitionInterfac } this.sample_ = definition_object[SampleDefinitionObject.key] // eslint-disable-next-line no-warning-comments - // TODO(croot): validate sample ranges? + // TODO: validate sample ranges? if (!Object.hasOwn(definition_object, "tableSize")) { throw new Error( @@ -39,7 +39,7 @@ export default class SampleDefinitionObject extends PropertiesDefinitionInterfac } this.table_size_ = definition_object.tableSize // eslint-disable-next-line no-warning-comments - // TODO(croot): validate tableSize? + // TODO: validate tableSize? } /** diff --git a/src/mixins/render-vega-lite/PropDescriptor/PropDescriptor.js b/src/mixins/render-vega-lite/PropDescriptor/PropDescriptor.js index 540480776..82bf58ae8 100644 --- a/src/mixins/render-vega-lite/PropDescriptor/PropDescriptor.js +++ b/src/mixins/render-vega-lite/PropDescriptor/PropDescriptor.js @@ -154,7 +154,7 @@ export default class PropDescriptor { // eslint-disable-next-line no-unused-vars buildDefaultScaleDefinition(parent_info) { // eslint-disable-next-line no-warning-comments - // TODO(croot): move this into a scale-enabled descriptor mixin + // TODO: move this into a scale-enabled descriptor mixin return {} } } diff --git a/src/mixins/scatter-mixin.js b/src/mixins/scatter-mixin.js index ebfd7ed95..c51fe1026 100644 --- a/src/mixins/scatter-mixin.js +++ b/src/mixins/scatter-mixin.js @@ -30,7 +30,7 @@ export default function scatterMixin(_chart, _mapboxgl, mixinDraw = true) { }, resize() { // noop - // TODO(croot): send any events to notify the user of a change? + // TODO: send any events to notify the user of a change? } } @@ -122,7 +122,7 @@ export default function scatterMixin(_chart, _mapboxgl, mixinDraw = true) { // default to a 0-1 range _xRange = [0, 1] - // TODO(croot): automatically determine the min/max of the x dimension + // TODO: automatically determine the min/max of the x dimension // If we do this, we should cache the x scale and only // do this if the scale or dimension has changed } else { diff --git a/src/mixins/stack-mixin.js b/src/mixins/stack-mixin.js index 0d9be1928..dbc128e92 100644 --- a/src/mixins/stack-mixin.js +++ b/src/mixins/stack-mixin.js @@ -54,7 +54,7 @@ export default function stackMixin(_chart) { return d3.functor(true) } if (_chart.isOrdinal()) { - // TODO #416 + // TODO: Handle domain set for ordinal scales // var domainSet = d3.set(xDomain); return function() { return true // domainSet.has(p.x); diff --git a/src/mixins/ui/coordinate-grid-raster-mixin-ui.js b/src/mixins/ui/coordinate-grid-raster-mixin-ui.js index 7a6fbab6b..9f5a291a0 100644 --- a/src/mixins/ui/coordinate-grid-raster-mixin-ui.js +++ b/src/mixins/ui/coordinate-grid-raster-mixin-ui.js @@ -590,7 +590,7 @@ class ScrollZoomHandler extends BaseHandler { // NOTE: the following is currently only designed // to work with linear scales. - // TODO(croot): come up with a generic extrapolation + // TODO: come up with a generic extrapolation // technique for any scale. const width = this._chart.effectiveWidth() @@ -743,7 +743,7 @@ class DragPanHandler extends BaseHandler { this._fireEvent("movestart", e) } - // TODO(croot): stop other animated pans/zooms here if/when + // TODO: stop other animated pans/zooms here if/when // they're supported. this._drainInertiaBuffer() this._dragInertia.push([Date.now(), pos]) @@ -851,12 +851,12 @@ class DragPanHandler extends BaseHandler { finish() - // TODO(croot): + // TODO: // Do the animated ease-out of the pan like mapbox } onTouchEnd(e) { - // TODO(croot): check that the event is in the chart window? + // TODO: check that the event is in the chart window? if (this._ignoreEvent(e)) { return } @@ -866,7 +866,7 @@ class DragPanHandler extends BaseHandler { } onMouseUp(e) { - // TODO(croot): check that the event is in the chart window? + // TODO: check that the event is in the chart window? if (this._ignoreEvent(e)) { return } @@ -994,7 +994,7 @@ export default function bindEventHandlers( } function onMouseDown(e) { - // TODO(croot): if we support animated + // TODO: if we support animated // pans/zooms, we want to stop any currently // running animation here first: @@ -1031,7 +1031,7 @@ export default function bindEventHandlers( function onTouchStart(e) { if (isInChart(chart, container, e)) { - // TODO(croot): if we support animated + // TODO: if we support animated // pans/zooms, we want to stop any currently // running animation here first: if ( @@ -1110,7 +1110,7 @@ export default function bindEventHandlers( const margins = chart.margins() for (let i = 0; i < e.touches.length; i = i + 1) { - // TODO(croot): should we only add points that are + // TODO: should we only add points that are // within the container? points.push( new mapboxglModule.Point( diff --git a/src/mixins/ui/lasso-shapes/LatLonCircle.js b/src/mixins/ui/lasso-shapes/LatLonCircle.js index 0b87dd6b2..4dbde1c4e 100644 --- a/src/mixins/ui/lasso-shapes/LatLonCircle.js +++ b/src/mixins/ui/lasso-shapes/LatLonCircle.js @@ -434,7 +434,7 @@ function subdivideArc( circle_descriptor.max_segment_pixel_distance ) { // subdivde the line segment at the midpoint of the in-view line segment - // TODO(croot): This seems to work 99.5% of the time but could see a jump in the rare case that + // TODO: This seems to work 99.5% of the time but could see a jump in the rare case that // the line segment crosses very close to a corner. const line_center_lonlat = tmp_point Point2d.lerp(line_center_lonlat, start_lonlat_pt, end_lonlat_pt, 0.5) diff --git a/src/mixins/ui/lasso-shapes/LatLonViewIntersectUtils.js b/src/mixins/ui/lasso-shapes/LatLonViewIntersectUtils.js index fee6cdd51..489b48565 100644 --- a/src/mixins/ui/lasso-shapes/LatLonViewIntersectUtils.js +++ b/src/mixins/ui/lasso-shapes/LatLonViewIntersectUtils.js @@ -138,7 +138,7 @@ function _intersect_view_bounds( // Return empty object. // eslint-disable-next-line no-warning-comments - // TODO(croot): support other projections? + // TODO: support other projections? return rtn_obj } @@ -190,7 +190,7 @@ function _intersect_view_bounds( if (denominator_t === 0) { // colinear // eslint-disable-next-line no-warning-comments - // TODO(croot): this needs filling out in the general case + // TODO: this needs filling out in the general case // NOTE: this should never be hit in the LonLatPoly case because of // the delta_x/delta_y === 0 check. diff --git a/src/utils/custom-sql-parser.js b/src/utils/custom-sql-parser.js index 61e19b24c..0ed2b9e09 100644 --- a/src/utils/custom-sql-parser.js +++ b/src/utils/custom-sql-parser.js @@ -14,7 +14,7 @@ const Whitespace = createToken({ // We need to define the Identifier here, to use as a "longer_alt" for all // keywords. But it'll appear after keywords in the tokenizer. // -// XXX: +// TODO: // support for non-latin characters? // U&"..." identifiers? // U&"..." UESCAPE '?' identifiers? @@ -30,7 +30,7 @@ const QuotedIdentifier = createToken({ categories: [Identifier] }) -// XXX: +// TODO: // Window functions (OVER, PARTITION BY, USING, NULLS, FIRST, LAST, etc) // Type casts (CAST ... AS ...) // COLLATE @@ -110,7 +110,7 @@ const End = createToken({ longer_alt: UnquotedIdentifier }) -// XXX: +// TODO: // E'...' string constants? // U&'...' string constants? // U&'...' UESCAPE '?' string constants? @@ -134,7 +134,7 @@ const BooleanConstant = createToken({ categories: [Constant] }) -// XXX: +// TODO: // OVERLAPS // SIMILAR // BETWEEN SYMMETRIC @@ -307,7 +307,7 @@ const Or = createToken({ longer_alt: UnquotedIdentifier }) -// XXX: +// TODO: // Array elements with brackets ([]) // Array slices with : // Type cast with :: diff --git a/src/utils/mapbox-ported-functions.js b/src/utils/mapbox-ported-functions.js index c55fffea8..1d3b34806 100644 --- a/src/utils/mapbox-ported-functions.js +++ b/src/utils/mapbox-ported-functions.js @@ -2,7 +2,6 @@ * As part of the initiative to upgrade our Mapbox dependency, these * functions have been copied from our forked version of Mapbox so that Mapbox * can be updated independently - * - See [FE-8035] */ import UnitBezier from "@mapbox/unitbezier" diff --git a/src/utils/utils-vega.js b/src/utils/utils-vega.js index 2313a1da0..9c292880d 100644 --- a/src/utils/utils-vega.js +++ b/src/utils/utils-vega.js @@ -209,7 +209,7 @@ export function createVegaAttrMixin( } rtnVal = ordScale(formattedInput) } else if (Array.isArray(domainVals) && domainVals[0] === domainVals[1]) { - // handling case where domain min/max are the same (FE-7408) + // handling case where domain min/max are the same linearScale.domain(domainVals).range(capAttrObj.range) rtnVal = Math.round(linearScale(input)) } else { @@ -818,7 +818,7 @@ export function getScales( } /** - * Filters z-indexed layers and returns non duplicate layer. Z-indexed layers is for temporary hack FE-13136 + * Filters z-indexed layers and returns non duplicate layer. * For z-indexed layer (layer that has top color category applied), only returns the first z-index, z_0 * @param layers * @returns {[]}