Page MenuHomePhabricator

Define approach for expanding DiscussionTools `visual` mode toolbar
Open, Needs TriagePublic

Description

This task is about developing an approach for how we will consider adding additional tools to the New Discussion and Reply Tools' visual mode editing toolbar.

Requirements

  • The Editing Team can:
    • Specify "default sets" of tools that are shown by default to all volunteers using the Reply and/or New Discussion Tools
      • These "default set" of tools, for now, ought to include the following: Bold, Italic, Style text, Link, and Mention a user
    • Specify different default sets of tools depending on the interface (read: the Reply and New Discussion Tool can have different tools in their default set)
    • Specify that the "default set" of tools be shown more "prominently" than other tools projects or individuals have added to the Reply and New Discussion Tools
    • Specify how the toolbar behaves at varying widths
  • Projects can:
    • Specify what tools, beyond those in the default set, are available to all volunteers using the Reply and/or New Discussion Tools at their project, by default
  • Individuals seeking to customize their experience with DiscussionTools can:
    • Specify what tools, beyond those in the default set, are available to them when they are using the Reply and/or New Discussion Tools
  • Individuals using DiscussionTools can, regardless of the number of tools enabled:
    • Understand the range of tools available to them
    • Intuitively and efficiently access and use the specific tool they are seeking out

Approaches

  • Approach #1: create and maintain centralized configuration system
    • This approach would require the Editing Team create and maintain a centralized system that would dictate what tools are available within the Reply and New Discussion Tools at various projects
  • Approach #2: reuse VE's existing gadget system
    • This approach would require the editing expose a hook projects and individuals can leverage to add tools.
  • Approach #3: TBD

Open questions

  • How do we ensure that as new tools are added, people can continue to: A) understand the range of tools available to them and B) intuitively and efficiently access and use the specific tool they are seeking out?
  • How – if at all – should the current design of the editing toolbar change to accommodate additional tools?

Done

  • The questions listed in the "Open questions" section above have been resolved

Historical context

Links to past discussions on this topic...

Additional tools

"Additional tools" could mean support for the following:

Event Timeline

ppelberg added a subscriber: Pbsouthwood.

Added "Quoting a content from a previous comment." to the ideas section of the task description in response to @Pbsouthwood raising the idea here: https://www.mediawiki.org/w/index.php?title=Topic:Vju7lfcav875rt8r&topic_showPostId=vk38ffdmuu4fm3z1#flow-post-vk38ffdmuu4fm3z1

Rather than buttons like B, or I, I would like to have a button to insert an image in the replytool visual mode toolbar. Inserting an image is much more common than inserting a table in a reply. for example to give someone a barnstar, that is a picture of such a thing.

Rather than buttons like B, or I, I would like to have a button to insert an image in the replytool visual mode toolbar. Inserting an image is much more common than inserting a table in a reply. for example to give someone a barnstar, that is a picture of such a thing.

@AdHuikeshoven, I've filed a task adding "upload image" to the Reply tool's visual mode: T257713.

To explain why we've kept the "Bold" and "Italic" tools visible for now, I'm copying over the response I shared on the project's talk page [i]:

I agree with – what I understand to be – the underlying point here that there may be other tools worth [i] exposing in the visual mode's editing toolbar.

With the above said, we think first and foremost it's important that people recognize the visual mode's toolbar as containing a set of tools to help people better represent the thoughts they have in their minds in a way others can see and understand. As such, we've been assuming that, for many people, "Bold" and "Italic" serve as effective signs for communicating to people something like, "Hey, this is where you can go to format the comment you are writing and add other things to it."


i. https://www.mediawiki.org/w/index.php?title=Topic:Vn76v83ev5b6bk7w&topic_showPostId=vnm1sr2t3eraro2w#flow-post-vnm1sr2t3eraro2w

For now, I'm de-prioritizing this task considering what – if any – adjustments we make to the tools that are exposed in the visual mode's toolbar should be made once the tool is more widely deployed and used.

I think that getting a Special characters item is important and increasingly urgent. This tool is beginning to reach more people whose everyday script doesn't use only basic ASCII characters.

After the multiline-comments RFC, we're probably going to want a Template inserter, too.

ppelberg renamed this task from Define approach for expanding the Replying tool's `visual` mode toolbar to Define approach for expanding DiscussionTools `visual` mode toolbar.Mar 31 2021, 7:29 PM
ppelberg updated the task description. (Show Details)
ppelberg updated the task description. (Show Details)

Three concerns to be discussed are:

  1. Design: how should more tools be added to that toolbar?
  2. How do we ensure that people can understand the range of tools that are available to them and can intuitively they can access what they need, in a world where the toolbar can be customized? Context: an editor would want to know all of the tools that are available to them. Second modality is that an editor should intuitively be able to tell which tools to use
  3. How should we let people/ wikis choose tools that apply to their use case? Note that traditionally, our approach to this has been using gadgets i.e. bundles of javascript. See here: https://www.mediawiki.org/wiki/VisualEditor/Gadgets/Add_a_tool. Gadgets are toggle-able per user but each wiki can choose which buttons are enabled by default. All of the code for gadgets lives on the wiki.

If we let people configure per wiki, what are the basic principles that must be met? what technical levers do we have at our disposable to govern the kinds of choices users may make? E.g. add technical rules in place to monitor/ govern user behavior.
From DLynch: Exposing a hook that gadgets can get into is the lightest method for the moment. Risk to this: if we implement it, we have to maintain it. Implicit agreement with volunteers is the same as with when we expose any public API, implicit suggestion is that we will fix it if it breaks.

(Assigning to me to scope)

Task description updated with ===Requirements and the approaches Leza documented in T249074#7228151.

Next step

  • Editing Engineering to review ===Requirements and determine whether Approach #2 will satisfy them and if not, to consider what other approach might be able to.

Note - no distinction between projects and individuals since they depend on the same systems to customize the tools.

There is a distinction if we go with the centralized configuration system.

Specify how the toolbar behaves at varying widths

One thing I'd like to consider for a narrow-width toolbar is folding the separate/redundant Bold and Italic buttons back into the Character Formatting menu.

@DLynch: would it be possible for us to introduce an "Advanced" mode that, when in enabled, would give people access to additional tools within DiscussionTools that they, or their project, has introduced?

I'm imagining the two modes would work as follows:

  • Advanced:
    • Availability: disabled by default
    • Customization: to add tools to the Advanced mode, people would use a hook that we expose, similar to what's currently done in VE's gadget system
    • Constraints: The Editing Team would define how the tool behaves based on the following variables: the number of tools present in the toolbar and the width of the page they are using the tool within.
  • Default
    • Availability: enabled by default
    • Customization: to add tools to the Default mode, the Editing Team would need to add them.
    • Constraints: The Editing Team would define how the tool behaves based on the following variables: the number of tools present in the toolbar and the width of the page they are using the tool within.

I ask the above thinking that trying to converge on a single state of the tools that meets the needs of both Junior and Senior Contributors is more likely to result in a situation where neither's needs are met. So why not bifurcate the experience so we can more fully serve both groups' needs without adding to the tension between the two.

Sort of? We could do that… but if we’re already asking them to use gadgets, we can’t do much to stop them adding things to the “default” set if that’s what they want to do. We could add some sort of split, but actually enforcing it would be challenging.

similar to what's currently done in VE's gadget system

Also, wording quibble that relates to a possible misapprehension — gadgets are a mediawiki thing, not VE specific. VE exposes a “hook” which is an easy place for gadgets/scripts to step in, but as you can see from the special characters script I wrote for Sherry it’s hardly a necessary element.

Or maybe just put a "More" button at the end of the toolbar, and let me click it to see other options.

Or maybe just put a "More" button at the end of the toolbar, and let me click it to see other options.

I think that'd be a supplement to the "encourage wikis to use gadgets" approach -- giving them an official place that we encourage them to put things. At least, insofar as I assume that we wouldn't just be dumping every single tool from VE into said "more" menu, so there'd be some desire for customization. I do approve of it as a simpler approach than having a special "advanced" mode you need to turn on, since burying things in preferences is awful for discoverability.

(This would actually be trivial, for what it's worth. I'd need to do some double-checking of how we currently handle empty groups, but the worst-case I can see is that we might need to do a small amount of work on toolbar-creation to hide it if no tools have been added -- and that might already be in place. Plus, if we start out with a few advanced tools in the more menu by default, that'd never come up.)