Skip to content
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

Revisit product media gallery editor #236

Closed
3 tasks done
mikemurray opened this issue Mar 4, 2020 · 2 comments · Fixed by #247
Closed
3 tasks done

Revisit product media gallery editor #236

mikemurray opened this issue Mar 4, 2020 · 2 comments · Fixed by #247
Assignees
Labels
bug For issues that describe a defect or regression in the released software
Milestone

Comments

@mikemurray
Copy link
Member

mikemurray commented Mar 4, 2020

Issues

Issues that arise from the new product editor from this PR: #188

  • Reloading data after uploading an image doesn't work due to the delay from upload to converting and saving with sharp. Add full GQL support to product editor #188 (comment)

  • The display of the media might be inaccurate. The product may be showing images from the variants as well.

  • Priority field doesn't work

@janus-reith
Copy link
Contributor

Second issue here needs to be solved in reaction-api.
getProductMedia in the Products resolver needs an adapted db query where variantId should be null or not exist.
For the ProductVariant resolver there currently is no media resolver, threfore a getVariantMedia function needs to be crated which does the same thing as getProductMedia but queries by variantId

@janus-reith
Copy link
Contributor

janus-reith commented Mar 4, 2020

Media Priority can't be changed in ProductMediaItem:

setPriority(() => {
              const intValue = parseInt(event.target.value, 10);
              console.log("intValue", intValue);
              return {
                priority: isInteger(intValue) ? intValue : null
              };
});

This should return the value, not an object with key priority.

Also, Ids would need to be encoded for media actions like priority change, remove, etc an currently are not.
Might be better solution to update the api instead to only send encoded Ids instead.

@mikemurray mikemurray added this to the Admin UI milestone Mar 4, 2020
@willopez willopez self-assigned this Mar 27, 2020
@willopez willopez added bug For issues that describe a defect or regression in the released software reaction-admin labels Mar 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug For issues that describe a defect or regression in the released software
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants