Repository navigation
fix(frontend): AppShell 内の画面遷移・ステップ切替でスクロール位置を先頭へリセット (#549) - #592
Open
YosukeMiyata wants to merge 4 commits into
Open
YosukeMiyata wants to merge 4 commits into
YosukeMiyata wants to merge 4 commits into
Conversation
AppShell scrolls inside <main overflow-y-auto>, so step transitions within the same route left the user mid-page on mobile. Extract useScrollToTop and apply it across wizard flows. Co-authored-by: Cursor <cursoragent@cursor.com>
Updated the useScrollToTop hook to utilize useLayoutEffect for improved scroll handling during component updates. Added logic to reset scroll positions for all vertical scrollable ancestors, ensuring a consistent user experience during wizard step transitions. This addresses issues where users were left mid-page after step changes in the AppShell.
…omponents Added the useScrollToTop hook to multiple components, ensuring that scroll positions reset appropriately on route changes and key updates. This enhancement improves user experience by maintaining consistent scroll behavior in the AppShell, MasterDetailLayout, and other layouts, addressing issues with mid-page navigation during transitions.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…proved scroll behavior Added the useScrollToTop hook to the DesktopMembersView component, ensuring that the scroll position resets when a member is selected. This enhancement improves user navigation and experience by maintaining consistent scroll behavior during member detail transitions.
This branch was successfully deployed
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.
Summary
<main overflow-y-auto>内でスクロールしているため、window向けの<ScrollRestoration />ではリセットされず、同一ルートのステップ切替や画面遷移でスクロール位置が引き継がれていた問題を修正useScrollToTopを追加し、スクロール可能な祖先(AppShell の<main>含む)を先頭へ戻す処理を共通化AppShellLayoutで pathname 変更時にリセット(/{treeId}/...全般)Fixes #549
Test plan