Page MenuHomePhabricator

[MEX] M4.1.7 - url
Closed, ResolvedPublic

Description

As a wikidata editor, i want to be enabled to enter URLs relevant to the information of an item.

Screenshot 2026-02-11 at 14.12.10.png (716×1 px, 137 KB)

Figma file here

Acceptance Criteria

  • the input field for URL is a simple text input
  • the error check only occurs once the user attempts to publish - therefore if there is an error, we remain consistent with errors while publishing and display an error message with the error content
  • the output on the display side is a link
  • should call the keyboard that is for typing urls (https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#inputmode) (codex component has a prop for this)
  • tests are updated or created as needed

Questions open (or UX debt?) data quality related
From task time: the below two questions are deemed out of scope for the MEX project and will be pursued in a separate ticket.

  • can we add the https: to an otherwise good looking url if this is the only thing missing?
  • can we have additional checks, like a proper ending (.com, .org, etc)

IDEALLY we could check these things as the user writes and not only when he tries to publish.... (UX debt)

Event Timeline

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

@Alice.moutinho The error handling here relies on us rendering the server-provided error message. In the screenshot / design, we have 'Could not save due to an error. <server-provided-message>'. Should we adopt this as a generic strategy for all errors (would make our error-handling more expressive, but might create some unexpected string combinations like "Could not save due to an error. Could not connect to the server. Make sure you have a working internet connection and try again.")? Or do we only for errors of type 'modification-error'? Or only for 'modification-errors' on the URL form?

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

[mediawiki/extensions/Wikibase@master] [WIP] Support URL datatype in wbui2025

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

Hello @ArthurTaylor, let's just reproduce exactly the error text from Wikibase production everywhere consistently with the design provided.

Error handling needs serious improving - as we keep discovering during the current project - but i think this will come at some point in an epic ( right @karapayneWMDE , @Arian_Bozorg? :D )

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

[mediawiki/extensions/Wikibase@master] Minor test suite fixes - remove unused properties

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

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

[mediawiki/extensions/Wikibase@master] Fix publishing progress bar cancellation

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

Change #1239311 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Minor test suite fixes - remove unused properties

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

Change #1239317 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Fix publishing progress bar cancellation

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

Change #1239300 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Support URL datatype in wbui2025

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

UX issue found: In case the URL was very long, it will break the layout with the overflow string.
It should have something like overflow-wrap: anywhere to fit the long URLs in the same container without breaking the design.

image.png (1×534 px, 111 KB)

Moving the task back to "Ready for development".

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

[mediawiki/extensions/Wikibase@master] Fix wrapping for URLs with long unbroken strings

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

Change #1243076 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Fix wrapping for URLs with long unbroken strings

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

Tech verification: All the observed issues were fixed and merged.
Moving to "Product Verification".