Following the “Add concept of hidden macros” discussion. I’d like to discuss the impact of this change on the CKEditor Macro Dialog.
Note: I’ll use the term “categories” but at the time of this post, there is still an ongoing discussion regarding the definitive name (i.e., categories/tags/labels).
Currently, the UI looks like the screenshot below, and clicking on one of the lines of the dropdown menu filters the macros list with the macros of the selected category (a macro can only be linked to a single category).
Migrating to several categories for each macro requires to adapt this UI. The goal is to allow users quickly to list macros from interesting categories.
- Listing all non-hidden macro form the Content category.
- Listing all macro from the Navigation or Notifications categories.
To do so, I propose the following UI:
Each category comes with a toggle button. All the toggles are on by default except the one for the Hidden category which is only ON if the user sets her preferences to show hidden macros by default. The Hidden entry is only visible to Advanced users.
The macros are listed if all of their linked categories have there toggle sets to on For instance, in the screenshot above, the Layout and Hidden categories are set off.
- Macro A [Formatting, Hidden]: not listed, because Hidden if off
- Macro B [Formatting]: listed because Formatting is on
- Macro C [Deprecated, Formatted]: listed because Deprecated and Formatted are on
Other notable changes:
- Clicking on the categories labels does nothing
- “All macros” proposes a refresh button to revert the toggles to their initial positions
- The button aside the search bar now always display “Categories” instead of the selected category.To see the filtering status of the categories, the user must unfold the menu.
Note: should we also make other categories unchecked by default (e.g., Deprecated, Internal). Or should we introduce a configuration to configure the list of categories unchecked by default?
PS: See Macro Visibility Control (Proposal.MacroVisibilityControl) - XWiki for the corresponding design page.