Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
f49a15b9
Commit
f49a15b9
authored
Jan 02, 2020
by
Martin Wortschack
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove breakpoints utils
- Removes deprecated breakpoint utils
parent
16f76007
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
50 deletions
+0
-50
app/assets/javascripts/breakpoints.js
app/assets/javascripts/breakpoints.js
+0
-22
spec/frontend/breakpoints_spec.js
spec/frontend/breakpoints_spec.js
+0
-27
spec/javascripts/merge_request_tabs_spec.js
spec/javascripts/merge_request_tabs_spec.js
+0
-1
No files found.
app/assets/javascripts/breakpoints.js
deleted
100644 → 0
View file @
16f76007
export
const
breakpoints
=
{
lg
:
1200
,
md
:
992
,
sm
:
768
,
xs
:
0
,
};
const
BreakpointInstance
=
{
windowWidth
:
()
=>
window
.
innerWidth
,
getBreakpointSize
()
{
const
windowWidth
=
this
.
windowWidth
();
const
breakpoint
=
Object
.
keys
(
breakpoints
).
find
(
key
=>
windowWidth
>
breakpoints
[
key
]);
return
breakpoint
;
},
isDesktop
()
{
return
[
'
lg
'
,
'
md
'
].
includes
(
this
.
getBreakpointSize
());
},
};
export
default
BreakpointInstance
;
spec/frontend/breakpoints_spec.js
deleted
100644 → 0
View file @
16f76007
import
bp
,
{
breakpoints
}
from
'
~/breakpoints
'
;
describe
(
'
breakpoints
'
,
()
=>
{
Object
.
keys
(
breakpoints
).
forEach
(
key
=>
{
const
size
=
breakpoints
[
key
];
it
(
`returns
${
key
}
when larger than
${
size
}
`
,
()
=>
{
jest
.
spyOn
(
bp
,
'
windowWidth
'
).
mockReturnValue
(
size
+
10
);
expect
(
bp
.
getBreakpointSize
()).
toBe
(
key
);
});
});
describe
(
'
isDesktop
'
,
()
=>
{
it
(
'
returns true when screen size is medium
'
,
()
=>
{
jest
.
spyOn
(
bp
,
'
windowWidth
'
).
mockReturnValue
(
breakpoints
.
md
+
10
);
expect
(
bp
.
isDesktop
()).
toBe
(
true
);
});
it
(
'
returns false when screen size is small
'
,
()
=>
{
jest
.
spyOn
(
bp
,
'
windowWidth
'
).
mockReturnValue
(
breakpoints
.
sm
+
10
);
expect
(
bp
.
isDesktop
()).
toBe
(
false
);
});
});
});
spec/javascripts/merge_request_tabs_spec.js
View file @
f49a15b9
...
...
@@ -3,7 +3,6 @@ import MockAdapter from 'axios-mock-adapter';
import
axios
from
'
~/lib/utils/axios_utils
'
;
import
MergeRequestTabs
from
'
~/merge_request_tabs
'
;
import
'
~/commit/pipelines/pipelines_bundle
'
;
import
'
~/breakpoints
'
;
import
'
~/lib/utils/common_utils
'
;
import
'
vendor/jquery.scrollTo
'
;
import
initMrPage
from
'
./helpers/init_vue_mr_page_helper
'
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment