Page MenuHomePhabricator

(MS 5) expose visual query sharing via URL in the UI
Closed, ResolvedPublic8 Estimated Story Points

Assigned To
Authored By
Jan 25 2021, 6:04 PM
Referenced Files
F34101245: image.png
Feb 12 2021, 4:59 AM
F34101243: image.png
Feb 12 2021, 4:57 AM
F34098358: image.png
Feb 9 2021, 2:38 PM
F34098361: image.png
Feb 9 2021, 2:38 PM
F34098356: image.png
Feb 9 2021, 2:38 PM
F34038041: image.png
Jan 27 2021, 9:53 AM
F34026852: image.png
Jan 26 2021, 5:12 PM
F34026873: image.png
Jan 26 2021, 5:12 PM


As an editor I want to share my visual query via URL in order to make bug reporting easier and to share my query with other editors.

T271820 implements URL sharing but doesn't yet expose it in the UI.

Desktop (Layout 1-3)

image.png (227×1 px, 18 KB)

Mobile (Layout 4)
image.png (216×339 px, 10 KB)

image.png (196×693 px, 15 KB)

GIVEN a visual query

Acceptance criteria:

  • UI has functionality to generate and copy a link to the current visual query
  • url is automatically copied to clipboard


  • needs button with icon only component
  • use native element as a placeholder for now until the popover component is there: T273041
  • responsive behavior is handled in a separate ticket
  • for now we show the full URL - URL shortening will be handled in a separate ticket

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Lydia_Pintscher renamed this task from (MS 5) expose query sharing via URL in the UI to (MS 5) expose visual query sharing via URL in the UI.Jan 27 2021, 10:21 AM
Lydia_Pintscher updated the task description. (Show Details)
Lydia_Pintscher set the point value for this task to 8.
Lydia_Pintscher moved this task from Backlog to Ready to pick up on the Wikidata Query Builder board.
Charlie_WMDE changed the task status from Open to Stalled.Feb 1 2021, 3:51 PM

stalled while i figure some things out

Lydia_Pintscher raised the priority of this task from Medium to High.Feb 8 2021, 9:20 AM
Charlie_WMDE changed the task status from Stalled to Open.Feb 9 2021, 2:38 PM
Charlie_WMDE removed Charlie_WMDE as the assignee of this task.
Charlie_WMDE updated the task description. (Show Details)
Charlie_WMDE added a subscriber: Charlie_WMDE.

The link icon type is not yet released. I'll do a pre-release for this.

I made a very WIP PR on this but some notes I figured during the work:

  • While still w3c says you need to show the text through input to able to copy to clipboard (and ooui is the same too) but the new API for copying to clipboad is usable for us because we don't support IE11 anyway ( so in my PR I stopped showing the url altogether.

image.png (143×313 px, 7 KB)

  • OTOH, I think we should not show it on hover. Not just it's complicated to combine with focus state (e.g. user on mouse enter, set it to active, then click on the button and make it focused, it's active again but on mouse leave should trigger hiding it...) and it'll also cause issues in matter of producing short urls all the time, it'll quickly get rate limited if let it generate one per hover. Maybe, we copy the long one on hover but with a different button we copy the short url on click?

The new kibana (logstash frontend) has this:

image.png (317×357 px, 24 KB)

Also for firefox:

Writing to the clipboard is available without permission in secure contexts and browser extensions, but only from user-initiated event callbacks. Browser extensions with the "clipboardWrite" permission can write to the clipboard at any time.

amy_rc added a subscriber: amy_rc.

tested and works for the acceptance criteria 🎇