In the interest of unifying mobile and desktop (Vector and Minerva) I explored using the existing WvuiTypeaheadSearch component as a swap in replacement for the existing search experience. While it works fine for the tablet and desktop experience of Minerva, it reveals problems in the current mobile friendliness of the component, here are my findings.
Existing experience:
With WVUI (as is now)
Differences
These should be turned into actionables for a future iteration of wvui:
- In mobile the search within pages appears at the top rather than the bottom, this means for large amounts of search results it must be scrolled to. Is that a problem?
- In Vector focusing the search causes the input to shift to the left. In mobile this focus state doesn't make sense. Proposal: Limit the existing focus state with a media query.
- In mobile we currently snap the search results to the entire viewport. Proposal: For lower resolutions, make search results position fixed and full screen.
With wvui proposed changes:
POC: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/MobileFrontend/+/665434