View transitions - #388
Conversation
This reverts commit d801adc.
This way it can be listened for in the view transitions.
WalkthroughAdds shared hooks and CSS for document view transitions, including navigation fallback behavior and theme changes. Event grids, drawers, mobile footer islands, and page navigation now expose named transition surfaces. Painting and results navigation uses transition-aware actions, while the mobile attendees drawer stages snap-point changes during navigation. Theme selection now uses the new transition-aware theme hook. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: d8384664-b0b7-4aa8-9067-60e4ccfd2504
📒 Files selected for processing (13)
frontend/src/app/(event)/[event-code]/page-client.tsxfrontend/src/app/(event)/[event-code]/painting/page-client.tsxfrontend/src/components/mobile-footer-island.tsxfrontend/src/features/drawer/components/base.tsxfrontend/src/features/drawer/props.tsfrontend/src/features/event/grid/grid.tsxfrontend/src/features/event/grid/lib/constants.tsfrontend/src/features/event/results/attendees/mobile-drawer.tsxfrontend/src/features/header/components/theme-picker.tsxfrontend/src/lib/hooks/use-theme-toggle.tsfrontend/src/lib/hooks/use-view-transition.tsfrontend/src/styles/globals.cssfrontend/src/styles/view-transition.css
This PR adds view transitions to the site, used between the results and painting pages as well as theme transitions.
New
useViewTransitionHookThis handles the centralized logic for waiting for a new page to load before applying the view transition.
Theme Transition
When the theme changes, a view transition is used to smoothly change themes.
Small Necessary Changes
In order for the view transitions to work, a few small changes were made:
ScheduleGridcomponent, so when it moves over other elements they are fully obscured.SIDE NOTE: Contrary to what I originally thought (and mentioned in our meeting), the
loading.tsxfiles did NOT have to be deleted to get this to work. I found a way around it that was much simpler than my original attempt.