-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat: WebExperiment class #152
base: main
Are you sure you want to change the base?
Conversation
…evice id, make doFlags private
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.
Initial review, will review more soon.
return; | ||
|
||
/** | ||
* Set the previous URL for tracking back/forward navigation. Set previous URL to prevent infinite redirection loop |
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.
Is there a way we can prevent this for them?
* Get redirect URLs for flags. | ||
* @param flagKeys | ||
*/ | ||
public getRedirectUrls( |
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.
What's the use case for this function?
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.
This is for the case where the developer want to implement their own redirect handler.
* @param key | ||
* @param variant | ||
*/ | ||
public previewVariant(key: string, variant: string) { |
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.
Support previewing multiple flags/variants. Maybe we just merge this with applyVariants with another config like preview
?
* Set URL change listener to revert mutations and apply variants on back/forward navigation. | ||
* @param flagKeys | ||
*/ | ||
public setUrlChangeListener(flagKeys: string[]) { |
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.
Is this supposed to have a listener argument?
Summary
Checklist