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

Replace FormInterceptor with FormSubmitObserver #382

Merged
merged 1 commit into from
Jul 18, 2022

Conversation

seanpdoyle
Copy link
Contributor

Unify <form> element submission event listening by replacing all
FormInterceptor call sites and FormInterceptorDelegate implementers,
replacing them with the FormSubmitObserver pattern.

@dhh dhh added this to the 7.1.0 milestone Sep 10, 2021
seanpdoyle added a commit to seanpdoyle/turbo that referenced this pull request Sep 30, 2021
Follow-up to hotwired#382

---

In the same style as [hotwired#382][], replace instances of
`LinkInterceptor` with `LinkClickObserver`, making the necessary
interface changes in classes that used to extend
`LinkInterceptorDelegate`.

Conditional logic that was once covered in the `LinkInterceptor` is
moved into the predicate methods of the delegates (for example, the
`FrameController.willFollowLinkToLocation` and
`FrameRedirector.willFollowLinkToLocation`).

[hotwired#382]: hotwired#382
seanpdoyle added a commit to seanpdoyle/turbo that referenced this pull request Nov 9, 2021
Follow-up to hotwired#382

---

In the same style as [hotwired#382][], replace instances of
`LinkInterceptor` with `LinkClickObserver`, making the necessary
interface changes in classes that used to extend
`LinkInterceptorDelegate`.

Conditional logic that was once covered in the `LinkInterceptor` is
moved into the predicate methods of the delegates (for example, the
`FrameController.willFollowLinkToLocation` and
`FrameRedirector.willFollowLinkToLocation`).

[hotwired#382]: hotwired#382
@dhh
Copy link
Member

dhh commented Jul 18, 2022

Worth rebasing too for 7.2.0 👍

@dhh dhh modified the milestones: 7.1.0, 7.2.0 Jul 18, 2022
seanpdoyle added a commit to seanpdoyle/turbo that referenced this pull request Jul 18, 2022
Follow-up to hotwired#382

---

In the same style as [hotwired#382][], replace instances of
`LinkInterceptor` with `LinkClickObserver`, making the necessary
interface changes in classes that used to extend
`LinkInterceptorDelegate`.

Conditional logic that was once covered in the `LinkInterceptor` is
moved into the predicate methods of the delegates (for example, the
`FrameController.willFollowLinkToLocation` and
`FrameRedirector.willFollowLinkToLocation`).

Since the recently introduced [FormLinkInterceptor][] was named after
the `LinkInterceptor`, this commit also renames that class (and its call
sites) to match the `LinkClickObserver`-suffix, along with the
`LinkInterceptorDelegate` method structure.

[hotwired#382]: hotwired#382
[FormLinkInterceptor]: hotwired@f8a94c5
seanpdoyle added a commit to seanpdoyle/turbo that referenced this pull request Jul 18, 2022
Follow-up to hotwired#382

---

In the same style as [hotwired#382][], replace instances of
`LinkInterceptor` with `LinkClickObserver`, making the necessary
interface changes in classes that used to extend
`LinkInterceptorDelegate`.

Conditional logic that was once covered in the `LinkInterceptor` is
moved into the predicate methods of the delegates (for example, the
`FrameController.willFollowLinkToLocation` and
`FrameRedirector.willFollowLinkToLocation`).

Since the recently introduced [FormLinkInterceptor][] was named after
the `LinkInterceptor`, this commit also renames that class (and its call
sites) to match the `LinkClickObserver`-suffix, along with the
`LinkInterceptorDelegate` method structure.

[hotwired#382]: hotwired#382
[FormLinkInterceptor]: hotwired@f8a94c5
Unify `<form>` element submission event listening by replacing all
`FormInterceptor` call sites and `FormInterceptorDelegate` implementers,
replacing them with the `FormSubmitObserver` pattern.
@dhh dhh merged commit 5a2029a into hotwired:main Jul 18, 2022
seanpdoyle added a commit to seanpdoyle/turbo that referenced this pull request Jul 19, 2022
Follow-up to hotwired#382

---

In the same style as [hotwired#382][], replace instances of
`LinkInterceptor` with `LinkClickObserver`, making the necessary
interface changes in classes that used to extend
`LinkInterceptorDelegate`.

Conditional logic that was once covered in the `LinkInterceptor` is
moved into the predicate methods of the delegates (for example, the
`FrameController.willFollowLinkToLocation` and
`FrameRedirector.willFollowLinkToLocation`).

Since the recently introduced [FormLinkInterceptor][] was named after
the `LinkInterceptor`, this commit also renames that class (and its call
sites) to match the `LinkClickObserver`-suffix, along with the
`LinkInterceptorDelegate` method structure.

[hotwired#382]: hotwired#382
[FormLinkInterceptor]: hotwired@f8a94c5
seanpdoyle added a commit to seanpdoyle/turbo that referenced this pull request Jul 19, 2022
Follow-up to hotwired#382

---

In the same style as [hotwired#382][], replace instances of
`LinkInterceptor` with `LinkClickObserver`, making the necessary
interface changes in classes that used to extend
`LinkInterceptorDelegate`.

Conditional logic that was once covered in the `LinkInterceptor` is
moved into the predicate methods of the delegates (for example, the
`FrameController.willFollowLinkToLocation` and
`FrameRedirector.willFollowLinkToLocation`).

Since the recently introduced [FormLinkInterceptor][] was named after
the `LinkInterceptor`, this commit also renames that class (and its call
sites) to match the `LinkClickObserver`-suffix, along with the
`LinkInterceptorDelegate` method structure.

[hotwired#382]: hotwired#382
[FormLinkInterceptor]: hotwired@f8a94c5
seanpdoyle added a commit to seanpdoyle/turbo that referenced this pull request Jul 19, 2022
Follow-up to hotwired#382

---

In the same style as [hotwired#382][], replace instances of
`LinkInterceptor` with `LinkClickObserver`, making the necessary
interface changes in classes that used to extend
`LinkInterceptorDelegate`.

Conditional logic that was once covered in the `LinkInterceptor` is
moved into the predicate methods of the delegates (for example, the
`FrameController.willFollowLinkToLocation` and
`FrameRedirector.willFollowLinkToLocation`).

Since the recently introduced [FormLinkInterceptor][] was named after
the `LinkInterceptor`, this commit also renames that class (and its call
sites) to match the `LinkClickObserver`-suffix, along with the
`LinkInterceptorDelegate` method structure.

[hotwired#382]: hotwired#382
[FormLinkInterceptor]: hotwired@f8a94c5
seanpdoyle added a commit to seanpdoyle/turbo that referenced this pull request Jul 19, 2022
Follow-up to hotwired#382

---

In the same style as [hotwired#382][], replace instances of
`LinkInterceptor` with `LinkClickObserver`, making the necessary
interface changes in classes that used to extend
`LinkInterceptorDelegate`.

Conditional logic that was once covered in the `LinkInterceptor` is
moved into the predicate methods of the delegates (for example, the
`FrameController.willFollowLinkToLocation` and
`FrameRedirector.willFollowLinkToLocation`).

Since the recently introduced [FormLinkInterceptor][] was named after
the `LinkInterceptor`, this commit also renames that class (and its call
sites) to match the `LinkClickObserver`-suffix, along with the
`LinkInterceptorDelegate` method structure.

[hotwired#382]: hotwired#382
[FormLinkInterceptor]: hotwired@f8a94c5
seanpdoyle added a commit to seanpdoyle/turbo that referenced this pull request Jul 29, 2022
Follow-up to hotwired#382

---

In the same style as [hotwired#382][], replace instances of
`LinkInterceptor` with `LinkClickObserver`, making the necessary
interface changes in classes that used to extend
`LinkInterceptorDelegate`.

Conditional logic that was once covered in the `LinkInterceptor` is
moved into the predicate methods of the delegates (for example, the
`FrameController.willFollowLinkToLocation` and
`FrameRedirector.willFollowLinkToLocation`).

Since the recently introduced [FormLinkInterceptor][] was named after
the `LinkInterceptor`, this commit also renames that class (and its call
sites) to match the `LinkClickObserver`-suffix, along with the
`LinkInterceptorDelegate` method structure.

[hotwired#382]: hotwired#382
[FormLinkInterceptor]: hotwired@f8a94c5
seanpdoyle added a commit to seanpdoyle/turbo that referenced this pull request Jul 29, 2022
Follow-up to hotwired#382

---

In the same style as [hotwired#382][], replace instances of
`LinkInterceptor` with `LinkClickObserver`, making the necessary
interface changes in classes that used to extend
`LinkInterceptorDelegate`.

Conditional logic that was once covered in the `LinkInterceptor` is
moved into the predicate methods of the delegates (for example, the
`FrameController.willFollowLinkToLocation` and
`FrameRedirector.willFollowLinkToLocation`).

Since the recently introduced [FormLinkInterceptor][] was named after
the `LinkInterceptor`, this commit also renames that class (and its call
sites) to match the `LinkClickObserver`-suffix, along with the
`LinkInterceptorDelegate` method structure.

[hotwired#382]: hotwired#382
[FormLinkInterceptor]: hotwired@f8a94c5
seanpdoyle added a commit to seanpdoyle/turbo that referenced this pull request Jul 30, 2022
Follow-up to hotwired#382

---

In the same style as [hotwired#382][], replace instances of
`LinkInterceptor` with `LinkClickObserver`, making the necessary
interface changes in classes that used to extend
`LinkInterceptorDelegate`.

Conditional logic that was once covered in the `LinkInterceptor` is
moved into the predicate methods of the delegates (for example, the
`FrameController.willFollowLinkToLocation` and
`FrameRedirector.willFollowLinkToLocation`).

Since the recently introduced [FormLinkInterceptor][] was named after
the `LinkInterceptor`, this commit also renames that class (and its call
sites) to match the `LinkClickObserver`-suffix, along with the
`LinkInterceptorDelegate` method structure.

[hotwired#382]: hotwired#382
[FormLinkInterceptor]: hotwired@f8a94c5
seanpdoyle added a commit to seanpdoyle/turbo that referenced this pull request Jul 30, 2022
Follow-up to hotwired#382

---

In the same style as [hotwired#382][], replace instances of
`LinkInterceptor` with `LinkClickObserver`, making the necessary
interface changes in classes that used to extend
`LinkInterceptorDelegate`.

Conditional logic that was once covered in the `LinkInterceptor` is
moved into the predicate methods of the delegates (for example, the
`FrameController.willFollowLinkToLocation` and
`FrameRedirector.willFollowLinkToLocation`).

Since the recently introduced [FormLinkInterceptor][] was named after
the `LinkInterceptor`, this commit also renames that class (and its call
sites) to match the `LinkClickObserver`-suffix, along with the
`LinkInterceptorDelegate` method structure.

[hotwired#382]: hotwired#382
[FormLinkInterceptor]: hotwired@f8a94c5
seanpdoyle added a commit to seanpdoyle/turbo that referenced this pull request Jul 30, 2022
Follow-up to hotwired#382

---

In the same style as [hotwired#382][], replace instances of
`LinkInterceptor` with `LinkClickObserver`, making the necessary
interface changes in classes that used to extend
`LinkInterceptorDelegate`.

Conditional logic that was once covered in the `LinkInterceptor` is
moved into the predicate methods of the delegates (for example, the
`FrameController.willFollowLinkToLocation` and
`FrameRedirector.willFollowLinkToLocation`).

Since the recently introduced [FormLinkInterceptor][] was named after
the `LinkInterceptor`, this commit also renames that class (and its call
sites) to match the `LinkClickObserver`-suffix, along with the
`LinkInterceptorDelegate` method structure.

[hotwired#382]: hotwired#382
[FormLinkInterceptor]: hotwired@f8a94c5
seanpdoyle added a commit to seanpdoyle/turbo that referenced this pull request Jul 31, 2022
Follow-up to hotwired#382

---

In the same style as [hotwired#382][], replace instances of
`LinkInterceptor` with `LinkClickObserver`, making the necessary
interface changes in classes that used to extend
`LinkInterceptorDelegate`.

Conditional logic that was once covered in the `LinkInterceptor` is
moved into the predicate methods of the delegates (for example, the
`FrameController.willFollowLinkToLocation` and
`FrameRedirector.willFollowLinkToLocation`).

Since the recently introduced [FormLinkInterceptor][] was named after
the `LinkInterceptor`, this commit also renames that class (and its call
sites) to match the `LinkClickObserver`-suffix, along with the
`LinkInterceptorDelegate` method structure.

[hotwired#382]: hotwired#382
[FormLinkInterceptor]: hotwired@f8a94c5
dhh pushed a commit that referenced this pull request Aug 1, 2022
Follow-up to #382

---

In the same style as [#382][], replace instances of
`LinkInterceptor` with `LinkClickObserver`, making the necessary
interface changes in classes that used to extend
`LinkInterceptorDelegate`.

Conditional logic that was once covered in the `LinkInterceptor` is
moved into the predicate methods of the delegates (for example, the
`FrameController.willFollowLinkToLocation` and
`FrameRedirector.willFollowLinkToLocation`).

Since the recently introduced [FormLinkInterceptor][] was named after
the `LinkInterceptor`, this commit also renames that class (and its call
sites) to match the `LinkClickObserver`-suffix, along with the
`LinkInterceptorDelegate` method structure.

[#382]: #382
[FormLinkInterceptor]: f8a94c5
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.

2 participants