Page MenuHomePhabricator

[Task] Implement snakformatter for identifiers
Closed, ResolvedPublic

Description

Introduce an IDValueSnakFormatter (for datatype "ID", for HTML; perhaps we also need an implementation for wikitext output) which uses a lookup service to get the formatter URL to use for linking IDs associated with a specific property. IDValueSnakFormatter could in the future take advantage of derived values (the full URL) being present in the PropertyValueSnak, if/when this is implemented (see T112550).

IDValueSnakFormatter may or may not use a ValueFormatter internally.

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.

Event Timeline

daniel created this task.Sep 16 2015, 3:28 PM
daniel raised the priority of this task from to Medium.
daniel updated the task description. (Show Details)
daniel moved this task from incoming to ready to go on the Wikidata board.Sep 16 2015, 3:33 PM
Jonas renamed this task from Introduce an IDValueSnakFormatter to [Task] Introduce an IDValueSnakFormatter.Nov 2 2015, 1:20 PM
Jonas set Security to None.

Camel case please. Either EntityIdValueSnakFormatter, if this is meant to format EntityIdValue objects. Or if this is not about entity ids, you need to be much, much more specific and avoid "id" at all, if possible.

Change 254473 had a related patch set uploaded (by Daniel Kinzler):
Introduce SnakFormatters for ID snaks.

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

daniel added a comment.EditedNov 20 2015, 8:48 PM

Or if this is not about entity ids, you need to be much, much more specific and avoid "id" at all, if possible.

It's HtmlIdValueSnakFormatter and WikitextIdValueSnakFormatter now. And they are formatters for the "ID" data type, as stated in the task description. I don't know how I can be more specific here.

Jonas renamed this task from [Task] Introduce an IDValueSnakFormatter to [Task] Implement snakformatter for identifiers.Nov 23 2015, 3:30 PM

The datatype should not be called "ID". Is this proposed somewhere? I never heard of that. This would be confusing as hell, in my opinion. It should be "identifier". The classes dealing with identifiers should also be called "HtmlIdentifierFormatter" and such.

I don't care much what it is called. IIRC, "ID" was the original proposal, but I really don't care.

What I don't see is how "identifier" is less confusing than "ID". It means the same thing, neither name provides more information or context.

Change 254473 merged by jenkins-bot:
Introduce SnakFormatters for ID snaks.

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

daniel closed this task as Resolved.Dec 18 2015, 3:50 PM
daniel claimed this task.