Skip to content

Set up router and router views

Eric Gardner requested to merge router into main

This merge request introduces vue-router to the project, making it a true single-page app.

The routes are defined in src/router.ts. Currently there are only two:

  • StartView is the default landing page, which contains a search form that the user can use to look up a page
  • ResultsView will contain all the information for a particular page after a search has been performed.

If users arrive to the app with various search params in their URL already, those can be handled by the router as well. This would allow us to do things like take the user straight to the results page from Special:WhatLinksHere, and it will also make it easier to keep the URL in sync with any additional queries they make within the app.

This merge request also includes a few smaller changes, including:

  • More Vue/Typescript/ESLint wrangling (I think this is finally working now)
  • Adds @wikimedia/codex-icons as a dependency so those can now be used
  • Normalize.css and some very basic styles have been added but eventually a lot more attention will be needed here

Merge request reports