Skip to content

feat: redesign data table toolbar and add row selection context menu [PR1] - #3714

Open
BRaimbault wants to merge 12 commits into
chore/setup-claudefrom
feat/datatable-pr1-toolbar
Open

BRaimbault wants to merge 12 commits into
chore/setup-claudefrom
feat/datatable-pr1-toolbar

Conversation

@BRaimbault

@BRaimbault BRaimbault commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Part of DHIS2-21456

Description

Replaces the 20px data table control strip with a full 36px toolbar and adds a right-click context menu to table rows. First of a series of PRs improving the data table experience.

Toolbar (BottomPanel)

  • Shows the active layer name and live row count (X of Y rows when filters are active, X rows otherwise)
  • "Clear filters" button appears when any column filter is active
  • Sort arrows in column headers now correctly reflect ascending/descending direction

Row context menu (TableContextMenu)

  • Right-click a row: drill up/down, view profile, zoom to feature
  • Drill items are hidden for boundary, facility, event, and GeoJSON URL layers
  • "View profile" opens the feature profile for GeoJSON URL layers and the org unit profile for all others

GeoJSON URL layer

  • Right-click on map features now opens the context menu (was wired only for click)
  • Map context menu: "View profile" opens the feature profile; drill up/down items are hidden
  • Shared getGeojsonFeatureProfile utility keeps the profile format consistent across map click, map context menu, and table context menu

Bug fixes

  • Feature highlight no longer lost after async layer rebuilds (thematic timeline / split-by-period, EarthEngine full rebuild path)
  • Fixed null crash in highlightFeature when the map layer has no highlight method
  • O(1) feature lookup by id in the data table (was an O(n) scan per interaction)

Quality checklist

Add N/A to items that are not applicable.

  • Dashboard tested N/A
  • Jest tests added/updated (Cypress tests will be added at the end)
  • Docs added N/A
  • d2-ci dependencies replaced N/A
  • Tester approved N/A (tests will be carried out on the entier PR stack)

Screenshots

supporting images

@dhis2-bot

Copy link
Copy Markdown
Contributor

🚀 Deployed on https://pr-3714.maps.netlify.dhis2.org

@dhis2-bot
dhis2-bot temporarily deployed to netlify July 6, 2026 17:25 Inactive
@BRaimbault
BRaimbault force-pushed the feat/datatable-pr1-toolbar branch from fdf69f4 to 3de8004 Compare July 6, 2026 17:31
@dhis2-bot
dhis2-bot temporarily deployed to netlify July 6, 2026 17:39 Inactive
@dhis2-bot
dhis2-bot temporarily deployed to netlify July 9, 2026 17:46 Inactive
@dhis2-bot
dhis2-bot temporarily deployed to netlify July 10, 2026 08:07 Inactive
@dhis2-bot
dhis2-bot temporarily deployed to netlify July 13, 2026 15:57 Inactive
@dhis2-bot
dhis2-bot temporarily deployed to netlify July 14, 2026 17:20 Inactive
@dhis2-bot
dhis2-bot temporarily deployed to netlify July 16, 2026 22:14 Inactive
@dhis2-bot
dhis2-bot temporarily deployed to netlify July 17, 2026 10:02 Inactive
@BRaimbault
BRaimbault changed the base branch from master to chore/setup-claude July 17, 2026 18:18
@dhis2-bot
dhis2-bot temporarily deployed to netlify July 17, 2026 18:20 Inactive
@dhis2-bot
dhis2-bot temporarily deployed to netlify July 19, 2026 10:02 Inactive
@dhis2-bot
dhis2-bot temporarily deployed to netlify July 19, 2026 13:41 Inactive
@dhis2-bot
dhis2-bot temporarily deployed to netlify July 19, 2026 15:48 Inactive
@dhis2-bot
dhis2-bot temporarily deployed to netlify July 19, 2026 20:52 Inactive
@dhis2-bot
dhis2-bot temporarily deployed to netlify July 19, 2026 21:23 Inactive
@dhis2-bot
dhis2-bot temporarily deployed to netlify July 19, 2026 23:26 Inactive
@dhis2-bot
dhis2-bot temporarily deployed to netlify July 20, 2026 07:18 Inactive
@dhis2-bot
dhis2-bot temporarily deployed to netlify July 20, 2026 12:05 Inactive
@dhis2-bot
dhis2-bot temporarily deployed to netlify July 20, 2026 14:12 Inactive
@dhis2-bot
dhis2-bot temporarily deployed to netlify July 20, 2026 15:00 Inactive
@BRaimbault
BRaimbault force-pushed the feat/datatable-pr1-toolbar branch from 34435f4 to 6541b3a Compare July 27, 2026 09:45
@dhis2-bot
dhis2-bot temporarily deployed to netlify July 27, 2026 09:47 Inactive
@BRaimbault BRaimbault changed the title feat: redesign toolbar and add row context menu [PR1] feat: redesign data table toolbar and add row context menu [PR1] Jul 28, 2026
@BRaimbault BRaimbault changed the title feat: redesign data table toolbar and add row context menu [PR1] feat: redesign data table toolbar and add row selection context menu [PR1] Jul 28, 2026
@BRaimbault
BRaimbault marked this pull request as ready for review August 4, 2026 15:21
@BRaimbault
BRaimbault requested a review from edoardo August 4, 2026 15:21
@edoardo
edoardo force-pushed the feat/datatable-pr1-toolbar branch from 6541b3a to 53fe401 Compare August 24, 2026 09:55
@dhis2-bot
dhis2-bot temporarily deployed to netlify August 24, 2026 09:57 Inactive
@BRaimbault
BRaimbault force-pushed the feat/datatable-pr1-toolbar branch from 53fe401 to 49ab3c0 Compare September 1, 2026 10:27
@dhis2-bot
dhis2-bot temporarily deployed to netlify September 1, 2026 10:28 Inactive
@dhis2-bot
dhis2-bot temporarily deployed to netlify September 1, 2026 13:23 Inactive
@BRaimbault
BRaimbault force-pushed the feat/datatable-pr1-toolbar branch from 45f89bd to d06760b Compare September 4, 2026 07:26
@dhis2-bot
dhis2-bot temporarily deployed to netlify September 4, 2026 07:28 Inactive
@BRaimbault
BRaimbault removed this pull request from stack #3735 September 9, 2026 08:34
@BRaimbault
BRaimbault added this pull request to stack #3765 September 9, 2026 08:34
@BRaimbault
BRaimbault force-pushed the feat/datatable-pr1-toolbar branch from d06760b to 60b1efc Compare September 9, 2026 08:36
@dhis2-bot
dhis2-bot temporarily deployed to netlify September 9, 2026 08:38 Inactive
BRaimbault and others added 12 commits September 10, 2026 14:48
Adds clearDataFilters(layerId) action creator and the corresponding
DATA_FILTERS_CLEAR_ALL reducer case that resets dataFilters to {} for
the target layer. Used by the new "Clear filters" button in the toolbar.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Returns the total number of rows before filtering (totalCount) and
after filtering (filteredCount) so the toolbar can show "X of Y rows".

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replaces the 20px grey strip with a 36px toolbar that shows:
- Active layer name (truncated with ellipsis)
- Row count ("X of Y rows" when filtered, "Y rows" otherwise)
- "Clear filters" button (only visible when filters are active)
- Close button

Adds onCountChange callback prop to DataTable so BottomPanel can
display the post-filter row count without reading useTableData directly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Extends highlightFeature with an optional zoom:true flag. When a table
row is clicked (plain click, not Ctrl+click), dispatches highlightFeature
with zoom:true. Layer.js watches for this in componentDidUpdate and calls
panToFeature(), which uses getFeaturesById() to compute the feature's
bounding box and calls map.fitBounds() to pan and zoom to the feature.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@BRaimbault
BRaimbault force-pushed the feat/datatable-pr1-toolbar branch from 60b1efc to 6454c89 Compare September 10, 2026 12:49
@sonarqubecloud

Copy link
Copy Markdown

@dhis2-bot
dhis2-bot temporarily deployed to netlify September 10, 2026 12:51 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants