Page MenuHomePhabricator

Move "Short Descriptions" feature outside of main Wikibase.git code
Open, LowPublic

Description

This feature was not implemented by the Wikidata / WIkibase team and is not maintained by the team either.
It was introduced in T184000: Magic word on English WP to override display of Wikidata short description and even then it probably should not have been added to Wikibase.git
Right now I would propose that this be moved to some extension controlled and owned by whichever WMF team owns this feature, OR to a package within Wikibase.git that has clearly defined owners.

Quickly looking through the code it would appear that this would be:

  • definition of 2 magic words
  • 2 config settings
  • localization messages
  • The API implementation Wikibase\Client\Api\Description
  • A hook handler Wikibase\Client\Hooks\DescriptionProviderHookHandler
  • The parser function handler Wikibase\Client\Hooks\ShortDescHandler
  • UsageLookup for the feature

And it may also require a new hook or extension mechanism for this usage related bit.


NOTE: Short descriptions should be able to define in different languages (especially for language variants)

Event Timeline

Addshore renamed this task from Move "Short Descriptions" outside WIkibase.git to Move "Short Descriptions" outside Wikibase.git.May 6 2021, 5:44 PM
Addshore added a subscriber: Tgr.

Originally requested in T189154, shortly following the initial representation. That task reflected the fact that placing the "short description" functionality in Wikibase code has been a temporary solution.

There is Extension:ShortDescription which reimplements the same functionality and interface on a non-Wikibase basis. If the maintainer is up to it, maybe the Wikibase-related functionality could be moved over there.

There is Extension:ShortDescription which reimplements the same functionality and interface on a non-Wikibase basis. If the maintainer is up to it, maybe the Wikibase-related functionality could be moved over there.

@alistair3149: You may be interested to move this extension to Gerrit.

Note as I said in T282172: Make short description work independent of Wikibase (create new short description extension), we need a version that can be co-operated with Wikibase.

There is Extension:ShortDescription which reimplements the same functionality and interface on a non-Wikibase basis. If the maintainer is up to it, maybe the Wikibase-related functionality could be moved over there.

@alistair3149: You may be interested to move this extension to Gerrit.

Note as I said in T282172: Make short description work independent of Wikibase (create new short description extension), we need a version that can be co-operated with Wikibase.

Thanks for the ping. I don't have any knowledge on Wikibase so I'm unsure how to proceed on the topic. And that I'm not confident if I'm able to maintain the extension for WMF production uses by myself.

There is Extension:ShortDescription which reimplements the same functionality and interface on a non-Wikibase basis. If the maintainer is up to it, maybe the Wikibase-related functionality could be moved over there.

Isn't there a WMF team that is responsible for maintaining this API?

I see in the other ticket

maybe WMF Audiences should take ownership of it

Isn't there a WMF team that is responsible for maintaining this API?

It was created by Product Infrastructure. The corresponding editing API (which btw should probably be also moved, not sure where it lives currently) is being (has been? not sure) worked on by PET. So probably one of them.

Tagging Product Infra for visibility.

AFAIK local descriptions are still only used by English WP, but I think I recently saw some discussion of another wiki being interested in using them.

AMooney moved this task from Inbox to Tracking/Watching on the Platform Engineering board.

@Tgr @Mholloway I'd be interested in generalizing this as part of T225529 to move the special handling code out of MobileFrontend too. Happy to talk through this and help review code with someone else that's able to work on this.

We could have a hook or service in core for providing a short description for the page, with a null implementation, overridden in Wikibase. That's kind of orthogonal to moving the implementation out of Wikibase, but does seem like a good idea. Whether the short description is used in search etc. could then be up to the skin.

The corresponding editing API (which btw should probably be also moved, not sure where it lives currently) is being (has been? not sure) worked on by PET.

I'm also curious to know where this API is, as I have not seen it!

We could have a hook or service in core for providing a short description for the page, with a null implementation, overridden in Wikibase. That's kind of orthogonal to moving the implementation out of Wikibase, but does seem like a good idea. Whether the short description is used in search etc. could then be up to the skin.

Sounds like a good direction from my side

We could have a hook or service in core for providing a short description for the page, with a null implementation, overridden in Wikibase. That's kind of orthogonal to moving the implementation out of Wikibase, but does seem like a good idea. Whether the short description is used in search etc. could then be up to the skin.

Related: T213505: RfC: OpenGraph descriptions in wiki pages, T230947: Support other ways to get the description of the page (which do not require Wikidata to be installed)

Addshore renamed this task from Move "Short Descriptions" outside Wikibase.git to Move "Short Descriptions" feature outside of main Wikibase.git code.Jul 16 2021, 8:58 AM
Addshore updated the task description. (Show Details)