Skip to content

[FSSDK-8651] added support for user agent parser for odp #854

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 4 commits into from
Aug 21, 2023

Conversation

raju-opti
Copy link
Contributor

@raju-opti raju-opti commented Aug 21, 2023

Summary

  • added support for user agent parser for odp

Test plan

  • added new tests for validating that ua parser is being used correctly
  • tested concrete ua parser manually in browser

Issues

  • FSSDK-8651

@coveralls
Copy link

coveralls commented Aug 21, 2023

Coverage Status

coverage: 90.454% (+0.03%) from 90.425% when pulling efa6012 on raju/user-agent into 2125cde on master.

Copy link
Contributor

@mikechu-optimizely mikechu-optimizely left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some thoughts otherwise LGTM.

@raju-opti raju-opti merged commit b85af27 into master Aug 21, 2023
@raju-opti raju-opti deleted the raju/user-agent branch August 21, 2023 16:01

import { UserAgentInfo } from "./user_agent_info";

export interface IUserAgentParser {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering if we care much about this parser. What about let them inject userAgentInfo as an object or make it more general as "clientOdpInfo" letting them add beyond the user-agent info?

Copy link
Contributor Author

@raju-opti raju-opti Aug 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, we can rename the interface and add a general map<string, unknown> in the UserAgentInfo type.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A question is while we can make it flexible, we may want to pre-define a few "required" names like os-name, os-version, device-model, ... to be consistent with other SDKs. @raju-opti

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah. UserAgentInfo type already has os and device fields. We can add a few more.

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.

4 participants