Here is a prototype for the feature request: Hide empty fields (specifically relation collection fields). I hope something similar will be implemented by Fibery soon.
How:
Add a checkbox field (name e.g. HideEmptyFields)
Add the following css to either FiberFlow, Stylus or similar browser extension:
/* Hide empty relation fields when ShowEmptyFields checkbox is unchecked */
div:has(.checkbox.uxtwros) div.relation_views_field_container:has(.AKTree:not(:has([data-react-beautiful-dnd-draggable]))) {
display: none;
}
Fancy:
For sliding in and out effect, use this ccs instead of the one above:
/* Default: Ensure relation fields are visible and ready for animation */
div.relation_views_field_container {
max-height: 1000px; /* Large enough to accommodate most fields */
opacity: 1;
overflow: hidden;
transition: max-height 0.7s ease-in-out, opacity 0.7s ease-in-out;
}
/* Hide empty relation fields with slide-up animation when ShowEmptyFields is unchecked */
div:has(.checkbox.uxtwros) div.relation_views_field_container:has(.AKTree:empty) {
max-height: 0;
opacity: 0;
overflow: hidden;
}
Hi Yuri, thanks for this. The fancy version works for me, but the standard doesn’t. However, I have other checkboxes and it chooses a random one to use. Is there a way to set it to work with a specific checkbox?
Thats an issue I saw indeed. The problem is that the checkbox field in fibery does not have unique class assigned meaning that another checkbox field triggers the same showing hiding. So checkboxes are a bad solution. I have not thought about it further but did you try the Fibery Tweak of @derbenoo ?
UPDATE: Thanks for pointing this out, I had a bug in my latest update I fixed it, all you have to do is to uninstall and then reinstall the tweak!
Original answer (still useful):
Hey @Bronn, thanks for trying out the extension! The most likely issue is that there is no Fibery tab. The extension needs to communicate with at least one open Fibery tab in order to load all available fields of the workspace.
I added a warning at the bottom in version 1.4.0 that shows and explains the error to the user. If you are on version 1.4.0, did you see such a warning at the bottom of the extension popup?
I can confirm the update is working! Thank you, @derbenoo.
It might be a good idea to write in an export/import feature for settings as more tweaks are created. (Unless there is one already and I missed it - I didn’t need it in this instance so I only had a quick look to see if the option was there.)
You are spot on - I have not implemented a update mechanism for tweaks, so user settings get lost. That one is still on my TODO list, will be part of the next update
Thanks for working at this ‘Hide Empty Collections’ tweak, I tested it today and see that you allowed in this tweak to select which specific collection field to target. Thats neat!
However I have many fields with similar names that show up.
It would be great to have a ‘select all’ button?
just wanted to let you know that you can now select multiple fields at once inside a Fibery Tweak You can search for the fields you want to hide and then press “select all” to select all search results. Hope this saves you some clicks