Skip to content

fix: code review findings#13

Merged
pirhoo merged 5 commits into
mainfrom
fix/code-review-findings
Jun 17, 2026
Merged

fix: code review findings#13
pirhoo merged 5 commits into
mainfrom
fix/code-review-findings

Conversation

@pirhoo

@pirhoo pirhoo commented Jun 17, 2026

Copy link
Copy Markdown
Member

Routine cleaning and fixes with /code-review, no external review needed.

pirhoo added 5 commits June 16, 2026 15:58
- BarChart/ColumnChart: sortedData sorted itself instead of loadedData,
  so enabling sortBy rendered an empty chart; sort loadedData instead
- ColumnChart: fall back to 0 when d3.max is undefined so a missing/
  non-numeric value field no longer yields a NaN y-scale (vanished bars)
- StackedColumnChart: use ?? so an explicit maxValue of 0 is honoured
- StackedBarChart: stop throwing in barStyle on a zero total; log and
  fall back to 100 like StackedColumnChart
- Bar/Column/LineChart: clamp padded width/height (and Bar range,
  StackedColumn tickSize) to >= 0 to avoid negative SVG dimensions
- BarChart: remove dead initialize() axis builder and its watcher
- useChart: emit('loaded', loadedData) and detect highlights on
  loadedData so URL-fetched data works
- add sortBy regression tests for BarChart and ColumnChart
- SymbolMap: build the tooltip target id from the marker cursor value
  directly instead of re-extracting it through markerId(), which yielded
  "...-marker-undefined" and never anchored the tooltip
- ChoroplethMap: drop the root @click="draw" that rebuilt the whole SVG
  on every click and undid the feature click-to-zoom
- ChoroplethMap: stop double-binding mapZoom and binding both planar and
  spherical zoom behaviors at once; route programmatic zoom through the
  behavior actually bound to the selection
- SymbolMap: replace per-marker categories.indexOf (O(n^2)) with a
  memoized name->index Map
- SharingOptions: fix malformed selector 'meta[name="description]'
  (missing quote) that threw a SyntaxError in real browsers, and stop
  Object.assign mutating the metaValues computed cache
- FormControlSelectableDropdown: match the active item by value so
  keyboard navigation works for object items (the spread clones broke
  reference-based indexOf)
- FormEmbed: build the iframe src from the resolved url argument instead
  of the possibly-null props.url
- FormAdvancedLink: import the real AdvancedLinkTab type instead of the
  non-existent Tab; FormAdvancedLinkTab: drop the invalid id default
- FormDonate: drop the no-op self-assignment in the amount watcher
- PaginationTiny: clamp submitted page/row input to [1, numberOfPages]
- HapticCopy: clear the pending tooltip timeout on unmount
- SlideUpDown: remove the transitionend listener on unmount
- ActiveTextTruncate: stop the RAF loop and remove transition listeners
  on unmount
- ResponsiveIframe: remove the pym Parent (and its window listener) on
  unmount
- SharingOptionsLink: clear the polling interval / popup on unmount
- useResizeObserver: guard the element deref, disconnect the observer on
  unmount, and debounce resize so consumers redraw once dimensions settle
- useQueryObserver: disconnect MutationObservers on scope dispose
- EllipsisTooltip: disconnect the ResizeObserver on unmount
- assets: reject (and uncache) failed asset loads and resolve
  injectAssets() immediately for an empty list, so callers never hang
- FormControlSelectableDropdown: strip recycle_scroller_id from BOTH
  sides in firstActiveItemIndex so keyboard nav works after a click or
  range-select (activeItems then holds items_ entries that carry the key)
- assets: count a failed injection as settled (.catch(allFilesLoaded)) so
  one failed asset no longer leaves injectAssets pending forever
- ChoroplethMap: route resetZoom and setFeatureZoom through a shared
  activeZoomBehavior too, so spherical maps no longer dispatch those
  zooms via the planar handler
- useResizeObserver: cancel the debounced callback on unmount (and drop
  the now-redundant unobserve) so no trailing call fires after teardown
- useChart: dataHasHighlights falls back to the raw data prop so a
  synchronous array reports highlights on first paint
- FormAdvancedLink tests: import AdvancedLinkTab instead of the
  non-existent Tab type
@pirhoo pirhoo marked this pull request as ready for review June 17, 2026 07:48
@pirhoo pirhoo merged commit bc95683 into main Jun 17, 2026
2 checks passed
@pirhoo pirhoo deleted the fix/code-review-findings branch June 17, 2026 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant