Skip to content

Only load BridgeComponent controllers if the Hotwire Native user agent supports the component #5

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

Merged
merged 2 commits into from
Mar 12, 2025

Conversation

jayohms
Copy link
Contributor

@jayohms jayohms commented Mar 12, 2025

Previously, a BridgeComponent controller would always load for any Hotwire Native client app. This has backwards-compatibility concerns depending on how the BridgeComponent code was written. BridgeComponent controllers should only load for an app that explicitly supports the component via its User-Agent.

With this change, BridgeComponent controllers will only load on a client app if the component is provided as a supported bridge-component in the User-Agent.

…nt supports the bridge component. This prevents unintended backwards incompatibility side effects for older clients that don't yet support a given bridge component.
@jayohms jayohms requested a review from olivaresf March 12, 2025 13:22
@jayohms jayohms changed the title Only load bridge component controllers if the Hotwire Native user agent supports the component Only load BridgeComponent controllers if the Hotwire Native user agent supports the component Mar 12, 2025
@jayohms jayohms merged commit b0f3e99 into main Mar 12, 2025
1 check passed
@jayohms jayohms deleted the should-load-change branch March 12, 2025 18:58
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.

3 participants