-
Notifications
You must be signed in to change notification settings - Fork 218
fix(layout): preserve user-set play URL parameter in ring layouts #849
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
base: master
Are you sure you want to change the base?
Conversation
| if play_ms != 0: | ||
| play_value = play_ms | ||
| elif 'play' in g._url_params: | ||
| play_value = g._url_params['play'] |
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.
Can we parse the play value or make sure it has a valid format?
aucahuasi
left a comment
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.
aucahuasi
left a comment
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.
Thanks, can you add some tests as well?
|
|
||
| if play_ms != 0: | ||
| play_value = play_ms | ||
| elif 'play' in g._url_params: |
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 looks wrong - if 0 is set, we should respect it
I can imagine changing the type signature to : Optional[int] = 0, and having None mean "honor url param if already set, otherwise default to 0", but that feels unnecessarily complicated
|
See comment for cleaner way to support cascading - do when None Also I thought we have 3-4 ring layout variants ? |
Fixes issue where &play option does not update in URL param