Page MenuHomePhabricator

Inline the 'discard translation' button
Closed, ResolvedPublic

Description

For some reason we have a dropdown menu with a single item in the 'In progress' translation list:

image.png (142×241 px, 3 KB)

Whereas on the 'Suggestions' translation there are two action items just as inline items:

image.png (148×263 px, 1 KB)

The delete actions should just be a simple button. Accidental deletions are already protected against by a confirmation dialog.

Event Timeline

Amire80 added subscribers: Pginer-WMF, Amire80.

@Pginer-WMF had a reason for doing it like this, but I'll need a reminder on what it was. Perhaps to discourage people from accidental deletion or from giving up on a started translation too quickly?

@Pginer-WMF had a reason for doing it like this, but I'll need a reminder on what it was. Perhaps to discourage people from accidental deletion or from giving up on a started translation too quickly?

The current state represents an intermediate situations in a couple of different ways:

  • The initial idea was to support deletion without a confirmation dialog. Making the affected element to fade out to a "deleted" state with an option to undo, allowing to recover from mistakes. This required some technical complexities, that were not considered worth it for such a secondary workflow. Thus, the confirmation panel approach was used instead.
  • The "..." menu was also intended to include additional secondary actions for translations. For example, "mark as complete" is an action that makes sense for those translation that the user published and continued editing. These actions are less relevant than those provided for suggestions and could benefit from the explicit label that the menu provides (e.g., the "continue editing" option for published translations).

In summary, I think it depends on whether we have plans to support more actions. If we do, I think it makes sense to keep the current pattern.
If we don't, I think it makes sense to expose both actions ("delete" for in-progress translations and "continue editing" on published translations) on their respective elements.

If we are undecided or we consider that there are other more impactful workflows to focus or attention on, is worth considering that the current approach has not been problematic for users to discover or operate (especially since the active area adjustments were made to avoid misclicks).

The menu widget uses a bunch of non widget-library custom styling (see also T178387) which is therefore prone to regressions. It would be good to get rid of it unless you have concrete plans for several actions (the suggest list already has two actions inlined).

Change 387786 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/ContentTranslation@master] Inline the dicard/continue actions

https://gerrit.wikimedia.org/r/387786

Change 387786 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] Inline the discard/continue actions

https://gerrit.wikimedia.org/r/387786

Checked in cx-testing (Chrome, Safari, IE11) - looks ok.

Screen Shot 2018-01-02 at 1.58.01 PM.png (296×951 px, 51 KB)