rancher / dashboard

The Rancher UI
https://rancher.com
Apache License 2.0
462 stars 261 forks source link

Rewrite some part of router logic to avoid modification of the library methods #11145

Open cnotv opened 5 months ago

cnotv commented 5 months ago

Description

Avoid logic applied to the router instance by modifying the method of VueRouter. Follow guidelines to achieve the same result https://router.vuejs.org/guide/

https://github.com/rancher/dashboard/blob/master/shell/plugins/extend-router.js

Note: Comment link to an issue which seems to have been fixed with an update of the library https://github.com/vuejs/vue-router/issues/2881

cnotv commented 3 months ago

@nwmac @gaktive This is also required for the migration due to a change of architecture.

gaktive commented 1 month ago

@cnotv in light of how far we've gone into Vue3, is routing working OK? Do we still need this for 2.10 or is this tech debt for 2.11?

cnotv commented 1 month ago

vuejs/vue-router#2881

Routing for Vue3 has already been reworked. There are some warnings around but are out of scope. This logic still has to be moved within the router logic (here), unless there are some requirements there.

Pushing to 2.11.0.