Page MenuHomePhabricator

Allow PageTitleControl to search results from external APIs
Open, MediumPublicFeature

Description

Feature summary (what you would like to be able to do and where):
The PageTitleControl allows to capture a page title and offers results based on the input text. It would be nice if the same control could be used but pointing to an external wiki.

Use case(s)
The Community updates module in GrowthExperiments targets campaign and event organizers who often advertise events that are posted in meta or other wikis.

Notes
Allowing any source could be problematic for legal reasons but the meta use case seems acceptable.


User story & summary:
As a Community organizer, I want to promote my project/event/campaign via the Community Updates module (even if the main page is not on my home wiki), because I want more people to join the initiative.

Background & research:
This task is important because many Campaign pages are hosted on meta wiki, Commons, or other wikis, rather than a local wiki.

From: Special:CommunityConfiguration/CommunityUpdates, the Call to action "Destination page" only allows search and selecting a local wiki page.

Acceptance Criteria:

TBD

Given I'm updating Special:CommunityConfiguration/CommunityUpdates,
When I want to link out to another wiki wiki,
Then I have the ability to type meta:Name of a page and get results from pages in meta.wikimedia.org.
(As opposite of typing Name of page which will lookup results in the local wiki, current behavior).

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Per 1:1 discussion with @Michael we are leaning towards using a text prefix for targeting meta pages, eg: meta:Name of the page. We will need some modification on the description and or help text user to let them know they can use the prefix. Maybe a link to a Help page is the most appropriate? Feedback welcome, cc @KStoller-WMF @JFernandez-WMF

Per 1:1 discussion with @Urbanecm_WMF the ideal solution in CC would work well with Extension:Interwiki. From the Community updates pov it would be fine to accept any interwiki prefix since the MW link renderer service is used to generate the link. However from the CC pov, providing search results for all interwiki prefixes is a fairly complex task since we there's no reliable way to get the right API endpoints for each of the wikis, assuming there's a valid API to query which does not introduce inconsistent results with what can be built using the interwiki URL.

As a trade-off solution, we're proposing to first tackle T374237: PageTitle component should respect user-provided text as input, which will allow the user to save the exact text input they provide. This will allow de-facto to use PageTitleControl with any interwiki, then we can enhance the current search functionality for querying the meta API if a user introduces text starting with meta:

KStoller-WMF set the point value for this task to 3.Oct 1 2024, 4:22 PM

After another consultation round with engineers it seems the general feeling is adding special casing just for meta is not good from the point of view of CommunityConfiguration. That's because, until now, the expectation for an experienced MW user when using an interwiki ` prefix in an autocomplete field would be to not work (in CC1.0 the non-existing page based on user input would display in the menu as a red link, can't remember what happened when clicked). Ideally, CC2.0 would support interwiki as a whole or in case that is not possible, it would introduce a configuration mechanism for using external site prefixes and their corresponding api URL and maybe render URL).

If the outcome of T374237 is good enough for an initial release of CommunityUpdates, we could stall it for now and rephrase this task to search results from external APIs and, maybe, increase its estimation. cc @KStoller-WMF @Urbanecm_WMF

There's also the UI/UX aspect of it. Whether we'd want to keep using text prefixes or maybe introduce a select for the available prefixes. And also there's the question about how to signal a not found page. cc @JFernandez-WMF

If the outcome of T374237 is good enough for an initial release of CommunityUpdates

Yes, I think that is definitely good enough for the initial experiment / release.

I'll update the task description, and we can move this task to 'Triaged' for now. After the initial release, we'll have a clearer idea of whether further work is necessary. While supporting a select for the available prefixes would likely offer a better user experience, I'm not sure it's the most impactful use of our time at this stage. It may be worth waiting to see how many similar cases arise before deciding whether to prioritize further improvements.

KStoller-WMF renamed this task from Allow PageTitleControl to search results from meta.wikimedia.org to Allow PageTitleControl to search results from external APIs.Oct 8 2024, 3:48 PM
KStoller-WMF updated the task description. (Show Details)
KStoller-WMF removed the point value 3 for this task.
Urbanecm_WMF lowered the priority of this task from High to Medium.Feb 19 2025, 9:17 AM

Lowering priority to reflect reality.