Left-menu mobile styles as a breakpoint
Instead of relying on the isMobile
property from the state driven server-side from the user-agent
, we just decide this based on the size of the viewport (breakpoint).
This helps with people who use Gitter at a smaller size on desktop. The left-menu will just be out of the way when someone page-loads at a small viewport size (especially true for NLI).
- Mobile:
@media (max-width: @left-menu-mobile-breakpoint) {
- Not mobile:
@media not all and (max-width: @left-menu-mobile-breakpoint) {
- Also added
checkMobileBreakpoint()
->public/js/vue/left-menu/mixins/check-mobile-breakpoint.js
for use in the JavaScript
Part of https://gitlab.com/gitlab-org/gitter/webapp/issues/2437
Signed in
. | Above 900px | Below 900px | Below 900px expanded |
---|---|---|---|
After: | |||
Before: | Pinned: | ||
. | . | . | Unpinned: |
Not logged in(NLI)
. | Above 900px | Below 900px | Below 900px expanded |
---|---|---|---|
After | |||
Before | N/A, always expanded |
Testing strategy
- Above 900px
- Signed in
- NLI
- Pinned
- unpinned
- Below 900px
- Signed in
- NLI
Edited by Eric Eastwood