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
3eff43a0
Commit
3eff43a0
authored
Jan 30, 2019
by
Kushal Pandya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add toggle sidebar button to be visible only in mobile screen sizes
parent
653ddceb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
1 deletion
+21
-1
ee/app/assets/javascripts/epic/components/epic_header.vue
ee/app/assets/javascripts/epic/components/epic_header.vue
+11
-1
ee/spec/javascripts/epic/components/epic_header_spec.js
ee/spec/javascripts/epic/components/epic_header_spec.js
+10
-0
No files found.
ee/app/assets/javascripts/epic/components/epic_header.vue
View file @
3eff43a0
...
...
@@ -24,6 +24,7 @@ export default {
},
computed
:
{
...
mapState
([
'
sidebarCollapsed
'
,
'
epicDeleteInProgress
'
,
'
epicStatusChangeInProgress
'
,
'
author
'
,
...
...
@@ -64,7 +65,7 @@ export default {
});
},
methods
:
{
...
mapActions
([
'
requestEpicStatusChangeSuccess
'
,
'
toggleEpicStatus
'
]),
...
mapActions
([
'
toggleSidebar
'
,
'
requestEpicStatusChangeSuccess
'
,
'
toggleEpicStatus
'
]),
},
};
</
script
>
...
...
@@ -103,5 +104,14 @@ export default {
@
click=
"toggleEpicStatus(isEpicOpen)"
/>
</div>
<button
:aria-label=
"__('Toggle sidebar')"
class=
"btn btn-default float-right d-block d-sm-none
gutter-toggle issuable-gutter-toggle js-sidebar-toggle"
type=
"button"
@
click=
"toggleSidebar(
{ sidebarCollapsed })"
>
<i
class=
"fa fa-angle-double-left"
></i>
</button>
</div>
</
template
>
ee/spec/javascripts/epic/components/epic_header_spec.js
View file @
3eff43a0
...
...
@@ -124,5 +124,15 @@ describe('EpicHeaderComponent', () => {
'
Close epic
'
,
);
});
it
(
'
renders toggle sidebar button element
'
,
()
=>
{
const
toggleButtonEl
=
vm
.
$el
.
querySelector
(
'
button.js-sidebar-toggle
'
);
expect
(
toggleButtonEl
).
not
.
toBeNull
();
expect
(
toggleButtonEl
.
getAttribute
(
'
aria-label
'
)).
toBe
(
'
Toggle sidebar
'
);
expect
(
toggleButtonEl
.
classList
.
contains
(
'
d-block
'
)).
toBe
(
true
);
expect
(
toggleButtonEl
.
classList
.
contains
(
'
d-sm-none
'
)).
toBe
(
true
);
expect
(
toggleButtonEl
.
classList
.
contains
(
'
gutter-toggle
'
)).
toBe
(
true
);
});
});
});
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