You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, Store on WordPress.com uses a simple upload component to upload images. Part of the original designs intended to use the media modal, but we left it out of the initial implementation.
I dug down the rabbit hole again to see how difficult it would be to implement the modal now. It looks like we have some "prior art" now with site icon management (https://wordpress.com/settings/general/:site), which I don't believe existed before.
The site icon implements post-editor/media-modal which works OK for selecting a single image, but if you try to allow multiple item selection, the modal takes you through gallery settings and some other screens which are not really applicable outside of the post context.
I think we could role our own media modal component that implements MediaLibrary, and keeps us out of some of the views we don't want. We can also make it return selected image data in a form that's more useful for passing to WooCommerce API endpoints.
I think this will take a bit of work (probably a few days to get working as a replacement), so I'm still going to implement product categories the way we have product images implemented right now. But I wanted to log this as a potential improvement that we might want to tackle down the road as a replacement for the current component.
This issue has been marked as stale and will be closed in seven days. This happened because:
It has been inactive in the past 9 months.
It isn't a project or a milestone, and hasn’t been labeled `[Pri] Blocker`,
`[Pri] High`, `[Status] Keep Open`, or `OSS Citizen`.
You can keep the issue open by adding a comment. If you do, please provide additional context and explain why you’d like it to remain open. You can also close the issue yourself — if you do, please add a brief explanation.
Right now, Store on WordPress.com uses a simple upload component to upload images. Part of the original designs intended to use the media modal, but we left it out of the initial implementation.
I dug down the rabbit hole again to see how difficult it would be to implement the modal now. It looks like we have some "prior art" now with site icon management (https://wordpress.com/settings/general/:site), which I don't believe existed before.
The site icon implements post-editor/media-modal which works OK for selecting a single image, but if you try to allow multiple item selection, the modal takes you through gallery settings and some other screens which are not really applicable outside of the post context.
I think we could role our own
media modal
component that implementsMediaLibrary
, and keeps us out of some of the views we don't want. We can also make it return selected image data in a form that's more useful for passing to WooCommerce API endpoints.Related: #14760.
The text was updated successfully, but these errors were encountered: