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

Feature idea: Filtering of crops exposed within the picker #9

Open
NikRimington opened this issue Jan 28, 2021 · 2 comments
Open

Feature idea: Filtering of crops exposed within the picker #9

NikRimington opened this issue Jan 28, 2021 · 2 comments

Comments

@NikRimington
Copy link

Hey Marcin! Ace package, I can 100% see a use for this.

Just a small idea... I think most people generally only have 1 image cropper defined (I know I generally do).

It would be cool if the Pre-Value editor allowed you to choose which Crops from the picked image cropper are exposed to the end user.

My thoughts are in the PreValue you first pick the image cropper, as you've demoed, then you get presented with all the crops and can toggle on the ones you want to be available to the end users (maybe with a button to toggle them all off/on in one go)

@mzajkowski
Copy link
Owner

Hey @NikRimington!

Thanks for your comment. Interesting idea and if you see a use-case with it, we may have a think about it. If I understand correctly, you want to "filter" the list of all crops and show/hide specific ones for the specific doctype property or parameter value?

It might be a simple include/exclude setting as you've suggested. The challenging part will be around the changing process of the crops itself as it'd require change on multiple data types. My reasoning when I created this package initially was to stop doing changes in multiple places and e.g. try to reflect all the aliases in the code or conditions etc.

No matter what, interesting idea. Happy to open it for contribution too :) But will give it a go when we'll find some time to work on it.

@NikRimington
Copy link
Author

Well, the scenario I'm thinking of is this:

We have an ImageCropper with 15 different crops defined on it. So that any media item (image type) has them all defined.

Some of these are for Banners -> Editors should never be able to choose this crop because it only works on banners.
Some of these are for "content" -> E.g. Square 100x100, Rectangle 600x200 ... Editors should be able to pick either of these depending on where they are using the image on their page. It might be in a full width column, or with text next to it. Or the underlying image might just be better suited to being square rather than rectangle... but this to me is a valid choice for the editor.

However the editor also can't pick, "Blog Preview" crop, or "Product Preview" crop as these have specific use cases....

Does that make sense?

Why would it require change on multiple data types btw? I'm not sure I get that bit? If I find time I'll try and have a play and see what I can mock up :-)

@mzajkowski mzajkowski changed the title Feature idea: Feature idea: Filtering of crops exposed within the picker Jan 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants