Update history during same-page Visits#763
Merged
dhh merged 1 commit intohotwired:mainfrom Oct 19, 2022
Merged
Conversation
Closes hotwired#762 Changes made in [hotwired#601][] had unintended side-effects that prevented same-page anchor navigations from writing to the history. This commit adds a call to `Visit.updateHistory()` within `Visit.goToSamePageAnchor()` along with coverage in `src/tests/functional/navigation_tests.ts` to guard against future regressions. [hotwired#601]: hotwired#601
another-rex
referenced
this pull request
in google/osv.dev
Oct 31, 2022
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@hotwired/turbo](https://turbo.hotwired.dev) ([source](https://togithub.com/hotwired/turbo)) | [`7.2.0` -> `7.2.4`](https://renovatebot.com/diffs/npm/@hotwired%2fturbo/7.2.0/7.2.4) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | [lit](https://lit.dev/) ([source](https://togithub.com/lit/lit)) | [`2.3.1` -> `2.4.0`](https://renovatebot.com/diffs/npm/lit/2.3.1/2.4.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>hotwired/turbo</summary> ### [`v7.2.4`](https://togithub.com/hotwired/turbo/releases/tag/v7.2.4) [Compare Source](https://togithub.com/hotwired/turbo/compare/v7.2.3...v7.2.4) #### What's Changed - Update history during same-page Visits by [@​seanpdoyle](https://togithub.com/seanpdoyle) in [https://github.com/hotwired/turbo/pull/763](https://togithub.com/hotwired/turbo/pull/763) - Check last rendered location for same-page visits by [@​kevinmcconnell](https://togithub.com/kevinmcconnell) in [https://github.com/hotwired/turbo/pull/772](https://togithub.com/hotwired/turbo/pull/772) **Full Changelog**: hotwired/turbo@v7.2.2...v7.2.4 ### [`v7.2.3`](https://togithub.com/hotwired/turbo/compare/v7.2.2...v7.2.3) [Compare Source](https://togithub.com/hotwired/turbo/compare/v7.2.2...v7.2.3) ### [`v7.2.2`](https://togithub.com/hotwired/turbo/releases/tag/v7.2.2) [Compare Source](https://togithub.com/hotwired/turbo/compare/v7.2.1...v7.2.2) #### What's Changed - Fix double `before-fetch-request` dispatch during reload by [@​seanpdoyle](https://togithub.com/seanpdoyle) in [https://github.com/hotwired/turbo/pull/740](https://togithub.com/hotwired/turbo/pull/740) - Ignore UJS `<a>` clicks and `<form>` submissions by [@​seanpdoyle](https://togithub.com/seanpdoyle) in [https://github.com/hotwired/turbo/pull/744](https://togithub.com/hotwired/turbo/pull/744) - Cache PageSnapshot with original HTML from the frame's page by [@​manuelpuyol](https://togithub.com/manuelpuyol) in [https://github.com/hotwired/turbo/pull/746](https://togithub.com/hotwired/turbo/pull/746) - Fix data-turbo-action was not respected on requestSubmit() event from javascript by [@​seanpdoyle](https://togithub.com/seanpdoyle) in [https://github.com/hotwired/turbo/pull/749](https://togithub.com/hotwired/turbo/pull/749) - Reload page if failed form changes tracked content by [@​kevinmcconnell](https://togithub.com/kevinmcconnell) in [https://github.com/hotwired/turbo/pull/759](https://togithub.com/hotwired/turbo/pull/759) (Note: 7.2.1 got pushed to npm as a copy of 7.2.0 as a mistake, hence the extra jump in the tiny version). **Full Changelog**: hotwired/turbo@v7.2.0...v7.2.2 ### [`v7.2.1`](https://togithub.com/hotwired/turbo/compare/v7.2.0...v7.2.1) [Compare Source](https://togithub.com/hotwired/turbo/compare/v7.2.0...v7.2.1) </details> <details> <summary>lit/lit</summary> ### [`v2.4.0`](https://togithub.com/lit/lit/blob/HEAD/packages/lit/CHANGELOG.md#​240) [Compare Source](https://togithub.com/lit/lit/compare/847f4ba8570eb86d05be4378a3c954a941d2c063...lit@2.4.0) ##### Minor Changes - [#​3318](https://togithub.com/lit/lit/pull/3318) [`21313077`](https://togithub.com/lit/lit/commit/21313077669c19b3d631a50825b8a01dae1dd0d4) - Adds an `isServer` variable export to `lit` and `lit-html/is-server.js` which will be `true` in Node and `false` in the browser. This can be used when authoring components to change behavior based on whether or not the component is executing in an SSR context. ##### Patch Changes - [#​3320](https://togithub.com/lit/lit/pull/3320) [`305852d4`](https://togithub.com/lit/lit/commit/305852d4a4f51174301720985de98fdbf8674648) - The `lit` package now specifies and "types" export condition allowing TypeScript `moduleResolution` to be `nodenext`. - Updated dependencies \[[`21313077`](https://togithub.com/lit/lit/commit/21313077669c19b3d631a50825b8a01dae1dd0d4)]: - lit-html@2.4.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 6am on monday" in timezone Australia/Sydney, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/google/osv.dev). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC45LjEiLCJ1cGRhdGVkSW5WZXIiOiIzNC45LjEifQ==--> Co-authored-by: Rex P <106129829+another-rex@users.noreply.github.com>
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.
Closes #762
Changes made in hotwired/turbo#601 had unintended side-effects that prevented same-page anchor navigations from writing to the history.
This commit adds a call to
Visit.updateHistory()withinVisit.goToSamePageAnchor()along with coverage insrc/tests/functional/navigation_tests.tsto guard against future regressions.