Page MenuHomePhabricator

Remove use of jquery.tipsy in UniversalLanguageSelector
Closed, ResolvedPublic

Description

  1. Use of tipsy for language change notification [...] is an important feature. Also, let's stop calling 1 a tooltip, because it is not: it has a link and it is automatically shown. [...] it has been proposed or I propose: I) mw.notify (has positioning limitation, which possibly could be fixed) II) OOUI (I suppose it's even heavier than tipsy, correct me if wrong; seems out of question) III) Custom, as-light-as-possible solution

Regarding the specific use for ULS, we want to:

  • Notify the user of a language change and provide a quick way to revert it (note that turning your UI to Greek by accident can be problematic if you don't know the language).
  • Make it in a lightweight way: not requiring specific confirmation to avoid getting into the user workflow when the obtained result is what the user meant (most of the cases)
  • Connect that piece of information to the language settings component to show the general way to adjust such settings.

The solution proposed can be described as a "transient undo popover" more than a tooltip. We just used tipsy because it was what was at hand. I'm ok in using a different technology but I won't break the principles I described above.

I Googled for "undo popover" (Pau's phrase) and came across discussions about Google's "undo send" functionality, which seems indeed to be a very close match for what you want: i.e., a way of telling the user "OK, I did what I think you wanted me to do, but if you find out it's not what you wanted there is a window of opportunity for you to quickly reverse it". mw.notify() does indeed seem like the best fit, in that case. I understand that having it in the default position does not fulfill your desire that the undo option direct the user to the ULS interface pane, but I think that's both fixable and a smaller problem overall than the misuse of tooltips.

Related Objects

StatusSubtypeAssignedTask
Resolved Nikerabbit
DeclinedNone
ResolvedJdlrobson
Resolvedmatmarex
Resolvedmatmarex
ResolvedMarkTraceur
Resolvedmatmarex
Resolvedmatmarex
ResolvedNone
ResolvedJdlrobson
DuplicateNone
ResolvedJdlrobson
ResolvedWMDE-leszek
ResolvedJdforrester-WMF
DeclinedNone
ResolvedTpt
Resolvedsanthosh
DuplicateNone
ResolvedJdlrobson

Event Timeline

Jdforrester-WMF raised the priority of this task from to Medium.
Jdforrester-WMF updated the task description. (Show Details)

Needs requirements. CR on Ori's patch gas some to copy.

Per gerrit patch, there is no simple replacement available as of now.

Change 292298 had a related patch set uploaded (by Jdlrobson):
Remove jquery.tipsy from UniversalLanguageSelector

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

pasted_file (105×475 px, 7 KB)

  1. What is this? Does not make sense to introduce scrollbars here. It should just be partially out of viewport until it is scrolled.
  2. Regression in positioning: It should be placed on the left side of the cog with the arrow pointing to it. (On the right side in left-to-right language).

pasted_file (170×799 px, 34 KB)

  1. Regression in positioning in right-to-left languages.

Examples of expected display with tipsy:

pasted_file (150×510 px, 36 KB)

pasted_file (133×456 px, 13 KB)

pasted_file (211×604 px, 20 KB)

After reading the docs for PopupWidget I did not find any way to have the arrow point to the side.

@Pginer-WMF how important is the feature of having the popup to be on the side of the COG icon instead of under it?

Also, I found something about "clippable" elements which potentially could explain the weird scrollbar behavior, but I did not figure out if there is way to use this to remove the behavior.

@Pginer-WMF how important is the feature of having the popup to be on the side of the COG icon instead of udner it?

Having it related by proximity may be enough to suggest those are connected. So I think your proposal could work well.

Change 292298 merged by jenkins-bot:
Remove jquery.tipsy from UniversalLanguageSelector

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

Confirmed this to work in en.wikipedia.beta.wmflabs.org.