-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Themes: Add site-selector modal to theme sheet #5354
Conversation
a9aa252
to
813729c
Compare
minimumFractionDigits: 0, | ||
} ); | ||
} else if ( price && price.display ) { | ||
theme.price = price.display; |
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.
Don't they all have that display
field? At least the premium ones?
I'd love if we could do without bf4a8c4, since the issue will hit us again for everything that runs |
Is that common? Seems to me like this code is wrong in translating on build. If we ever sort out i18n on the server we will want to translate dynamically, no? |
Hmm, interesting point. I guess I was inspired by copying client behavior, where IIRC Anyway, this code seems to make the PR work without bf4a8c4: https://gist.github.com/ockham/24688ac1317220c23f5e8fbdc0d9b26a |
@ockham: Should we go with bf4a8c4 or https://gist.github.com/ockham/24688ac1317220c23f5e8fbdc0d9b26a for the i18n? I don't have a strong opinion either way. |
I think the gist I posted initializes i18n at a level that's more consistent with client behavior, so I'd be inclined to go with that. |
I've applied that gist to branch Still getting following error:
Am I missing something? |
No, my bad, since I forgot to unstub However, I had another look inside Not sure if this can be cleanly mitigated by moving the init to the more localized Not entirely sure about the i18n mixin and |
Or maybe I'm overthinking :-D Turns out |
ok, I'll squash into two commits and merge. I don't think we need to worry about |
Pushed another commit to the |
1aabd15
to
cb1f396
Compare
* Add sourcePath prop to site-selector for specifying the redirect target. * Use v1.2 themes API price format in details selector to allow price to work with selector
cb1f396
to
7e5fef6
Compare
To Test
Expected: Site selector modal dialog should appear
Expected: URL will change to selected site, Thanks modal will appear
Expected: Site selector as before, which will end up at the checkout