Skip to content

Only hide Vue left-menu when mobile NLI

Eric Eastwood requested to merge 2193-only-hide-left-menu-on-mobile-nli into develop

Only hide Vue left-menu when mobile NLI

Fix https://gitlab.com/gitlab-org/gitter/webapp/issues/2193

Mobile (logged in) Mobile (NLI)

Testing strategy

  1. Add the feature toggle, node ./scripts/utils/feature-toggle.js --name vue-left-menu --description "Left menu using Vue (alpha)"
  2. Enable the feature toggle (doesn't work for NLI anonymous users though)
  3. When signed in and visiting a room, shows left menu
  4. On mobile: Visit a room and notice the left-menu
  5. On mobile: Sign out and visit a room and notice no left-menu
    • Use the section below to enable vue-left-menu for NLI anonymous users (if not already in the diff)
  6. When just NLI, visit a room and notice left-menu with NLI view

Enable vue-left-menu for anonymous users

server/web/context-generator-request.js

// TODO: Remove
features = ['vue-left-menu'];

server/web/middlewares/feature-toggles.js

    // TODO: Remove
    const originalHas = req.fflip.has.bind(req.fflip);
    req.fflip.has = feature => {
      if (feature === 'vue-left-menu') {
        return true;
      }
      return originalHas(feature);
    };
Edited by Eric Eastwood

Merge request reports