Data grid pagy scroll#63
Open
joshsadam wants to merge 15 commits into
Open
Conversation
faa5d39 to
9043a10
Compare
9fa3936 to
ead7311
Compare
5813a99 to
23246c2
Compare
b1f9266 to
73144fe
Compare
Large datasets can exceed what is practical to render upfront. Fetch row pages on scroll with a client-side page cache so the grid stays responsive while preserving keyboard navigation across the full row count.
Exercise pagination config validation, virtual contract attributes, page cache behaviour, and a Lookbook preview for manual verification.
Provide a runnable example that serves row pages with Pagy and shows how host apps wire virtual_pagination into the data grid.
Removed unnecessary comments from the data grid controller for improved readability. Enhanced keyboard navigation by implementing a new method to focus on the absolute last cell when Ctrl+End is pressed in a paginated virtual grid. Updated tests to cover this new behavior.
Implemented a feature to rerender the top rows when Ctrl+Home is pressed from the bottom of a paginated virtual grid. This change ensures that the visible rows are updated correctly, improving user experience. Added a corresponding test to validate this behavior.
Refactored CSS variables in the data grid styles to align with the new theming system. Updated colors for borders, text, backgrounds, and focus rings to use the new variable names, enhancing design consistency across light and dark modes. Additionally, improved the HTML structure in the data grid preview for better styling and accessibility.
Added functionality to restore cell focus when navigating through a virtual data grid, including handling focus after scrolling and paginated row loads. Introduced a new method to manage pending focus coordinates and updated related tests to ensure proper focus behavior across various interactions.
Refactored the column rendering logic in the DataGrid component to improve handling of content blocks. Added a new method to resolve column cell renderers, ensuring proper rendering of dynamic content. Updated the demo samples grid to utilize a helper for rendering organism names with HTML tags, enhancing the display of data. Added a test to verify the correct rendering of organism names in the output.
Updated CSS variables in the data grid styles to improve theming consistency, including new variables for error states and enhanced border and background colors. Refactored component styles to utilize these variables, ensuring better responsiveness and accessibility. Adjusted the DataGrid component to reflect these changes in its layout and appearance.
Remove the pagination adapter layer and dead row-offset parsing so the controller talks directly to PaginatedVirtualRows with less indirection. Replace the fragile ViewComponent slot internals workaround with an explicit renderer API and keep paginated cell ordering stable for focus restoration and keyboard navigation.
Per-cell sticky top offsets misaligned pinned and center header cells in paginated virtual grids. Let the header row own the bottom border and reset virtual header cells to relative positioning. Restore the sticky-cell box-shadow so the pinned/center divider matches body rows.
Modified the column rendering logic to utilize a renderer block instead of a direct value block. This change enhances flexibility in rendering values within the DataGrid component. Updated the corresponding test to reflect this new implementation.
Restore initial viewport position from row offset, sort cached rows by global index, track concurrent page fetches for aria-busy, and clear the error state after a successful load.
Custom cell blocks need the caller's self for helper methods. Use block.call instead of instance_exec so the original receiver is kept.
…ll cache Restore ColumnComponent block support for direct instantiation and rebuild paginated virtual cell maps from CenterColumnWindow's full lane cache so keyboard navigation keeps offscreen columns after horizontal slicing.
73144fe to
30ab16f
Compare
5 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.
What does this PR do and why?
DataGrid, fetching row pages from the server as the user scrolls instead of rendering the full dataset in memory.virtual_paginationconfig (total_count,rows_url,page_size,row_offset) plus a demo samples endpoint and Lookbook preview for manual validation.Screenshots or screen recordings
How to set up and validate locally
bin/setup(orcd demo && bundle install).cd demo && bin/dev→ Data Grid → Virtual Infinite Scroll; scroll to load additional pages and exercise keyboard navigation (including Ctrl+Home / Ctrl+End).curl "http://localhost:3001/demo/samples/rows.json?page=2&limit=20".PR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.