backdrop / backdrop-issues

Issue tracker for Backdrop core.
144 stars 39 forks source link

[UX] Make sure that the "Access administration bar" permission is shown when the "Use administration pages" permission is shown and vice versa #6283

Open klonos opened 10 months ago

klonos commented 10 months ago

This is a follow-up to #6244.

When either permission is checked, there is a JS popup to prompt to also select the other permission:

Also allow Authenticated role the "Use the administration pages" permission? This is usually required to display any pages within the administration bar.

Also allow Authenticated role the "Access administration bar" permission? This is usually required to display any pages within the administration bar.

While only having this warning pop up when both relevant permissions are present may seem like the right approach (defensive coding really), I believe that we are sorta swiping dust under the carpet. How I would expect this to work ideally is to have the warning pop up when either of the checkboxes are checked (as it works currently) regardless of whether the counterpart checkbox is visible/present or not. So instead of basically disabling this feature when either of the checkboxes have been hidden (filtered out), which is what we've done with the PR merged for #6244, how about tweaking how the filtering works in this page, and making sure that when one of these permission rows is shown, then so is the other?

I realize that such a solution would be more elaborate, but it would work as expected without having to disable that warning (which is there for a good reason).

yorkshire-pudding commented 10 months ago

I've done this quite easily in filter_perms because they are modules so I can say if one module is shown show the other. I'm not sure how you do this with the core search. BUT, if you search for one and select the permission, then the warning still appears, and the other permission is updated if you select it: chrome_JqporddJfZ

klonos commented 10 months ago

That's not quite what I was thinking though. In the screen grab above, when you enter the search term "pages" in the filter field, the "Access administration bar" permission row is hidden from the viewport. So when the checkbox is automatically ticked, it is done in a "magic" way. I was thinking to have the row be visible, so when the checkbox is ticked is is directly visible.

yorkshire-pudding commented 10 months ago

I think you will need even more "magic" to make the JavaScript in the core search do that.