Page MenuHomePhabricator

Notifications for redirects to Wikidata in Federated Properties MVP
Closed, ResolvedPublic13 Estimated Story Points

Description

As a Reader or Editor on a Wikibase that uses federated properties, I want to know when I am leaving my local Wikibase so that it is not surprising to find myself on a page in the source wiki.

In the MVP, users will be redirected to Wikidata to do things like view details of federated properties used in statements, and view details of properties linked within edit summaries. Users should be notified that they are about to leave their local Wikibase environment when they click on a link that redirects them to Wikidata.org.

BDD (Scenario: selecting a link to a remote property)
Given The local item page or an edit summary displays a statement that was made using a federated property
When I click on the hyperlinked label of the federated property
Then a popup is displayed that I must leave my local wikibase [see mock]

BDD (Scenario: continuing to view the property page)
Given I have clicked a link to a remote property and the popup notification has displayed
WhenI select "Continue to the source wiki"
Then the property page on the source Wiki (e.g. Wikidata) opens according to my default browser behavior

BDD (Scenario: I choose not to leave my Wikibase)
Given I have clicked a link to a remote property and the popup notification has displayed
WhenI select "cancel"
Then the popup notification is dismissed
And I remain on the page

Mock (Updated to match OOUI as much as possible)

T246125_Redirection (2).png (1×2 px, 335 KB)

Link to original design in Figma.

Event Timeline

Samantha_Alipio_WMDE renamed this task from View details of a federated property to View details of a federated property used in a statement.Feb 27 2020, 1:35 PM
Samantha_Alipio_WMDE updated the task description. (Show Details)
Samantha_Alipio_WMDE renamed this task from View details of a federated property used in a statement to View details of a federated property used in a statement [MVP Version].Apr 8 2020, 2:23 PM
Samantha_Alipio_WMDE updated the task description. (Show Details)
Samantha_Alipio_WMDE renamed this task from View details of a federated property used in a statement [MVP Version] to Notifications for redirects to Wikidata in Federated Properties MVP.Apr 23 2020, 10:49 AM
Samantha_Alipio_WMDE updated the task description. (Show Details)
Addshore added a subscriber: Addshore.

@Samantha_Alipio_WMDE we remember discussing if this should be happening for all links, or just on the Item page, and also if that should be done in this ticket or also another ticket? But we can't remember and also can't find a record of the discussion.

We would also like some more clarity around the notification and what exactly we should be aiming for, which I guess ties in with the open question in the description:

Finalized text for the notification message(s) pending

  • Text to be displayed to the user
  • Format of the notification
    • Does it have buttons? / should it allow the user to not navigate to the page?
    • Should it be a popup notification of some sort?
    • Should it redirect the user via another page?
    • Does this need / should this have a quick mockup / input from WMDE-Design ?

We guess with T251102 that this notification should be able to block the user from navigating to the remote site, but some clarifications in the description would be great.

Task breakdown discussion:

Options:

  • Use Vue
    • The design system is in the works currently so we can't use it
    • When we estimated this task we assumed that we were going to use Vue
  • Use OOUI
    • OOUI already has a version of the things we need (see Dialogues in https://doc.wikimedia.org/oojs-ui/master/demos)
    • Path of least resistance
    • We used OOUI components for the notice message page that we recently did (special list properties)

We posed the question of which to go with and decided the OOUI approach.
We reflected on the fact that it would be great if the component system was ready to use, and had such a component, and then we would use it! :)

Breakdown points:

  • Use OOUI
  • Do not immediately include the checkbox for popup impression (as we won't implement that functionality as part of this ticket (will be done in T251102))
  • Create JS module to be loaded on pages which have the property links we want to trigger on
  • Load that module on the pages, when federated properties is enabled
    • Item pages
    • Pages that use summaries (history, recent changes etc (same as the hook that we have been touching recently))

Questions:

  • The BDD says "revision history", but doesn't this actually mean anywhere the edit summary is shown currently (including recent changes etc)
  • Do we want to knowingly deviate from the default location of the X for OOUI for this pop up?
  • What should be the behaviour if the JS hasn't loaded yet? (clicking real fast)
    • We assume that they are just allowed to click the link and navigate to the remote site (this is easiest)
  • We had some thoughts regarding having fed props enabled browser tests in CI (not there yet) and wondered if we should look at that as part of this

We ran out of time slightly at the end but this is where we got.
Will post in mattermost to get a little bit of review as we didn't get to discuss how we might want to split this, and we also have option questions.

@Addshore thanks for the ping, here are my thoughts:

  1. Good catch, what we'd be looking for is anywhere the edit summary is shown (revision history, recent changes) vs. just on revision history. Will update the ticket
  2. Sarai will update the design with the OOUI default x location (thanks Sarai!)
  3. I agree with your assumption that if JS hasn't loaded yet, user can just click the link and navigate to the source Wiki

Breakdown points:

  • Use OOUI
  • Do not immediately include the checkbox for popup impression (as we won't implement that functionality as part of this ticket (will be done in T251102))
  • Create JS module to be loaded on pages which have the property links we want to trigger on
  • Load that module on the pages, when federated properties is enabled
    • Item pages
    • Pages that use summaries (history, recent changes etc (same as the hook that we have been touching recently))
      • This might end up using a high-level hook to figure this out (something that runs on most page loads), or something low level (like the actual onHtmlPageLinkRendererEnd hook), or something else entirely (some other more specific hook)

Breakdown:

  • Write the thing (js module)
    • Hook the thing up for Item Pages
  • Hook the thing up for the summary related pages