-
Notifications
You must be signed in to change notification settings - Fork 22
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
Expose userAgent as get only property #75
Expose userAgent as get only property #75
Conversation
Thanks for this @jpsphaxer! I'm all for making this property get-able, too. My only concern is the name. I'm thinking we might want to rename the getter to something that makes it obvious this is only the part provided by Hotwire Native and not the system. I'm open to ideas on what a good name might be. |
what do you think of |
Maybe even just What do you think @svara? |
yeah good call - I like that. I'll update the PR once we have consensus on the naming |
@joemasilotti - went ahead and updated the naming to |
Sorry for late reply. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nicely done @jpsphaxer 👏🏻
FYI, we've decided to rename |
Expose User Agent String in HotwireConfig
Motivation
Previously in TurboNavigator, we could access the user agent string through TurboConfig. This functionality was lost in the migration to HotwireNative. Applications often need to maintain consistent user agent strings across different components (HTTP clients, web views, etc.) to ensure proper tracking and identification.
Changes
userAgent
property to HotwireConfigTesting
Added
HotwireConfigTests
with coverage for user agent string generation.No breaking changes were introduced.