Page MenuHomePhabricator

[WtC][QB] Replace sharable link composition by single button
Open, Needs TriagePublic

Description

Problem

In the Query Builder, users have the option to copy a short version of their QB query using an icon-only button in the run query section:

Screenshot 2024-03-26 at 12.25.31.png (84×478 px, 11 KB)

The current solution is not fully optimal for the following reasons:

  • The action is expressed by a text positioned outside the button that performs said action
  • Screen reader users navigating the page using modifier keys get potentially confusing information: the copy "get shareable link" communicates an action, but it's not presented as an interactive element
  • Screen reader users navigating the page using modifier keys get duplicated information (first the external text, then the button text).
Solution

We'll use a normal progressive button to communicate the "Copy link to query" action.

The behavior will be the same: on click, the new "Copy link to query" button will get the shorter query URL copied and trigger the display of a confirmation popover.

Screenshot 2024-03-26 at 12.37.03.png (122×735 px, 14 KB)

Considerations:
  • We'll use cdx-button to replace the current "Get a shareable link" functionality
  • We'll use a ported version of the WiKit tooltip/popover (this component is not available yet in Codex) to confirm that the URL has been copied to the user's clipboard
Acceptance criteria:
  • The "Get shareable link" functionality is provided using a Codex icon+text button with the label "Copy link to query"
  • The behavior remains the same: on click, the shorter version of the query's URL is copied to the user's clipboard
  • A ported version of the WiKit tooltip (T370146) is used to communicate that the URL has been copied
Notes:

This is dependent on the porting or usage of the tooltip component

Event Timeline

Arian_Bozorg renamed this task from [SW] [WtC-M3] Replace sharable link composition by single button to [WtC-M3] Replace sharable link composition by single button.Jun 5 2024, 11:16 AM
Arian_Bozorg updated the task description. (Show Details)
Sarai-WMDE renamed this task from [WtC-M3] Replace sharable link composition by single button to [WtC][QB] Replace sharable link composition by single button.Jul 31 2024, 7:40 PM

We need to create a task for "a ported version of the WiKit tooltip"