Allow toggling Config Enforce UI window on and off

Created on 9 February 2023, over 1 year ago
Updated 14 February 2023, over 1 year ago

Problem/Motivation

We'd like to improve the UI by splitting out the CED forms and use an off-canvas dialog as described in the parent issue, but this will take some time investment. As a stopgap, we'd like to provide an easy way to just toggle the "floaty window" interface easily.

Proposed resolution

Add a javascript toggle behaviour to the "floaty window" that will add/remove `display: none` to the relevant div.

Remaining tasks

  • Add a test to toggle the UI on and off
  • Add a simple javascript toggle button
  • User interface changes

    A new "toggle" button for CED UI that allows users to hide and unhide the CED form.

✨ Feature request
Status

Closed: duplicate

Version

1.0

Component

User interface

Created by

πŸ‡¨πŸ‡¦Canada spiderman Halifax, NS

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @spiderman
  • πŸ‡¨πŸ‡¦Canada Ambient.Impact Toronto

    What I'm wondering is how to approach this from a UI point of view. Do we want a toggle on every form page that can be/is enforced? If so, where do we place it so it doesn't get in the way? Can we insert it into the form itself inline, or should it also float above stuff? I have other questions, but this seems like the first things to ask before we get into implementation details.

  • πŸ‡¨πŸ‡¦Canada spiderman Halifax, NS

    I agree, it's a tricky question. I was imagining a X icon in the "floaty window" itself, when it's present. The harder part seems to be how you bring it back- where does the button go? One option could be that it just disappears, but the "floaty window" reappears the next time you reload the page- this could probably go a long way to improving the UX for a developer. Most of the time, when I find this thing in the way, it's temporary- I need to see the rest of the config page I'm on better, but once those settings are back, I don't mind the CED form returning.

    Alternately, maybe we can collapse down to a micro-version of the floaty window (the CE logo?), to minimize its overlap with anything else on the page. Again, we're looking for a quick and dirty stopgap here more than anything, until we can invest the time to refactor the floaty window into its own off-canvas dialog (and separate form).

  • πŸ‡¨πŸ‡¦Canada Ambient.Impact Toronto

    @spiderman Other than the floating part, you're basically just describing the behaviour of a a '#type' => 'details'. πŸ˜‰ Honestly, coming up with a bunch more UI to toggle the floating form and figure out how to make it work well enough without causing new problems seems like a sunk cost issue if we're going to end up redoing at a certain point. I still stand by my short term proposal in #3188474-2: Improve usability of Config Enforce Devel's UI β†’ to just wrap the thing in a <details> element and plop it inline at the start or end of the parent form - it solves the immediate problems, it delegates the details of the implementation to browsers and the theme (Claro has some great accessibility for these), and while it's better, it's still not 100% convenient so we'll still be motivated to improve on it when we have the time and budget.

  • πŸ‡¨πŸ‡¦Canada ergonlogic MontrΓ©al, QuΓ©bec πŸ‡¨πŸ‡¦

    For an 1.0.0 release, just an "X" on the CE form that sets 'display: none' (via JS) would suffice. It should probably be added to the base CE form, rather than in Config Enforce Devel overrides.

  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • πŸ‡¨πŸ‡¦Canada Ambient.Impact Toronto

    @ergonlogic That's what a sane person would do, yeah. πŸ€“ Alas, that's not me. By the time you posted that, I'd already converted the floating form and was cleaning it up. Take a look at ✨ Improve usability of Config Enforce UI Postponed and ✨ Improve usability of Config Enforce Devel's UI Postponed .

  • πŸ‡¨πŸ‡¦Canada ergonlogic MontrΓ©al, QuΓ©bec πŸ‡¨πŸ‡¦

    This looks like a good intermediate solution.

    In the long run (ie. ✨ Improve usability of Config Enforce Devel's UI Postponed ) I think we really need to go with the off-canvas dialog. There's no reason that the same 'save' action should handle both configs (the config being enforced, and config_enforce's registry)

  • πŸ‡¨πŸ‡¦Canada Ambient.Impact Toronto

    Agreed, that would be good in the long term. Thanks!

  • Status changed to Closed: duplicate over 1 year ago
  • πŸ‡¨πŸ‡¦Canada Ambient.Impact Toronto

    Closing this as a duplicate of ✨ Improve usability of Config Enforce Devel's UI Postponed

Production build 0.69.0 2024