Page MenuHomePhabricator

Follow up work: Iterate on IP masking banner
Closed, ResolvedPublic5 Estimated Story Points

Description

The first pass of the IP masking banner was done in T330510.

There are 2 known problems with the design that didn't meet the original spec

TODO (Also QA)

Note: The button in Minerva mobile skin will appear unstyled on page load. This is expected until work on T319260 is done.

  • The banner is not responsive

image.png (348×480 px, 35 KB)

Per the design the buttons should be on a new line:
image.png (4×768 px, 1 MB)

  • There is no tooltip

image.png (422×780 px, 54 KB)

  • Displayed in printed PDF

Screenshot 2023-06-21 at 11.23.37 AM.png (536×1 px, 113 KB)

Event Timeline

Jdlrobson triaged this task as Medium priority.Jun 16 2023, 6:02 PM

Change 931622 had a related patch set uploaded (by Jdrewniak; author: Jdrewniak):

[mediawiki/core@master] [WIP] Temporary user banner - tooltip styling

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

LGoto set the point value for this task to 5.Jun 20 2023, 5:05 PM

Some thoughts on next steps for this ticket:

  1. Create a spike to identify implications of using Codex and CSS-only component variants in this context - specifically make sure we've accounted for performance impact, working with DST, CSS-only variant, coexistence with OOUI, other questions you all have.
  2. Assume we will be working with DST and work together with them to do this (assuming we will built it ourselves but ask them these questions)
  3. Start with CSS-only component variant for now and build up to a full component if we determine this makes sense

We're going to have to modify this design slightly in order to limit the implementation to CSS & HTML.
By using the <details> & <summary> elements we get the popup behaviour & accessibility for free, but the downside is that the tooltip will only open and close by clicking the info icon (i.e. the <summary> element). That means clicking anywhere else on the page will not close the popup.

In the patch below, I've created a version where the info icon changes into a close icon when the tooltip is open.

Would this be an acceptable compromise?

Screenshot 2023-06-20 at 3.14.14 PM.png (720×1 px, 45 KB)
Screenshot 2023-06-20 at 3.14.28 PM.png (720×1 px, 98 KB)

tagging @RHo as she worked on this.

Test wiki created on Patch demo by RHo (WMF) using patch(es) linked to this task:
https://patchdemo.wmflabs.org/wikis/12a1e3184e/w

Test wiki created on Patch demo by JDrewniak (WMF) using patch(es) linked to this task:
https://patchdemo.wmflabs.org/wikis/a78b999a52/w

@RHo apologies, forgot to push an edit to the patch, this patchdemo is (slightly) more presentable: https://patchdemo.wmflabs.org/wikis/a78b999a52/wiki/Main_Page

@RHo apologies, forgot to push an edit to the patch, this patchdemo is (slightly) more presentable: https://patchdemo.wmflabs.org/wikis/a78b999a52/wiki/Main_Page

Thanks Jan! See comments/questions below..

We're going to have to modify this design slightly in order to limit the implementation to CSS & HTML.
By using the <details> & <summary> elements we get the popup behaviour & accessibility for free, but the downside is that the tooltip will only open and close by clicking the info icon (i.e. the <summary> element). That means clicking anywhere else on the page will not close the popup.
In the patch below, I've created a version where the info icon changes into a close icon when the tooltip is open.
Would this be an acceptable compromise?

Screenshot 2023-06-20 at 3.14.14 PM.png (720×1 px, 45 KB)
Screenshot 2023-06-20 at 3.14.28 PM.png (720×1 px, 98 KB)

My intention for MVP is to use existing components as much as possible, so had thought this would reuse the existing OOUI PopUpButtonWidget component until the Pop-up. Am I understanding correctly that this cannot/should not use that component? If that is incorrect, but it's the specific version of this with the close inside is problematic, I would be open to simplifying by using the version of this tooltip without the close at all. Basically use the same thing that is on the Special:Preferences > Notifications page:

PopUpButtonWidget/Tooltip on PreferencesDesktop
image.png (240×816 px, 34 KB)
Mobile
image.png (256×702 px, 34 KB)

The reason this would be preferred is for simplicity and not introducing a new interaction pattern (close replacing info icon). I am also wondering about keyboard accessibility as in the patchdemo it seems that the esc key doesn't close the popup, (but does work on the Preferences one). Second question is if the Mobile version requires more work to customise here than it would to use something OOTB?

image.png (766×728 px, 72 KB)

In T339379#8950062, @NHillard-WMF wrote:

Some thoughts on next steps for this ticket:

  1. Create a spike to identify implications of using Codex and CSS-only component variants in this context - specifically make sure we've accounted for performance impact, working with DST, CSS-only variant, coexistence with OOUI, other questions you all have.
  2. Assume we will be working with DST and work together with them to do this (assuming we will built it ourselves but ask them these questions)
  3. Start with CSS-only component variant for now and build up to a full component if we determine this makes sense

Ideally I was hoping this would reuse the OOUI PopUpButtoWidget and looks like it is in the Codex Planned components as Tooltip, so should this be added as use-case to T280677?

We talked about this today. Vector is currently using OOUI for popups but the code for this needs to apply to all skins including Minerva (and Minerva does not use OOUI for performance reasons). On the long term we need to get this component added to Codex. It's not clear what the best short term plan is here - we can either use OOUI with a performance penalty or work on a new component inside core, with the eventual goal to replace either implementations with Codex.

Personally given the timeline for Codex, it seems like the path of shortest resistance might be to use OOUI short and swap it out with Codex before roll out.

Change 933496 had a related patch set uploaded (by Jdrewniak; author: Jdrewniak):

[mediawiki/core@master] Improve mobile layout for temporary account banner

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

Change 933507 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/core@master] Hide temporary banner in print

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

In further discussing this, the consensus was that it makes sense to use the OOUI component short term, while Design-System-Team will consider the Tooltip (T340456) a high priority component, with the expectation that it be swapped out in the banner when available.

Change 933496 merged by jenkins-bot:

[mediawiki/core@master] Improve mobile layout for temporary account banner

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

Change 933507 merged by jenkins-bot:

[mediawiki/core@master] Hide temporary banner in print

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

Change 934418 had a related patch set uploaded (by Jdrewniak; author: Jdrewniak):

[mediawiki/skins/Vector@master] Remove "interface-temp-user-banner" option

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

Change 934419 had a related patch set uploaded (by Jdrewniak; author: Jdrewniak):

[mediawiki/skins/MinervaNeue@master] Remove "interface-temp-user-banner" option

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

Change 934418 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Remove "interface-temp-user-banner" option

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

Change 934419 merged by jenkins-bot:

[mediawiki/skins/MinervaNeue@master] Remove "interface-temp-user-banner" option

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

Ready for QA on patchdemo shortly.

Test wiki created on Patch demo by Jdlrobson using patch(es) linked to this task:
https://patchdemo.wmflabs.org/wikis/f48d2ebcba/w

Change 931622 merged by jenkins-bot:

[mediawiki/core@master] Create mediawiki.tempUserBanner module

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

Change 934573 had a related patch set uploaded (by Jdrewniak; author: Jdrewniak):

[mediawiki/core@master] Improve mobile layout for temp-user-banner

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

Change 934573 merged by jenkins-bot:

[mediawiki/core@master] Improve mobile layout for temp-user-banner

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

Test wiki created on Patch demo by Jdlrobson using patch(es) linked to this task:
https://patchdemo.wmflabs.org/wikis/07348a6a02/w

Edtadros subscribed.

Test Result - Beta (patchdemo)

Status: ✅ PASS
Environment: patchdemo
OS: macOS Ventura
Browser: Chrome
Device: MBP
Emulated Device:NA

Test Artifact(s):

QA Steps

@Jdlrobson, the "buttons" are responsive but have lost their styling. I'm assuming that is the scope of another task but bringing your attention to it here just in case it isn't.

✅ AC1: The banner is responsive

Screen Recording 2023-06-30 at 5.32.33 PM.mov.gif (950×988 px, 1 MB)

✅ AC2: Per the design the buttons should be on a new line:
see above

✅ AC3: There is a tooltip

Screenshot 2023-06-30 at 5.36.59 PM.png (836×380 px, 68 KB)

✅ AC4: Displayed in printed PDF

Screenshot 2023-06-30 at 5.38.55 PM.png (667×941 px, 97 KB)

Test wiki on Patch demo by JDrewniak (WMF) using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/a78b999a52/w/

Test wiki on Patch demo by RHo (WMF) using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/12a1e3184e/w/

Test wiki on Patch demo by Jdlrobson using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/07348a6a02/w/

Test wiki on Patch demo by Jdlrobson using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/f48d2ebcba/w/