Closed hirasso closed 2 years ago
I love the added doc comments, we should look into slowly adding those to the core as well and start generating type definitions.
Ready for a new version I would say! 🍾
Feel free to create a PR for the version bump! We still have to add the version bump action to all the plugins.
Will this be a breaking change? Since we're restoring a different value for scroll restoration. Or we wait until we figure out scrolling when animateHistoryBrowsing
is enabled and bump the major version then.
No, this is not introducing breaking changes. The scroll position of the next (link-click) page is always being reset, if not overwritten by shouldResetScrollPosition
. Let's handle animateHistoryBrowsing
in the next release.
Sems like I can't run the workflow here?
Perfect, let's bump minor now and major if we ever tackle animated history browsing.
Yeah, the workflow only exists on the core repo for now. You need to create a PR after running npm version.
With a fresh mind I did some cleanup and tested it again. Works great for me!
While adding more JSDoc to the code, I noticed this in
unmount()
:This should not be hardcoded, since the scrollRestoration could have been already altered before the plugin was initialized. So I saved the previous value and reset it in
unmount()
like so:I hope it's ok that this became part of this PR.