Page MenuHomePhabricator

Structured Tasks: Change how the inspector is collapsed on mobile
Closed, ResolvedPublic

Description

The following changes apply to both add a link and add an image tasks.

  • Header
    • The far right of the header has a "down chevron", which minimizes the inspector.
  • Minimize
    • When the user taps anywhere in the header, the inspector should animate down to just be one line at the bottom of the screen.
    • In minimized mode, the chevron should be pointing up.
    • When the user taps anywhere on the minimized header, it should animate back open.
    • The help panel button should be displayed above the image inspector, and should animate on down to the bottom of the screen when the inspector is minimized, staying above the inspector.

For add a link, clicking on the article surface should collapse the inspector (since clicking on the annotation views will expand the link inspector). For add an image, clicking on the article should not collapse the inspector.

Mockups as of 2021-08-30:

image.png (1×1 px, 1 MB)

NOTE: Refer to Figma for up-to-date detailed redline mocks and specs:
https://www.figma.com/file/ULhJr1isDstRbGE5vjYDsr/Add-images-structured-task?node-id=3042%3A8783

Event Timeline

mewoph added subscribers: MMiller_WMF, RHo.

@MMiller_WMF @RHo FYI here is the task for updating how the inspector is collapsed both all structured task types.

@MMiller_WMF @RHo @nettrom_WMF — I wanted to confirm the instrumentation for this change. For add a link, currently we have the following events (per the original task T287404):

  • close with active_interface=recommendedlinktoolbar_dialog when the user clicks outside the link inspector to close it
  • impression with active_interface=recommendedlinktoolbar_dialog when the link inspector re-appears
  • reopen_dialog_click with active_interface=machinesuggestions_mode when the user clicks on the robot button to re-open the link inspector

Would it make sense to re-use the same events here even though the UI has changed? The semantics might be a bit odd since the inspector isn't actually "closed" (just collapsed) and when an element expands & collapses, I'm not sure if an impression event should be recorded.

Change 730357 had a related patch set uploaded (by MewOphaswongse; author: MewOphaswongse):

[mediawiki/extensions/GrowthExperiments@master] [WIP] Structured Tasks: Expand/collapse functionality for StructuredTaskToolbarDialog

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

kostajh triaged this task as Medium priority.Oct 18 2021, 7:28 AM

Hi @MMiller_WMF @RHo @nettrom_WMF I wanted to confirm the timing of this change since this impacts existing Add Link UI and instrumentation. Once the patch is merged, the new UI will be applied to Add Link users before Add Image launches. Is that ok?

From the instrumentation side, I'm thinking it would be more clear for there to be new events expand and collapse with recommendedlinktoolbar_dialog/ recommendedimagetoolbar_dialog active_interface. This would mean that once these changes are on the train, these events for add link will no longer be sent:

  • reopen_dialog_click with active_interface=machinesuggestions_mode
  • close with active_interface=recommendedlinktoolbar_dialog

Would this be ok?

Hi @MMiller_WMF @RHo @nettrom_WMF I wanted to confirm the timing of this change since this impacts existing Add Link UI and instrumentation. Once the patch is merged, the new UI will be applied to Add Link users before Add Image launches. Is that ok?

Assuming this is the same with the new help floating icon button styling everywhere too (mobile and desktop)? If so, that sounds good to me.

From the instrumentation side, I'm thinking it would be more clear for there to be new events expand and collapse with recommendedlinktoolbar_dialog/ recommendedimagetoolbar_dialog active_interface. This would mean that once these changes are on the train, these events for add link will no longer be sent:

  • reopen_dialog_click with active_interface=machinesuggestions_mode
  • close with active_interface=recommendedlinktoolbar_dialog

Would this be ok?

Makes sense to me too, but will defer to @nettrom_WMF and @MMiller_WMF.

Change 737114 had a related patch set uploaded (by MewOphaswongse; author: MewOphaswongse):

[schemas/event/secondary@master] Add a link: add expand and collapse actions

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

Here are the UIs with the latest changes:

Add Link

minimize_link.gif (1×886 px, 1 MB)

Add Image

minimize_image.gif (1×886 px, 1 MB)

Change 737114 merged by jenkins-bot:

[schemas/event/secondary@master] Add a link: add expand and collapse actions

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

Change 730357 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Structured Tasks: Expand/collapse functionality for StructuredTaskToolbarDialog

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

From the instrumentation side, I'm thinking it would be more clear for there to be new events expand and collapse with recommendedlinktoolbar_dialog/ recommendedimagetoolbar_dialog active_interface. This would mean that once these changes are on the train, these events for add link will no longer be sent:

  • reopen_dialog_click with active_interface=machinesuggestions_mode
  • close with active_interface=recommendedlinktoolbar_dialog

Would this be ok?

That change makes total sense to me, so as far as I'm concerned please do move forward with it!

Etonkovidova subscribed.

For Design review - checked, works &looks exactly as in @mewoph's comment - https://phabricator.wikimedia.org/T293147#7486339

One note: in collapsed state, the header for Add image is not as in the figma mockup ("Add a suggested image") , but "1 suggested image found".

For Design review - checked, works &looks exactly as in @mewoph's comment - https://phabricator.wikimedia.org/T293147#7486339

One note: in collapsed state, the header for Add image is not as in the figma mockup ("Add a suggested image") , but "1 suggested image found".

Hiya, thanks @Etonkovidova, the interaction LGTM 👍🏻 and I gather that the header text is just copy that needs to be updated, is that right @mewoph? Happy to resolve once that's sorted.

Checked testwiki wmf.9 - the inspector works & looks as per the specs. The messages are updated.

IMG_0446.PNG (1×640 px, 127 KB)
IMG_0447.PNG (1×640 px, 163 KB)