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

Adds append_unless_duplicate and prepend_unless_duplicate #478

Closed
wants to merge 1 commit into from
Closed

Adds append_unless_duplicate and prepend_unless_duplicate #478

wants to merge 1 commit into from

Conversation

dcyoung-dev
Copy link

When appending or prepending content we want to control what
the action should do if there are already matching elements
on the page.
This is especially true when responding and broadcasting streams
contain the same data.

Additional actions added to skip the action if elements are
already present. In this case it would be recommended to use
the replace action.

When appending or prepending content we want to control what
the action should do if there are already matching elements
on the page.
This is especially true when responding and broadcasting streams
contain the same data.

Additional actions added to skip the action if elements are
already present. In this case it would be recommended to use
the `replace` action.
seanpdoyle added a commit to seanpdoyle/turbo that referenced this pull request Nov 26, 2021
Closes hotwired#478
Closes hotwired#477

As an alternative to continuing to introduce support for more varied and
specialized `<turbo-stream action="...">` values, this commit exports
the `StreamActions` module from the root-module in order to provide
applications with direct access.

Applications can add new actions or override existing actions, so long
as they adhere to the `StreamAction` interface: a function whose `this`
context is an instance of `StreamElement`.
seanpdoyle added a commit to seanpdoyle/turbo that referenced this pull request Nov 26, 2021
Closes hotwired#478
Closes hotwired#477

As an alternative to continuing to introduce support for more varied and
specialized `<turbo-stream action="...">` values, this commit exports
the `StreamActions` module from the root-module in order to provide
applications with direct access.

Applications can add new actions or override existing actions, so long
as they adhere to the `StreamAction` interface: a function whose `this`
context is an instance of `StreamElement`.
@seanpdoyle
Copy link
Contributor

As an alternative to broadening official support for more turbo-stream[action] values, I've opened #479 to explore other options.

@dcyoung-dev
Copy link
Author

Closed in favour of #479

seanpdoyle added a commit to seanpdoyle/turbo that referenced this pull request Jul 18, 2022
Closes hotwired#478
Closes hotwired#477

As an alternative to continuing to introduce support for more varied and
specialized `<turbo-stream action="...">` values, this commit exports
the `StreamActions` module from the root-module in order to provide
applications with direct access.

Applications can add new actions or override existing actions, so long
as they adhere to the `StreamAction` interface: a function whose `this`
context is an instance of `StreamElement`.
seanpdoyle added a commit to seanpdoyle/turbo that referenced this pull request Jul 18, 2022
Closes hotwired#478
Closes hotwired#477

As an alternative to continuing to introduce support for more varied and
specialized `<turbo-stream action="...">` values, this commit exports
the `StreamActions` module from the root-module in order to provide
applications with direct access.

Applications can add new actions or override existing actions, so long
as they adhere to the `StreamAction` interface: a function whose `this`
context is an instance of `StreamElement`.
seanpdoyle added a commit to seanpdoyle/turbo that referenced this pull request Jul 18, 2022
Closes hotwired#478
Closes hotwired#477

As an alternative to continuing to introduce support for more varied and
specialized `<turbo-stream action="...">` values, this commit exports
the `StreamActions` module from the root-module in order to provide
applications with direct access.

Applications can add new actions or override existing actions, so long
as they adhere to the `StreamAction` interface: a function whose `this`
context is an instance of `StreamElement`.
seanpdoyle added a commit to seanpdoyle/turbo that referenced this pull request Jul 18, 2022
Closes hotwired#478
Closes hotwired#477

As an alternative to continuing to introduce support for more varied and
specialized `<turbo-stream action="...">` values, this commit exports
the `StreamActions` module from the root-module in order to provide
applications with direct access.

Applications can add new actions or override existing actions, so long
as they adhere to the `StreamAction` interface: a function whose `this`
context is an instance of `StreamElement`.
dhh pushed a commit that referenced this pull request Jul 18, 2022
Closes #478
Closes #477

As an alternative to continuing to introduce support for more varied and
specialized `<turbo-stream action="...">` values, this commit exports
the `StreamActions` module from the root-module in order to provide
applications with direct access.

Applications can add new actions or override existing actions, so long
as they adhere to the `StreamAction` interface: a function whose `this`
context is an instance of `StreamElement`.
Challenge-Guy pushed a commit to Challenge-Guy/turbo-cfm1 that referenced this pull request Mar 8, 2025
Closes hotwired/turbo#478
Closes hotwired/turbo#477

As an alternative to continuing to introduce support for more varied and
specialized `<turbo-stream action="...">` values, this commit exports
the `StreamActions` module from the root-module in order to provide
applications with direct access.

Applications can add new actions or override existing actions, so long
as they adhere to the `StreamAction` interface: a function whose `this`
context is an instance of `StreamElement`.
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