Skip to content

Conversation

@bockets
Copy link

@bockets bockets commented Feb 10, 2025

Addresses #2025

What are you trying to accomplish?

Rails sets the format for turbo_stream responses to turbo_stream, which then falls back to the html format. ViewComponents need to do the same so that variants are correctly selected.

What approach did you choose and why?

This is a hack to unblock us from using ViewComponents with variants in production, so it's pretty hacky at the moment.

Anything you want to highlight for special attention from reviewers?

I hope this sparks further discussion from maintainers who are more familiar with best practices for what's going on here.

Rails sets the format for `turbo_stream` responses to `turbo_stream`, which then falls back to the `html` format. ViewComponents need to do the same.
@bockets bockets marked this pull request as draft February 10, 2025 20:40
@bockets
Copy link
Author

bockets commented Feb 10, 2025

Closing since this is already working on the v4 branch.

@bockets
Copy link
Author

bockets commented Feb 11, 2025

Closing since this is already working on the v4 branch.

I was mistaken, this actually isn't yet fixed on the v4 branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant