Page MenuHomePhabricator

Disable interactions with all context items except for RecommendedLinkContextItem
Closed, DuplicatePublic

Description

The links (not the suggested links) can be right-clicked and opened in another tab/window. It seems to me perfectly fine. I added to signal that there are, in fact, some ways that users are still able to interact with a content.
Also, tapping on an article's templates, images and on the footer will bring up disabled template editor, media settings and page options window repectively.

Media SettingsPage optionsTemplate editor
Screen Shot 2021-04-07 at 4.55.33 PM.png (691×840 px, 221 KB)
Screen Shot 2021-04-07 at 4.55.14 PM.png (656×1 px, 117 KB)
Screen Shot 2021-04-07 at 5.06.41 PM.png (668×820 px, 209 KB)

This should be fixed as part of initial release imo as this is an important main requirement to not enable opening other cards, especially on Desktop where the add links card is no fixed as an overlay on the entire page. Equally, it should *not* be possible for all add link inspector cards to be closed.

Event Timeline

kostajh triaged this task as Medium priority.Apr 14 2021, 12:20 PM
kostajh moved this task from Backlog to April 12 - April 16 on the Add-Link board.
kostajh added subscribers: MMiller_WMF, RHo.

@RHo @MMiller_WMF I'd like for us to discuss this before we do any work around it. As far as I can tell, to disable interactions with the various dialogs and tools available in the VisualEditor surface, we'll have to manually specify each one that we want to block, which is kind of tedious and error-prone as there are a lot of them, and other extensions (e.g. Cite module) can register more tools.

On top of that, it may be tricky to disable the highlighting that appears when mousing over or clicking on a context item (e.g. the references section), even if we can block the opening of the dialog associated with that particular context item.

From a product perspective, it seems like removing all the other tools and dialog interactions moves us farther away from the goal of introducing the standard editing environment to the user. Could we perhaps consider instead providing a visual cue to the user that the VE is in read-only mode (or in suggestion mode, so the only thing they can do are the link suggestions) when these dialogs are opened? Or alternatively, doing nothing with this task for the initial release?

kostajh renamed this task from Disable interactions with templates, images, and footer to Disable interactions with all context items except for RecommendedLinkContextItem.Apr 14 2021, 12:48 PM
kostajh moved this task from April 12 - April 16 to Backlog on the Add-Link board.
RHo added a subscriber: Etonkovidova.

@Tgr's idea from standup: capture click events on the document and stop propagation if the click is not one of our elements

@Tgr's idea from standup: capture click events on the document and stop propagation if the click is not one of our elements

That could work potentially. I guess my concern is more from a product perspective than a technical one (hiding most of VE functionality from curious users). From a technical perspective, would prefer to do something with this after we've done the instrumentation and remaining bug fix / feature tasks.

Hi @MMiller_WMF I think this should be kept separate even though they are related. Once a permanent context is used for the link inspector, nothing is stopping the user from clicking outside the link inspector (and on elements other than the link recommendations) so it's possible that existing context items would still show up.

Here's an example from my permanent context item prototype (ignore the positioning for now) where the link inspector and template context item are both present:

Screen Shot 2021-04-23 at 4.04.52 PM.png (1×716 px, 173 KB)

@mewoph -- right right, sorry -- I forgot about the distinction between these two issues. They are both about context items, and I got confused.

kostajh changed the task status from Open to Stalled.Apr 26 2021, 7:35 AM
kostajh removed kostajh as the assignee of this task.

I'm marking this stalled until we wrap up the work in T267706: Add a link in VE: Use a permanent context instead of VE's built-in context. In theory maybe there is not going to be overlap, but I'd like to avoid rewriting code to implement this.

Change 683557 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/extensions/GrowthExperiments@master] [WIP] AddLink: Disable unneeded context, tool, and command items

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

After unregistering all the context items, clicking on an image still does something; at least the focus behavior changes. (If you click on an image, then click on a link suggestion, the suggestion won't activate.) Not sure if that's worth fixing.

Change 683557 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] AddLink: Disable unneeded context, tool, and command items

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

kostajh moved this task from April 26 - April 30 to Done / QA on the Add-Link board.

After unregistering all the context items, clicking on an image still does something; at least the focus behavior changes. (If you click on an image, then click on a link suggestion, the suggestion won't activate.) Not sure if that's worth fixing.

Yes, we should fix that. I'll file a task

After unregistering all the context items, clicking on an image still does something; at least the focus behavior changes. (If you click on an image, then click on a link suggestion, the suggestion won't activate.) Not sure if that's worth fixing.

I can't reproduce that. I was just looking at https://en.wikipedia.beta.wmflabs.org/w/index.php?title=Catch_dog&veaction=edit&getasktype=link-recommendation&geclickid=blah on both mobile and desktop. @Tgr if you can still reproduce it, could you please file a task about it?