-
Notifications
You must be signed in to change notification settings - Fork 682
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
[feature]: Utilize graphql returned color for swatches #1633
Labels
Comments
assigned |
deiserh
added a commit
to deiserh/pwa-studio
that referenced
this issue
Feb 8, 2020
deiserh
added a commit
to deiserh/pwa-studio
that referenced
this issue
Feb 8, 2020
can go into next release but need to evaluate to ensure backwards compatibility, keeping in backlog |
2.3.5 released today, needs review |
larsroettig
pushed a commit
to deiserh/pwa-studio
that referenced
this issue
Apr 30, 2020
sirugh
added a commit
to deiserh/pwa-studio
that referenced
this issue
May 4, 2020
dpatil-magento
added a commit
to deiserh/pwa-studio
that referenced
this issue
May 7, 2020
dpatil-magento
added a commit
that referenced
this issue
May 7, 2020
* Added swatch color resolves #1633 * Added the fix to show images and added a empty fallback value to avoid not shown swatches on the category page * Uses background css property to set either color or image Signed-off-by: sirugh <[email protected]> * Use thumbnail as image if provided, else use color or fallback to default background color. * Removes fashion color swatch from filter drawer as possible aggregations from graphql do not include swatch values Signed-off-by: sirugh <[email protected]> * Fixes selected image overlay and other feedback Signed-off-by: sirugh <[email protected]> Co-authored-by: Lars Roettig <[email protected]> Co-authored-by: Stephen <[email protected]> Co-authored-by: sirugh <[email protected]> Co-authored-by: Devagouda <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Is your feature request related to a problem? Please describe.
Currently we randomize the colors in the product component because GQL does not return the hex code or any way for the UI to determine what color to display. There is an open issue for this in GQL: magento/graphql-ce#196.
Describe the solution you'd like
When the GQL issue is resolved/merged/released I would like to update our product query and swatch code to use the hex value returned.
Describe alternatives you've considered
If there was a mapping of colors returnable by the gql endpoint and hex colors we could maintain it on the UI and render a map. I don't think this is scaleable or a good idea, but it is an alternative :P
Another more realistic alternative would be to get the data from the rest endpoint instead of graphql. I'm not sure how to obtain that information or whether it even exists, but it should be a fallback incase we need to be "production ready" and don't have this data available in gql yet.
Additional context
magento/graphql-ce#196
https://github.com/magento/pwa-studio/blob/develop/packages/venia-ui/lib/components/ProductOptions/swatch.js#L58-L59
Please let us know what packages this feature is in regards to:
venia-concept
venia-ui
pwa-buildpack
peregrine
pwa-devdocs
upward-js
upward-spec
The text was updated successfully, but these errors were encountered: