Skip to content

Add NLI support to Vue left-menu

Eric Eastwood requested to merge 2177-nli-vue-left-menu into develop

Add NLI support to Vue left-menu

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

  • After the mobile support MR is merged, we should update this to hide the left-menu on mobile.

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. Use the section below to enable vue-left-menu for NLI anonymous users (if not already in the diff)
  4. Sign out and visit a chat page
  5. Notice the NLI left-menu with some basic stats/features

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