-
Notifications
You must be signed in to change notification settings - Fork 506
Star rating sample using amp-selector and amp-form #558
Comments
@aghassemi A star rating should submit when the user clicks on one of the stars, so on input change. Would |
@danbri You are right, since you are using radio buttons and |
Agree with the accessibility requirements. Turns out that out of a ton of rating widgets I've evaluated, none got that reverse keyboard order right. After some hacking, I came up with this: Anyway, I'd like to make this into a proper AMP component, with easily customizable options, and one that can be deployed repeatedly on the page without having to manually change the Can we reopen the original issue? |
@dandv Looks like arrow are backwards on safari |
@dandv There is currently lots of discussions within the core team on what components make sense to be part of core and which ones should to be samples (or maybe eventually a separate layer of components outside of core). There is no hard rule, but leaning toward "if it is possible without JS/AMP runtime, let's keep it out". Maintenance cost is something we need to worry about in core but ease of use for Dev is also a factor. So it is really a balancing act and What are your thoughts on the benefits of having it as a core component? Would they outvalue the cost? |
@aghassemi: three lines of reasoning:
|
@dandv Thanks for the detailed response. I agree with your points. Let's make it an amp component. I would be happy to review the PR. |
@dandv @aghassemi Is this a good point in development to take this through design review? |
@dandv could you still create a sample for your amp star rating (until we have a proper component)? It's to good to hide it from the public... |
I can, I have the client side done, but not having experience with
|
Does the file dist/json/related_products.json exist? Otherwise you need to
run gulp build first.
…On Wed, Feb 15, 2017 at 8:26 PM Dan Dascalescu ***@***.***> wrote:
I can, I have the client side done, but not knowing go (another plea for
#400 <#400>?), I keep
running into issues with it.
$ goapp serve
INFO 2017-02-15 20:18:37,316 devappserver2.py:769] Skipping SDK update check.
INFO 2017-02-15 20:18:37,440 api_server.py:205] Starting API server at: http://localhost:36794
INFO 2017-02-15 20:18:37,781 dispatcher.py:197] Starting module "default" running at: http://localhost:8080
INFO 2017-02-15 20:18:37,781 admin_server.py:116] Starting admin server at: http://localhost:8000
ERROR 2017-02-15 20:18:41,013 http_runtime.py:396] bad runtime process port ['']
panic: open dist/json/related_products.json: no such file or directory
goroutine 1 [running]:
panic(0x8620e0, 0xc820137f20)
/home/dandv/util/go_appengine/goroot/src/runtime/panic.go:481 +0x3e6
backend.initProducts(0x996ce0, 0x1f)
backend/product-listing.go:129 +0x95
backend.InitProductListing()
backend/product-listing.go:77 +0x30
main47059.init.1()
server.go:36 +0x38
main47059.init()
server.go:75 +0x59
main.init()
_go_main.go:16 +0x45
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#558 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAXOOLrqJ0_fVOmhKJU-fMB4DOxkcB0Vks5rc19qgaJpZM4LwE_Z>
.
|
|
@dandv - i just had a thought, I think it might be easy to build on top
Here is a code pen i found by google search (i would not implement it like how they did) that uses range input for ratings https://codepen.io/catharsis/pen/vquyj Let me know what you think ! (https://css-tricks.com/styling-cross-browser-compatible-range-inputs-css/) |
Thanks @camelburrito! Agree that a range input would be more semantic, and it would make fractional/fluid stars easier. Both |
I think we might need a little JS - let me see if i can hack something quick; |
Here is the basic JS bin of what is required This is unfinished
But this is fully functional except for presentation. |
One more good thing is we can put this in a form and submit would work. |
Should be fairly straight forward to create a star rating sample using
amp-selector
andamp-form
with radio buttons.@dandv Is this something you can tackle?
The text was updated successfully, but these errors were encountered: