Structuring references in the object view
Currently, the "Referenced By" tab simply displays all objects that reference. This view should now be optimized. There should be a tab view or similar, which sorts the references according to type. It should be directly visible which types are referenced.
The following functions should be given:
The "Standard" tab contains the usual current view with all elements (name "All" or similar).
Furthermore for EACH referencing type an additional tab is created, which contains the label of the type and a badge with the total number of referencing objects of this type.
In these tabs the list with the objects should be displayed normally.
Also "empty" types should get a grayed out tab, if in their configuration a reference to this type is created, but no object was created.
The object lists should be loaded only on clicking the tab - lazy-load (except the default). Their state (current page etc) should be preserved even when switching tabs.
The tabs are sorted by the number of objects within the tabs (highest first, then by name).
Additionally there should be a dropdown menu above the tabs, which makes it possible to hide tabs. This should also show the number of tabs - shown and hidden (similar columns).
If the number of tabs is longer than the "Reference By" tab allows, the tabs shall be hidden in an overflow, which is scrollable by arrows.
The ACL should be taken into account for the references.
And if the references are empty, please show a empty reference table in the all references tab. You can define some empty message string in the table module.
As discussed, we'll leave out the graying out of empty types for now.
Okay, a few odds and ends:
The scrollbar is still the same as before (screenshot).
Could we flip the hide tabs? So rename the button to Show Tabs and the active tabs will have a check mark in front of it if it is active. If not active then hide the tab (As with the Columns in the tables) - is I think more logical so.
Can you make the button right-aligned?
One more misbehavior: If you change the object view and then go back, the tabs are loaded correctly, but the all references are empty. These are then only loaded when you switch tabs
Tested. Looks pretty good at first. However, the following things do not work yet/works wrong:
"empty" types should get a grayed out tab won´t show up
If you are switching to another object the tabs will stay and not updated. ← This is important
the dropdown menu above the tabs to hide some tabs is missing
One thing which was not in the definition but would be quite nice; the total number of references next to "Referenced By" when possible.
What works well, but not looks very nice, is the scrollbar. This is a bit giant and should perhaps be replaced by an overlay or something similar. Something like here only in orange and horizontal. Or arrows left and right next to the overlay.
Last, the spacing to the left and right edges of the tabs is not quite right. I attach a screenshot to it.