Fix SPA room switcher to always just fallback to redirecting the window (navigation, history)
Fix SPA room switcher to always just fallback to redirecting the window (navigation, history, popstate, pushstate)
Fixes all of the history, navigation, redirection issues we were seeing
Fix https://gitlab.com/gitlab-org/gitter/webapp/issues/2181, https://gitlab.com/gitlab-org/gitter/webapp/issues/2170, https://gitlab.com/gitlab-org/gitter/webapp/issues/2171, https://gitlab.com/gitlab-org/gitter/webapp/issues/2179
Previous MR where we touched the SPA room switcher, https://gitlab.com/gitlab-org/gitter/webapp/merge_requests/1428
Testing strategy
- Add the feature toggle,
node ./scripts/utils/feature-toggle.js --name vue-left-menu --description "Left menu using Vue (alpha)"
- Enable the feature toggle
https://gitlab.com/gitlab-org/gitter/webapp/issues/2181
- Visit a room
- Click on the globe to go to the community/org home
- Press back, and notice you are back in the room with the URL updated
https://gitlab.com/gitlab-org/gitter/webapp/issues/2170
- Visit a room
- Delete the room
- Notice how you are redirected to the userhome
/home
https://gitlab.com/gitlab-org/gitter/webapp/issues/2171
- Visit a room
- Leave the room
- Notice how you are redirected to the userhome
/home
https://gitlab.com/gitlab-org/gitter/webapp/issues/2179
- Visit a room where another user has chatted
- In the user popover, click the "Chat privately" option
- Notice how you are redirected to chatting with that user