Skip to content
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

Resolve Issue #747 #749

Merged
merged 1 commit into from
Oct 8, 2022
Merged

Resolve Issue #747 #749

merged 1 commit into from
Oct 8, 2022

Conversation

seanpdoyle
Copy link
Contributor

Closes #747

Prior to this commit, <turbo-frame> elements navigated by [data-turbo-frame] attributes were not promoted into Visits if navigation initiator (a <form> element, for example) had another <turbo-frame> as its ancestor.

To resolve that issue, this commit adds the
proposeVisitIfNavigatedWithAction method to the FrameElementDelegate interface.

Instead of tracking which FrameElement would navigate as a Visit through an internal frame?: FrameElement property, the FrameController methods reach through the FrameElement instance that's resolved by the FrameController.findFrameElement method to delegate navigation promotion to that frame's delegate instead of to itself.

Closes hotwired#747

Prior to this commit, `<turbo-frame>` elements navigated by
`[data-turbo-frame]` attributes were not promoted into Visits if
navigation initiator (a `<form>` element, for example) had another
`<turbo-frame>` as its ancestor.

To resolve that issue, this commit adds the
`proposeVisitIfNavigatedWithAction` method to the `FrameElementDelegate`
interface.

Instead of tracking _which_ `FrameElement` would navigate as a `Visit`
through an internal `frame?: FrameElement` property, the
`FrameController` methods **reach through** the `FrameElement` instance
that's resolved by the `FrameController.findFrameElement` method to
delegate navigation promotion to **that frame's delegate** instead of to
itself.
@dhh dhh merged commit b3facd8 into hotwired:main Oct 8, 2022
another-rex referenced this pull request in google/osv.dev Oct 31, 2022
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@hotwired/turbo](https://turbo.hotwired.dev)
([source](https://github.com/hotwired/turbo)) | [`7.2.0` ->
`7.2.4`](https://renovatebot.com/diffs/npm/@hotwired%2fturbo/7.2.0/7.2.4)
|
[![age](https://badges.renovateapi.com/packages/npm/@hotwired%2fturbo/7.2.4/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/@hotwired%2fturbo/7.2.4/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/@hotwired%2fturbo/7.2.4/compatibility-slim/7.2.0)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/@hotwired%2fturbo/7.2.4/confidence-slim/7.2.0)](https://docs.renovatebot.com/merge-confidence/)
|
| [lit](https://lit.dev/) ([source](https://github.com/lit/lit)) |
[`2.3.1` -> `2.4.0`](https://renovatebot.com/diffs/npm/lit/2.3.1/2.4.0)
|
[![age](https://badges.renovateapi.com/packages/npm/lit/2.4.0/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/lit/2.4.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/lit/2.4.0/compatibility-slim/2.3.1)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/lit/2.4.0/confidence-slim/2.3.1)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>hotwired/turbo</summary>

### [`v7.2.4`](https://github.com/hotwired/turbo/releases/tag/v7.2.4)

[Compare
Source](https://github.com/hotwired/turbo/compare/v7.2.3...v7.2.4)

#### What's Changed

- Update history during same-page Visits by
[@&#8203;seanpdoyle](https://github.com/seanpdoyle) in
[https://github.com/hotwired/turbo/pull/763](https://github.com/hotwired/turbo/pull/763)
- Check last rendered location for same-page visits by
[@&#8203;kevinmcconnell](https://github.com/kevinmcconnell) in
[https://github.com/hotwired/turbo/pull/772](https://github.com/hotwired/turbo/pull/772)

**Full Changelog**:
hotwired/turbo@v7.2.2...v7.2.4

###
[`v7.2.3`](https://github.com/hotwired/turbo/compare/v7.2.2...v7.2.3)

[Compare
Source](https://github.com/hotwired/turbo/compare/v7.2.2...v7.2.3)

### [`v7.2.2`](https://github.com/hotwired/turbo/releases/tag/v7.2.2)

[Compare
Source](https://github.com/hotwired/turbo/compare/v7.2.1...v7.2.2)

#### What's Changed

- Fix double `before-fetch-request` dispatch during reload by
[@&#8203;seanpdoyle](https://github.com/seanpdoyle) in
[https://github.com/hotwired/turbo/pull/740](https://github.com/hotwired/turbo/pull/740)
- Ignore UJS `<a>` clicks and `<form>` submissions by
[@&#8203;seanpdoyle](https://github.com/seanpdoyle) in
[https://github.com/hotwired/turbo/pull/744](https://github.com/hotwired/turbo/pull/744)
- Cache PageSnapshot with original HTML from the frame's page by
[@&#8203;manuelpuyol](https://github.com/manuelpuyol) in
[https://github.com/hotwired/turbo/pull/746](https://github.com/hotwired/turbo/pull/746)
- Fix data-turbo-action was not respected on requestSubmit() event from
javascript by [@&#8203;seanpdoyle](https://github.com/seanpdoyle) in
[https://github.com/hotwired/turbo/pull/749](https://github.com/hotwired/turbo/pull/749)
- Reload page if failed form changes tracked content by
[@&#8203;kevinmcconnell](https://github.com/kevinmcconnell) in
[https://github.com/hotwired/turbo/pull/759](https://github.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://github.com/hotwired/turbo/compare/v7.2.0...v7.2.1)

[Compare
Source](https://github.com/hotwired/turbo/compare/v7.2.0...v7.2.1)

</details>

<details>
<summary>lit/lit</summary>

###
[`v2.4.0`](https://github.com/lit/lit/blob/HEAD/packages/lit/CHANGELOG.md#&#8203;240)

[Compare
Source](https://github.com/lit/lit/compare/[email protected])

##### Minor Changes

- [#&#8203;3318](https://github.com/lit/lit/pull/3318)
[`21313077`](https://github.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

- [#&#8203;3320](https://github.com/lit/lit/pull/3320)
[`305852d4`](https://github.com/lit/lit/commit/305852d4a4f51174301720985de98fdbf8674648)
- The `lit` package now specifies and "types" export condition allowing
TypeScript `moduleResolution` to be `nodenext`.

- Updated dependencies
\[[`21313077`](https://github.com/lit/lit/commit/21313077669c19b3d631a50825b8a01dae1dd0d4)]:
    -   [email protected]

</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://github.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 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

data-turbo-action is not respected on requestSubmit() event from javascript
2 participants