-
Notifications
You must be signed in to change notification settings - Fork 3.3k
An additional entry is added to the browser history when opening the app #67610
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
base: main
Are you sure you want to change the base?
An additional entry is added to the browser history when opening the app #67610
Conversation
2340a30
to
2a29f59
Compare
|
||
function SidePanel() { | ||
const {isSidePanelTransitionEnded, shouldHideSidePanel, sidePanelTranslateX, shouldHideSidePanelBackdrop, closeSidePanel} = useSidePanel(); | ||
|
||
useSyncSidePanelWithHistory(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure this is the right spot for this hook? It will be called even when side panel is not available/closed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I need to open it when I go forward in the browser history, then the side panel is not rendered, so the hook will not be called if I call it from HelpModal
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's the described case
Screen.Recording.2025-08-01.at.11.02.42.mov
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀 🎸
@alitoshmatov Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
@alitoshmatov can you review please? |
Explanation of Change
This PR fixes an issue where an extra history entry was added when opening the app. It was caused by the old mechanism used to sync the side panel with the browser history. Now this mechanism has been refactored using the custom history system introduced in this PR.
How does the side panel sync with browser history?
A new history entry for the side panel is added when it is displayed as RHP.
Thanks to that it's possible to open/close the side panel with the browser arrow buttons.
When the browser window is resized to the wide layout when the side panel is no longer displayed as RHP, the side panel history entry is removed.
Fixed Issues
$ #66254
PROPOSAL:
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectioncanBeMissing
param foruseOnyx
toggleReport
and notonIconClick
)src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: mWeb Chrome
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2025-08-01.at.12.23.06.mov
Screen.Recording.2025-08-01.at.12.18.52.mov
Screen.Recording.2025-08-01.at.12.17.17.mov
MacOS: Desktop
Screen.Recording.2025-08-01.at.12.27.54.mov