feat: redesign toolbar and add row context menu [PR1]#3714
Draft
BRaimbault wants to merge 8 commits into
Draft
Conversation
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>
Contributor
|
🚀 Deployed on https://pr-3714.maps.netlify.dhis2.org |
fdf69f4 to
3de8004
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.



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)X of Y rowswhen filters are active,X rowsotherwise)Row context menu (
TableContextMenu)GeoJSON URL layer
getGeojsonFeatureProfileutility keeps the profile format consistent across map click, map context menu, and table context menuBug fixes
highlightFeaturewhen the map layer has no highlight methodQuality checklist
Add N/A to items that are not applicable.
Screenshots
supporting images