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

[pull] dev from opf:dev #56

Merged
merged 7 commits into from
Oct 3, 2023
Merged

[pull] dev from opf:dev #56

merged 7 commits into from
Oct 3, 2023

Conversation

pull[bot]
Copy link

@pull pull bot commented Oct 2, 2023

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

aaron-contreras and others added 7 commits September 28, 2023 17:48
Given I attempt to remove a component via a turbo stream, this resulted
in a

```
"You need to wrap your component in a `component_wrapper` block in order to use the turbo-stream methods"
```

error. This is due to the component template not being rendered and
the `@component_wrapped_used` instance variable not being set (because
the `component_wrapper` invocation in the component template is never
called.

The proposed fix for this is to render JUST the `component_wrapper` (without
its block content) in order to get the dom id that needs removal
and turbo streams is able to do its magic.

This is achieved by providing a `@wrapper_only` flag so when the
`component_wrapper` method is called within the component's template,
only the wrapper tag is rendered, making it enough to perform a
successful turbo stream removal of the component by handling this
case with the short circuit. We don't really care in this case about
rendering the entire component given all we care about is that
outer tag.
The variable assignment was removed in 80192f6
…r-turbo-stream-response

Fix `:remove` action for component turbo stream responses
@pull pull bot added the ⤵️ pull label Oct 2, 2023
@pull pull bot merged commit b965eec into l3dlp-sandbox:dev Oct 3, 2023
8 checks passed
pull bot pushed a commit that referenced this pull request Mar 8, 2024
Add support for global push events using system hook
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants