Skip to content

Remove cyclic invocation from room navigation

Tomas Vik requested to merge no-cyclic-navigation into develop

The problem is the following loop:

graph LR
A[vue action:changeDisplayedRoom] -- navigation event --> B[router-app:on navigation]
B --> C[roomSwitcher:change]
C --> A

This code within router-app navigation event handler:

    if (parsed.pathname === window.location.pathname) {
      pushStateWithTitleBar(url, title);

      return;
    }

stops the loop but not until the execution makes the second pass through vue action and part of the navigation logic.

This MR is going a long way towards removing spa-room-switcher with all its iframe logic.

Testing strategy

  1. Navigation on the chat route
    1. Switching between rooms using the left menu
    2. Clicking on PRIVATE CHAT button in a user popup
    3. Redirect after creating a room
    4. Navigating from the room search (both joined and not joined rooms)
  2. navigation from other routes
    1. going to a room from the explore page

Related issues in the past

Edited by Tomas Vik

Merge request reports