FIX / Restore the "include sub-groups' members" toggle - #25289
Conversation
stonebuzz
left a comment
There was a problem hiding this comment.
The UI bothers me a little.
Having the filter displayed here, especially across two lines, doesn’t feel very clean or consistent from a UI perspective.
I would suggest moving the filter to this location instead (IMHO):
This would probably require adapting/improving glpi/templates/components/datatable.html.twig to support the configuration of additional filters that can be handled directly by the datatable.
It will require a bit of work, but I think it could be a worthwhile improvement, as this mechanism could potentially be reused in other contexts as well.
What do you think, @cconard96 ?
IMO The filters make more sense above or inline with the pager text ("Showing 1 to X of X rows"), but certainly not above the form to add a user to the group. I also don't really like the idea of having some filters always showing and others hidden behind a button, but datatable only supports filters directly tied to specific columns so not much we can do without redoing all of it. At the very least, I suggest placing the filter after the "add user" form and making sure the form, recursive filter, and results are visually separated with a horizontal rule or border. |
|
close/reopen to force snyk to give details about its fail. |
|
I moved the toggle below the "add user" form, added an Proposed follow-up for the datable integration - @stonebuzz 's suggestion - rather than a full filter-engine rework, add a lightweight, reusable slot to
The caller just builds the control HTML and passes in it :
This keeps the toggle visually inside the datatable, aligned with the pager and separated from the results, and the slot can be reused by any other list that needs a non-column filter. A fully structured config ( I ping @AdrienClairembault to have his opinion. |
trasher
left a comment
There was a problem hiding this comment.
LGTM from a code point of view
1721b1b
into
glpi-project:11.0/bugfixes
Description
glpi_groups_usersrecord, labelled by its own "Group" column. This PR does not change that behavior —clearDuplicatedGroupData()stays disabled, as decided at the time.However, for the sake of clarity on the end-user side, it was decided to restore a Yes/No toggle so admins can choose for themselves whether they want that aggregated, sub-groups-included view at all, rather than always having it forced on them. Care was taken to preserve any active column filter (Manager, Dynamic, Delegatee).
Screenshots :