Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: grid layout and navigation #1675

Open
wants to merge 11 commits into
base: feature-command-palette
Choose a base branch
from

Conversation

d-rita
Copy link
Contributor

@d-rita d-rita commented Feb 26, 2025

Description:

This PR simplifies the grid layout and navigation logic.

  • It introduces a custom useGridNavigation hook that:
    • constructs a 2D array grid from the availed grid and list items, which is then used to render those items on their respective views.
    • tracks the current item as views change, or as the user navigates through the items.
  • It also adjusts the grid layout depending on the size of the screen

Related PR:

- Add a useGridNavigation hook that returns a 2D grid of optional grid items, and list items.
- Update the keydown handler passed from useGridNavigation hook
- Tracks the active item in the component with the current item object
- Add a useIsMobile hook to handle small screens
- Rework the structure of the home and list view components
@dhis2-bot
Copy link
Contributor

dhis2-bot commented Feb 26, 2025

🚀 Deployed on https://pr-1675--dhis2-ui.netlify.app

@dhis2-bot dhis2-bot temporarily deployed to netlify February 26, 2025 01:05 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify February 26, 2025 09:50 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify February 27, 2025 07:36 Inactive
@d-rita d-rita requested a review from a team February 27, 2025 07:47
@dhis2-bot dhis2-bot temporarily deployed to netlify February 27, 2025 09:48 Inactive
@d-rita d-rita marked this pull request as ready for review February 27, 2025 09:59
@d-rita d-rita requested a review from a team as a code owner February 27, 2025 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants