[Feature] AnchroScrollTo: add support for updating the URL hash #186
Draft
antoine4livre wants to merge 1 commit intodevelopfrom
Draft
[Feature] AnchroScrollTo: add support for updating the URL hash #186antoine4livre wants to merge 1 commit intodevelopfrom
antoine4livre wants to merge 1 commit intodevelopfrom
Conversation
Export Size@studiometa/ui
Unchanged@studiometa/ui
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #186 +/- ##
===========================================
- Coverage 28.33% 28.19% -0.14%
===========================================
Files 49 49
Lines 1246 1252 +6
Branches 239 231 -8
===========================================
Hits 353 353
+ Misses 893 830 -63
- Partials 0 69 +69
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
antoine4livre
commented
Mar 21, 2024
| return; | ||
| } | ||
|
|
||
| window.location.hash = this.targetSelector; |
Contributor
Author
There was a problem hiding this comment.
Can we avoid the problem with a specified offset ?
Contributor
Author
There was a problem hiding this comment.
historyReplace({ hash: 'hello-world' });
127357f to
f99e5e1
Compare
antoine4livre
commented
Apr 11, 2024
| return; | ||
| } | ||
|
|
||
| window.location.hash = this.targetSelector; |
Contributor
Author
There was a problem hiding this comment.
historyReplace({ hash: 'hello-world' });
| * @returns {void} | ||
| */ | ||
| onClick(event) { | ||
| async onClick(event) { |
Contributor
Author
There was a problem hiding this comment.
Suggested change
| async onClick(event) { | |
| async onClick(event) { | |
| if ( | |
| this.$el.pathname !== window.location.pathname || | |
| this.$el.origin !== window.location.origin | |
| ) { | |
| return; | |
| } |
AnchorScrollTo (WIP)
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.
❓ Type of change
📚 Description
Add the update of the hash in the url after animation complete and add an option to disable it.
📝 Checklist
Feature todos
PR todos