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:
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.
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