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

Refactor Media Picker configuration #8471

Closed
bjarnef opened this issue Jul 24, 2020 · 4 comments
Closed

Refactor Media Picker configuration #8471

bjarnef opened this issue Jul 24, 2020 · 4 comments

Comments

@bjarnef
Copy link
Contributor

bjarnef commented Jul 24, 2020

At the moment Media Picker has a "Pick multiple items" to decide whether to picker should be a multi picker or not.

image

However many other pickers like Multi URL Picker and MNTP have "Minimum" and "Maximum" prevalues to configurate the picker as multi picker. I think this is more flexible since you can configurate the picker to allow selecting up to e.g. 3 or 10 images instead or unlimited number of images.

Furthermore it has a "Pick only images" property and "Disable folder select". I think these could be consolidated to a single prevalue to select media type similar to "Allow items of type" in MNTP-configuration.

image

This was referenced Jul 24, 2020
@nul800sebastiaan
Copy link
Member

That's great but we somehow need to keep exposing "is multiple" everywhere since there is code relying on that boolean.. so you'd need to combine the min = 0 and max = 1 to "is multiple == false" or something.

Same for pick only images / disable folder select.

Might be better to make a v2 picker.. Not sure. We learned it's a pain to have "v2" pickers, people don't understand what the difference is, panic, then try to switch to the new version, losing data, getting sad.

@nul800sebastiaan nul800sebastiaan added the state/needs-investigation This requires input from HQ or community to proceed label Jul 27, 2020
@bjarnef
Copy link
Contributor Author

bjarnef commented Jul 27, 2020

Would it be possible via a migration to update max to 1 is multipicker was false? Otherwise it could leave both min and max with value zero (multi picker and unlimited), which is default in media picker.

This might be a "easy" change and er could then look at only images / disable folder select later and whether we need to make a v2 picker or something else.

@nul800sebastiaan
Copy link
Member

Yep, I think a migration like that would be fine since it doesn't need to update any content.

And then indeed it would be cool to have "allow items of type" in a later iteration, maybe v2. I am not sure how we enforce "Pick only images" property and "Disable folder select" at the moment, maybe it can be migrated too if we only rely on the built-in Folder and Image datatypes, not sure.

@nul800sebastiaan
Copy link
Member

I think this is all covered now in the mediapicker v3! I'll close this one.

@nul800sebastiaan nul800sebastiaan removed the state/needs-investigation This requires input from HQ or community to proceed label May 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants