Description
When the precise search term was not found, desktop MediaWiki search results include a red link using which a new article can be created:
Such a red link doesn't appear on the Codex or mobile search results (which will be eventually replaced by Codex). We should add one so that people can more easily create pages from mobile.
Note: there are two different search experiences on mobile: JS and non-JS. The non-JS experience is shared between desktop and mobile and as such any updates will need more consideration. It has its own task here: [will add link].
Designs
current desktop | current mobile | proposed mobile |
When the precise search term was not found, desktop MediaWiki search results include a red link using which a new article can be created. Such a red link doesn't appear on the mobile search results. We should add one so that people can more easily create pages from mobile. There seem to be two cases to consider here (both sometimes have the additional "Did you mean" element present):
no page found, search term not found in other pages | no page found, search term found in other pages |
Developer notes
For mobile, this is blocked on T282473
This will require changes to the Codex Typeahead search using inheritance right now. While that code remains in that form this may work against our removal of technical debt so we may want to stall this until that happens.
Deprecated searchoverlay code
Showing the red link on https://en.m.wikipedia.org/w/index.php?search=Fooassa&title=Special%3ASearch&profile=default&fulltext=1&ns0=1
involves removing the CSS rule: .mw-search-createlink the red link drawer will then work
TODO
- It should be possible to trigger red link creation from the Codex search component
- Remove the CSS hiding the red link creation links on the special:search page on mobile.