-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Dynamic playlist tag support (amp-brid-player) #21264
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here (e.g. What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
CLA signed. |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
@@ -49,7 +49,10 @@ tags: { # <amp-brid-player> | |||
attrs: { | |||
name: "data-playlist" | |||
mandatory_oneof: "['data-outstream', 'data-playlist', 'data-video']" | |||
value_regex: "[0-9]+" |
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.
I see in the example that data-playlist
has text which may be why this restriction is being removed. However removing this restriction allows the value to be anything (including nothing). That doesn't seem ideal. Would (\\d|\\w)+
be sufficient for a valid value? Are there other valid characters in a non-id playlist name?
May also need to update the documentation for data-playlist
stating what is allowed. Currently it states ID
which till now was just a number.
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.
Would it be OK if we put .+
because we would like to enable users to put anything there? Will update the documentation as you suggested. Thanks.
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.
That is fine. I just want to be sure it's what one would want as it's to prevent someone from doing something wrong unintentionally.
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.
The requested changes are implemented now.
HI @grajzer. Thanks for contributing. I see this only makes validator changes. I assume this is already handled in the current amphtml/extensions/amp-brid-player/0.1/amp-brid-player.js Lines 105 to 126 in 0389aa3
If so, we should probably rename |
Hi @alanorozco, you're right... everything was already handled there and we only need to fix the validation. The itemsNum really tells how many items to request from our backend and can be 1 or 10, so it would be great if we can keep the name:
Thanks for taking a look. |
Right! I confused myself with the param order. Nothing on my end from the runtime side, just waiting for validation approval so I can merge. 👍 |
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.
validation looks good
Hi guys, need to ask if I have to do anything else, or you're going to take the merging/deploying process from here? If latter, how long it usually take for code to go live? This is my first change, so please don't mind the question. |
- cl/239414441 Revision bump for #21463 - cl/239234304 Add deprecation warning for manufactured body caused by non-ASCII whitespace. - cl/239228383 Explicitly disallow `<template>` outside the document `<body>`. - cl/239220081 Add a feature test case for a non-amp document. - cl/239050986 Revision bump for #21459 - cl/239048160 Fix corner case of ancestor marker tracking. - cl/238487968 Revision bump for #21107 - cl/238483735 Revision bump for #21264
Added support for tags in dynamic playlists, and updated documentation for new attribute (ampproject#19190)
- cl/239414441 Revision bump for ampproject#21463 - cl/239234304 Add deprecation warning for manufactured body caused by non-ASCII whitespace. - cl/239228383 Explicitly disallow `<template>` outside the document `<body>`. - cl/239220081 Add a feature test case for a non-amp document. - cl/239050986 Revision bump for ampproject#21459 - cl/239048160 Fix corner case of ancestor marker tracking. - cl/238487968 Revision bump for ampproject#21107 - cl/238483735 Revision bump for ampproject#21264
Added support for tags in dynamic playlists, and updated documentation for new attribute (ampproject#19190)
- cl/239414441 Revision bump for ampproject#21463 - cl/239234304 Add deprecation warning for manufactured body caused by non-ASCII whitespace. - cl/239228383 Explicitly disallow `<template>` outside the document `<body>`. - cl/239220081 Add a feature test case for a non-amp document. - cl/239050986 Revision bump for ampproject#21459 - cl/239048160 Fix corner case of ancestor marker tracking. - cl/238487968 Revision bump for ampproject#21107 - cl/238483735 Revision bump for ampproject#21264
Added support for tags in dynamic playlists, and updated documentation for new attribute (#19190)