feat(datagrid): add optional synchronized top horizontal scrollbar - #2434
victordonetguerra wants to merge 3 commits into
Conversation
|
Validation update for 7f33975:
Snyk code and license checks passed. The dependency security check reports 21 failures; the detailed report requires access to the Mendix Snyk organization, so I cannot yet determine whether these are baseline findings. Could a maintainer approve the four workflows awaiting approval and share the relevant Snyk findings (or confirm their baseline status)? I am keeping this PR as a draft until the outstanding validation is complete. |
|
Runtime validation update for the same commit (7f33975): The official public Data Grid test project now builds and runs locally on Mendix 10.24.12.86709. The new default-off Playwright regression test passed in Microsoft Edge. Two additional local fixture tests also passed: bidirectional horizontal synchronization, independent grids, hide/show of an enlarged column, scrollbar collapse/reappearance on viewport resize, negative offsets with RTL direction applied to the grid, and mounting on the virtual-scrolling page. For the enabled fixture only, I restored the original public MPR and changed the new property default to true in a disposable copy of the MPK XML before running mx update-widgets and rebuilding. The widget JavaScript and this PR remain unchanged; the published default remains false. Limitations: native mouse dragging timed out in the local Edge automation, so the resize check dispatches mouse events to the actual resize control. The RTL check applies CSS direction rather than using a translated Mendix fixture. Virtual-scrolling coverage is a mounting smoke test, not a full large-dataset scrolling regression. These remain reasons to keep the PR in draft. The earlier Docker startup blocker is resolved. Maintainer approval for upstream workflows and access to the Snyk dependency findings are still needed. |
Pull request type
New feature (non-breaking change which adds functionality)
Description
Tall grids with wide columns make users reach the bottom scrollbar to move horizontally. This adds Appearance > Show top horizontal scrollbar, disabled by default. When enabled, the extra bar follows the grid horizontally, hides without overflow, and updates when columns are hidden, shown or resized.
Virtual grids scroll inside the grid element; other grids scroll inside the content wrapper. Runtime testing caught and fixed the original wrapper-only implementation for virtual grids, with a focused unit regression test. Vertical scrolling and pagination logic remain unchanged.
The component observes the existing MobX grid style and uses ResizeObserver with a window-resize fallback. Listeners, observers and queued frames are cleaned up on unmount. No changes to personalization storage, grid sizing, widget identifier, dependencies or release versions. The extra bar is a pointer convenience; existing keyboard navigation remains available.
Includes README fixture instructions, an Unreleased changelog entry, generated XML typings, a default-off E2E test and an opt-in enabled-fixture suite. The latter requires a disposable localhost project and adds 500 synthetic records; it is skipped unless explicitly enabled.
Validation
Windows, Node 24.16.0, pnpm 10.33.4:
The disposable React fixture uses the same official test project with its WebUI client setting changed to MigrationMode. This does not certify strict React mode or Mendix 11. Edge was used because the downloaded Chromium binary did not launch on this workstation. RTL coverage exercises layout and offsets, not application translations. Saved-personalization restore/reset, initially hidden tabs, zoom, other browsers/OS scrollbar styles and screen readers have not been certified by these checks.
Maintainer follow-up
Related context: #2222 covers virtual-scroll height locking; this PR does not modify that logic. The behavior reported in #1818 is outside this contribution's scope.