feat: multi-layer data table, shared rendering architecture, and cross-cutting fixes [PR7] - #3763
Draft
BRaimbault wants to merge 8 commits into
Draft
BRaimbault wants to merge 8 commits into
BRaimbault wants to merge 8 commits into
Conversation
Contributor
|
🚀 Deployed on https://pr-3763.maps.netlify.dhis2.org |
BRaimbault
added this pull request to stack #3765
September 9, 2026 08:35
BRaimbault
force-pushed
the
feat/datatable-pr7-refinements
branch
from
September 9, 2026 08:36
41bc652 to
9534ce2
Compare
5 tasks
…s-cutting fixes Split out from the original feat/datatable-pr7-multilayer, which bundled this together with the Combined data table. This half is everything not strictly Combined-specific, including groundwork built in preparation for it: - Multi-layer support: openIds replaces the old single active-layer id, with isPanelVisible and activeLayerId now persisted in Redux so closing and reopening the panel (or the menu-bar Data Table shortcut) restores exactly what was open and which tab was active, instead of resetting. - LayerSelectorControl replaces the old single-name display with a dropdown covering every eligible layer. - Shared rendering/interaction architecture extracted for reuse by the upcoming Combined table: CellValue/SelectionCheckboxColumn/ SortableColumnHeader components, useSortState/useRowClickSelection/ useRowContextMenuHighlight hooks, and a shared cell-text formatter (util/cellValue.js) with a unified "-" placeholder for empty values. - getNextSorting gained a defaultSortField/defaultSortDirection option so a column's third click resets to the table's actual default sort instead of an unsorted state. - Selection now survives closing the data table or switching layer tabs, instead of clearing. - Per-layer "clear filters" action added directly to each layer's map toolbar (FilterActiveIcon, LayerToolbar). - Event layer: incremental "top-up" loading of newly-visible columns instead of a full reload when more columns need to display. - Tracked entity layer: resolve option-set-coded values to display names for the data table's categorical columns. - Various smaller fixes carried over from the original branch: row sorting/selection cleanup, column picker onChange now takes the caller (not an internal layerId+dispatch), row-count digit grouping, org unit id casing. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
buildKnownOrgUnitNames(rows = []) only falls back to [] for undefined - useTableData passes it dataWithAggregations, which is null whenever a layer has no valid rows (e.g. an org-unit-based layer whose selected units have no coordinates), so rows.forEach crashed instead of showing the "no valid data" message. Found by smoke-testing the data table with a facility layer that had 0 matching rows. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
ActiveLayerControl and RowCells were superseded by LayerSelectorControl and the inline CellValue-based row rendering respectively, but the files themselves were never deleted since this branch started fresh from PR6 rather than from the already-cleaned-up squash. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Adds coverage for setMapBounds, toggleShowOnlyFeaturesInView, setSelectionFilter, setHighlightColor, and setDataTableColumnConfig, plus the trackedEntityLoader default export's orchestration and applyParsedConfig's dataTableColumnConfig branch. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The rows memo's own !headers.length guard could never run: getting past the earlier errorCode.current check already guarantees headers is non-empty, since the headers memo sets that same error code and returns null whenever it isn't. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
BRaimbault
force-pushed
the
feat/datatable-pr7-refinements
branch
from
September 10, 2026 12:49
9534ce2 to
7e387fd
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Split out from the original feat/datatable-pr7-multilayer, which bundled this together with the Combined data table. This half is everything not strictly Combined-specific, including groundwork built in preparation for it:
Implements DHIS2-XXXX