-
Notifications
You must be signed in to change notification settings - Fork 20
Grouped media simulation UI #134
Description
@nchevobbe already pointed out in bug 1692434 that the current UI with dedicated buttons doesn't scale well with more emulation features being introduced.
So a better way to display them needs to be found.
In #129 (comment) I suggested a "toggle panel". This would be consistent with what we have for toggling different CSS pseudo-classes and for managing CSS classes and the UI would be associated with the CSS rules.
@fvsch wrote that a panel like that might easily get out of view and had several suggestions for different UIs:
- A dedicated panel in the toolbox.
- A dedicated tab in Inspector (same level as Fonts, Animations…).
- As a button above the DOM view in Inspector (e.g. near the color picker).
- As a button in the toolbox (near the RDM button).
- As a button in the RDM toolbar (next to, or in place of, the touch emulation button).
Just for reference, the Chrome DevTools have all emulation features together with other rendering related options placed in a dedicated Rendering panel.
To mitigate the "out of view" issue, I suggest to add some indication when an emulation is active. For example, the main panel's tab could change its color like the Debugger does when script execution is halted. Additionally, there should be some tooltip or other textual representation indicating that the emulation is active.
This works with my suggested toggle panel as well as Florens' suggestions 1 to 4.
Regarding the five suggested options,
- A dedicated panel in the toolbox.
A dedicated panel would need to be enabled by default, otherwise this would be even more hidden than the toggle panel. Also, there wouldn't be sufficient options (yet) that justify a dedicated panel, in my opinion. That means the panel would mostly be empty. And if there are just rendering related features, it's better to keep them contextually near to related UI.
- A dedicated tab in Inspector (same level as Fonts, Animations…).
Is an option, though the Inspector already has a lot of side panels which might be bad for discoverability again. Though I'd say it depends on the number of emulation options whether a dedicated side panel is justified.
- As a button above the DOM view in Inspector (e.g. near the color picker).
A button would be visible enough, though I wonder what UI you had in mind when the button is clicked. I assume you meant that the button opens some kind of popup or overlay which would be a new piece of UI, as far as I know.
- As a button in the toolbox (near the RDM button).
Like the Inspector button this would be visible enough, though just if that button is enabled by default. And again, there's the question of what UI should be shown when clicking that button. I.e. how the different emulation options should be toggled.
- As a button in the RDM toolbar (next to, or in place of, the touch emulation button).
The RDM is rather used for simulating different devices, not user preferences. So I wouldn't place the options there.
Sebastian