Only hide Vue left-menu when mobile NLI
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
- Add the feature toggle,
node ./scripts/utils/feature-toggle.js --name vue-left-menu --description "Left menu using Vue (alpha)"
- Enable the feature toggle (doesn't work for NLI anonymous users though)
- When signed in and visiting a room, shows left menu
- On mobile: Visit a room and notice the left-menu
- 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)
- Use the section below to enable
- When just NLI, visit a room and notice left-menu with NLI view
vue-left-menu
for anonymous users
Enable 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