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

Question: Why flexbin dependency #1

Open
thomasmassmann opened this issue Jul 6, 2020 · 5 comments
Open

Question: Why flexbin dependency #1

thomasmassmann opened this issue Jul 6, 2020 · 5 comments
Labels
04 type: enhancement making existing stuff better

Comments

@thomasmassmann
Copy link
Member

Why is flexbin added as a hard dependency? What if people don't want that or want to use an alternative?

Also, when customizing the template (and replacing flexbin with something else), the flexbin resources will always be loaded no matter what.

So can we maybe make this optional?

@thomasmassmann
Copy link
Member Author

From another add-on:

This package does not include any CSS or JS resource to enable some nice gallery experience. You can define this in your theme package.

IMHO, this is a much better approach. Also, the CSS provided by flexbin has no idea about the Plone provided breakpoints. Since this is only a small CSS footprint, I would opt for bringing this into the default theme and provide some component classes. This way, the flexbin functionality can be used for other components too.

@MrTango MrTango added the 04 type: enhancement making existing stuff better label Jul 7, 2020
@MrTango
Copy link
Contributor

MrTango commented Jul 7, 2020

As discussed today, i like to find a way doing the activation of resources from the template, so that it is easier to override just the template and having the option to add or remove resource dependencies.

Flexbin ha a small footprint and does a great job in having the gallery with different ratios problem solved. Therefor i don't see any problem in having it activated in general, we could change that. What i don't want, is having the need for a developer or designer to use the gallery, it should look by default. But we should try to make it not to hard for developers to customize the gallery though.

@thomasmassmann
Copy link
Member Author

+1 on the template version to register required resources (same as add_resource_on_request and add_bundle_on_request do in view code). This would help a lot!

@spereverde
Copy link
Sponsor Member

Just wondering, why can't we use the card columns views from bootstrap for this instead of flexbox? It provides sort of the same masonry like look for a gallery.
https://getbootstrap.com/docs/4.0/components/card/#card-columns

@MrTango
Copy link
Contributor

MrTango commented Jan 21, 2022

@spereverde flexbin solves a different problem. When you have pictures with differend acspect ratios, bootstrap cards will look odd as the default Plone album view does. Flexbin solves this with some clever css.
On the other hand even if the bootstrap stuff would work here, it much more markup to archive the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
04 type: enhancement making existing stuff better
Projects
None yet
Development

No branches or pull requests

3 participants