Commit 0db7c56a authored by Clement Ho's avatar Clement Ho

Merge branch 'mw-gl-breakpoints-3' into 'master'

Replace breakpoints with GlBreakpointInstance in issuable_context.js

See merge request gitlab-org/gitlab!22008
parents a777b7a4 a093f6cb
import $ from 'jquery'; import $ from 'jquery';
import Cookies from 'js-cookie'; import Cookies from 'js-cookie';
import bp from './breakpoints'; import { GlBreakpointInstance as bp } from '@gitlab/ui/dist/utils';
import UsersSelect from './users_select'; import UsersSelect from './users_select';
export default class IssuableContext { export default class IssuableContext {
...@@ -48,7 +48,9 @@ export default class IssuableContext { ...@@ -48,7 +48,9 @@ export default class IssuableContext {
window.addEventListener('beforeunload', () => { window.addEventListener('beforeunload', () => {
// collapsed_gutter cookie hides the sidebar // collapsed_gutter cookie hides the sidebar
const bpBreakpoint = bp.getBreakpointSize(); const bpBreakpoint = bp.getBreakpointSize();
if (bpBreakpoint === 'xs' || bpBreakpoint === 'sm') { const supportedSizes = ['xs', 'sm', 'md'];
if (supportedSizes.includes(bpBreakpoint)) {
Cookies.set('collapsed_gutter', true); Cookies.set('collapsed_gutter', true);
} }
}); });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment