-
Notifications
You must be signed in to change notification settings - Fork 28
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
fix browser history #552
fix browser history #552
Conversation
Is it intended that the patches still have a WIP: subject? |
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.
Could you add some reasoning why the playwright version needs to be downgraded? Makes it easier in the future to find out if the reason is still valid.
Hi @rschwebel! As you correctly pointed out, the patches are not cleaned up yet and won't be merged in this state. I wanted some early feedback from @m-reichle if my changes fix her problem (or I suppose yours, for that matter :) ). Also I wanted to check wether the test works in CI. While working on this, I had a lot of trouble running the browser tests locally. All calls to Playwrights |
The naming in the test modules is used to enforce a specific order of the tests `tests/test_0305_requests.py` clashed with `tests/test_0305_events.py`. Signed-off-by: Florian Scherf <mail@florianscherf.de>
Signed-off-by: Florian Scherf <mail@florianscherf.de>
The browser history of the client never *really* worked. When you were redirected to a Lona app from an external site, you couldn't go back by clicking on the back button. When you were three links into an Lona app and refreshed the tab, the history before the refresh was unreachable. Previously, both client1 and client2 created a new history entry, using `history.pushState`, when a new view started, regardless the reason of the view starting. So initial setup, refreshes, and reconnects also created history items. This is not correct! `history.pushState` should only be called when you want to *extend* the browser history, beyond the normal history behaviour. This patch limits all calls to `history.pushState` to cases of actual in-app navigation, and adds a test to check the now corrected behaviour. Signed-off-by: Florian Scherf <mail@florianscherf.de>
99f210b
to
c726709
Compare
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.
Looks good, thx!
Fixes #550