Page MenuHomePhabricator

[MEX] M4 - stable width of popover for TIME and COORDINATE data types
Open, Needs TriagePublic

Description

As a user, i want to edit a statement without being distracted by a popover constantly changing size as i type.

Screenshot 2026-02-17 at 16.08.45.png (1×748 px, 131 KB)

Current behavior: as the user types in a date, the popover displaying the value "will be displayed as" constantly changes size, because the width is set as "hug/wrap" and so the box size adapts to the text size.
Example: Goes from "The time value is malformed" to "December" and basically shrinks by 50%.

Fixed behavior: The popovers for TIME and COORDINATE stay stable at 90% width of the users screen - in very large screens, a max of 280px - text wraps if necessary.

Note:
Musical notation and Constraint Violations (minimally) also displays similar issues with resizing, but the CSS is likely separate enough that they can be considered out of scope for this ticket. That said, if we can get a freebie fix for them while doing this, let's go for it

Event Timeline

I already had a run-in with the popover width in T414917 - see in particular https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Wikibase/+/1230318 . In my experience the CdxPopover component does not have a stable relation to its anchor element, and the calculations of what width the popover should have (implemented by @floating-ui/vue) change based on the current UI state. I don't have a suggestion about what to do about that other than to take care and ask for support sooner rather than later if this turns out to be a more complicated ticket.

Change #1245342 had a related patch set uploaded (by Arthur taylor; author: Arthur taylor):

[mediawiki/extensions/Wikibase@master] Fix the width of the popover in editableTimeSnakValue

https://gerrit.wikimedia.org/r/1245342

Added a patch for time values. Based on the current patch for T409454, I have the impression that this issue does not / will not affect the coordinate datatype.

Change #1245342 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Fix the width of the popover in editableTimeSnakValue

https://gerrit.wikimedia.org/r/1245342