Repository navigation
fix: keep the borders on fixed pivot table headers when scrolling (DHIS2-22539) - #1881
Merged
janhenrikoverland merged 2 commits intoNov 19, 2026
Merged
Conversation
…IS2-22539) A border on the table scrolls away with the table, so a fixed header had no border on the edge it sticks to: - no top border on fixed column headers once a title, subtitle or filter row had scrolled out of view - no left border on fixed row headers once the table was scrolled sideways The headers on the top and left edge now carry those borders themselves. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
janhenrikoverland
added a commit
to dhis2/individual-data-visualizer-app
that referenced
this pull request
Nov 18, 2026
…2-22539] The border is fixed in the pivot table engine instead, for both the column and the row headers: dhis2/analytics#1881 This reverts commit 429408e. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
1 of 3 tasks
…HIS2-22539) A title, subtitle or filter row spans the whole table, so its left border scrolled away with the table while the fixed row headers below kept theirs. The title content now sticks to the left edge of the table container and carries the left border itself when the row headers are fixed. This replaces the margin that was set from the debounced scroll position, which would have let the border lag behind the fixed headers. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
janhenrikoverland
marked this pull request as draft
November 18, 2026 16:15
HendrikThePendric
added a commit
to dhis2/individual-data-visualizer-app
that referenced
this pull request
Nov 19, 2026
* feat: add fixed headers options to pivot tables [DHIS2-22539] Add "Fix column headers to top of table" and "Fix row headers to left of table" to the Style tab of the pivot table options, as in Data Visualizer. The pivot table engine reads both from the visualization, and the eventVisualizations API persists them since 2.43. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> * fix: keep the top border on fixed pivot table column headers [DHIS2-22539] The pivot table engine draws the top border on the first header row only. In this app that is a title row, which scrolls away under fixed column headers and takes the border with it. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> * revert: keep the top border on fixed pivot table column headers [DHIS2-22539] The border is fixed in the pivot table engine instead, for both the column and the row headers: dhis2/analytics#1881 This reverts commit 429408e. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com> Co-authored-by: Hendrik de Graaf <HendrikThePendric@users.noreply.github.com>
HendrikThePendric
approved these changes
Nov 19, 2026
Contributor
There was a problem hiding this comment.
Apart from being a concrete bugfix, it's also a nice UX and technical improvement. Using sticky positioning means letting the browser do some work we used to manually do. Since that manual work used to be based on a debounced scroll position, while the sticky positioning is instant, it should/could make the UX more responsive too.
Contributor
|
@janhenrikoverland our dependabot PRs in IDV appear weekly, so if you want this fix into the app today you need to put up a PR there too |
janhenrikoverland
marked this pull request as ready for review
November 19, 2026 13:29
janhenrikoverland
deleted the
fix/pivot-table-fixed-header-borders-DHIS2-22539
branch
November 19, 2026 13:29
dhis2-bot
added a commit
that referenced
this pull request
Nov 19, 2026
## [29.10.1](v29.10.0...v29.10.1) (2026-11-19) ### Bug Fixes * keep the borders on fixed pivot table headers when scrolling (DHIS2-22539) ([#1881](#1881)) ([cb5ee79](cb5ee79))
Contributor
|
🎉 This PR is included in version 29.10.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
1 of 3 tasks
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.



Implements DHIS2-22539
Relates to dhis2/individual-data-visualizer-app#465
Key features
Description
With fixed headers, the table's outer border was partly drawn by the table itself or by its first header row. Those scroll away, so a fixed header was left without a border on the edge it sticks to:
thead. That is a title row whenever there is a title, subtitle or filter, and title rows are not fixed. Once they scrolled out, the column headers had no top border.table. Once the table was scrolled sideways, the row headers had no left border.The headers on the edge now carry the border themselves:
top-edge-header, and the outermost row headers getleft-edge-header. The corner cell gets both.How the title follows sideways scrolling. The title content used to be moved with a
margin-leftset from the debounced scroll position. A border on it would lag behind the fixed row headers, so the content now usesposition: stickyinstead. Two things follow from that:PivotTableTitleRowno longer takes ascrollPositionprop.This applies to every pivot table, not only those with fixed headers: the title follows the scroll through CSS instead of script.
The borders are unchanged when no headers are fixed. Unscrolled, a table with fixed headers looks the same as before, apart from a 1px shift to the left with fixed row headers, where the left border moved from the table into the cells.
Checked in Storybook (Chrome) with fixed column headers, fixed row headers and both, each unscrolled and scrolled down, sideways and both ways, on these stories: deep, deep with title/subtitle/filter, deep with dimension labels, all totals, hierarchy in rows, no columns, no rows. Every header on the top or left edge has its border, and no border is doubled.
The title row change was checked on the deep with title/subtitle/filter story, scrolled sideways: the title content stays at the left edge of the container with no headers fixed, with either one fixed and with both, and it has the left border with fixed row headers and with both.
TODO
PRs for all affected apps created(apps pick this up with the next version bump)Storybook added(the existing PivotTable stories have the two fixed header checkboxes)Known issues
🤖 Generated with Claude Code