Page MenuHomePhabricator

[MEX2] Link to specific properties (statement groups) and statements
Open, Needs TriagePublic

Description

In the desktop UI, you can link to specific statement groups and statements, using the property ID or statement ID in the URL hash:

We should also support this in MEX / wbui2025.

Design:

Screenshot 2026-06-19 at 10.33.35.png (1,808×742 px, 144 KB)

Figma link

Acceptance criteria

  • Loading a URL with a property ID in the hash scrolls to that statement group
  • Loading a URL with a statement ID in the hash scrolls to that statement
  • The selected statement or statement group is visually highlighted with a border-width-thick (codex name) in color.blue700

Notes

  • We probably want to support this via HTML id= attributes (scroll) and CSS :target selectors (highlight), without any JavaScript
  • We probably don’t need any special handling for “invalid” URLs (no such property or statement on this item), at least not as part of this task
  • Generating these URLs is also not in scope for this task
  • See also T414456: [MEX2] Support deep-linking to edit modals inside MEX, which is about linking to the edit state (this task is about the “view” state)

Event Timeline

Arian_Bozorg renamed this task from [MEX] Link to specific properties (statement groups) and statements to [MEX] M5 - Link to specific properties (statement groups) and statements.Jan 23 2026, 12:50 AM
Arian_Bozorg moved this task from Incoming to MEX Incoming column on the Wikidata-Omega board.

Other task time note: @AudreyPenven_WMDE noticed that this actually already works for statement ID URLs (they’re not highlighted, but it does scroll to them): https://www.wikidata.org/wiki/Q42?useformat=mobile#Q42$1d7d0ea9-412f-8b5b-ba8d-405ab9ecf026
But property ID URLs are still missing: https://www.wikidata.org/wiki/Q42?useformat=mobile#P735
We agreed that we don’t need to add id= attributes for property IDs before we have the design.

Arian_Bozorg renamed this task from [MEX] M5 - Link to specific properties (statement groups) and statements to [MEX2] Link to specific properties (statement groups) and statements.May 18 2026, 2:48 PM

Other task time note: @AudreyPenven_WMDE noticed that this actually already works for statement ID URLs (they’re not highlighted, but it does scroll to them): https://www.wikidata.org/wiki/Q42?useformat=mobile#Q42$1d7d0ea9-412f-8b5b-ba8d-405ab9ecf026
But property ID URLs are still missing: https://www.wikidata.org/wiki/Q42?useformat=mobile#P735
We agreed that we don’t need to add id= attributes for property IDs before we have the design.

It turns out that an id= attribute for property IDs already existed, but with a long prefix; we removed this prefix (i.e. changed it to just id=P1) in T428189, so now linking to statement groups and statements works, but the target statement group or statement is not visually highlighted yet. For that, we still need a design :)

Alice.moutinho updated the task description. (Show Details)