-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Harmonize and fix back buttons behavior and inconsistent scroll behaviour #102
Conversation
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.
Very good point.
Please fix issues mentioned by the CI (errors and warnings) before I can merge.
@benoit74 Line 68 defines the parentSlug() method. It is not being used now hence giving CI errors. Should I remove it or keep it as it is a utility. |
a3f6f12
to
229a62c
Compare
You can (should) remove everything which is not used anymore |
Okay 👍 |
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.
Why do you need the new dataLoaded
property? You did not spoke about this new change, and we already have a vf-if
on topic
: <div v-if="topic" class="content">
? (I probably miss something)
This code runs after every change in url parameter. Screen.Recording.2024-03-04.at.8.54.21.PM.movIf we use |
Perfect, then your fix is appropriate. Could you fix CI (again, sorry)? Do you have activate pre-commit with |
No, thanks for the info. I will install |
9854445
to
315e523
Compare
315e523
to
45235bf
Compare
@benoit74 I have made the requested changes. Please check |
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.
Still one CI issue around the scrollTo
property of Vue.Router.
You should probably import the ScrollPositionCoordinates
from vue-router and use this to indicate the proper type. Something like { top: 0, behavior: 'instant' } as ScrollPositionCoordinates
would probably do the trick (just run yarn build
locally to confirm, it should probably reproduce the issue).
See https://github.com/vuejs/router/blob/8618943e3c4e671da1ff3a32764a910db5835331/packages/router/src/scrollBehavior.ts#L45 and https://github.com/vuejs/router/blob/8618943e3c4e671da1ff3a32764a910db5835331/packages/router/src/scrollBehavior.ts#L11
@benoit74 I went through it. For some reason, |
Good luck, this might be a nasty Typescript issue ... |
Looking at the issue you found (good work!) it looks like |
@benoit74 scroll-behavior default value is If we change that globally in style.css. then we can use |
OK, then let's go for |
changed it to smooth and updated the pr |
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.
LGTM
Fixes #72
Issue 1 - Clicking browser back button after going from root page to some topic page is not taking me back to root page
issue72problem1.mov
Solution - In HomePage , watch params. If topic changes and is undefined then assign it the rootSlug value
Issue 2 - Clicking App Back Icon is pushing a new page with parent slug
issue72problem2.mov
Solution - It should be consistent with browser back button endless ui
After fixing the issue
issue72solution.mov
Update[4th commit]- Fixed Inconsistent Scroll Behaviour
After trying a lot of solutions,
for now this seems to be the best one without a big change in router configuration or project structure.
fixedInconsistentScrollBehaviour.mov