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
c3a7d311
Commit
c3a7d311
authored
Jun 25, 2020
by
Axel García
Committed by
Miguel Rincon
Jul 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Wrap epic header buttons on mobile
This also replaces <gl-deprecated-button> with <gl-button>
parent
92decc3b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
23 deletions
+28
-23
ee/app/assets/javascripts/epic/components/epic_header.vue
ee/app/assets/javascripts/epic/components/epic_header.vue
+26
-20
ee/app/assets/stylesheets/pages/epics.scss
ee/app/assets/stylesheets/pages/epics.scss
+0
-1
ee/spec/frontend/epic/components/epic_header_spec.js
ee/spec/frontend/epic/components/epic_header_spec.js
+2
-2
No files found.
ee/app/assets/javascripts/epic/components/epic_header.vue
View file @
c3a7d311
<
script
>
<
script
>
import
{
mapState
,
mapGetters
,
mapActions
}
from
'
vuex
'
;
import
{
mapState
,
mapGetters
,
mapActions
}
from
'
vuex
'
;
import
{
Gl
Deprecated
Button
,
GlIcon
}
from
'
@gitlab/ui
'
;
import
{
GlButton
,
GlIcon
}
from
'
@gitlab/ui
'
;
import
{
__
}
from
'
~/locale
'
;
import
{
__
}
from
'
~/locale
'
;
...
@@ -18,7 +18,7 @@ export default {
...
@@ -18,7 +18,7 @@ export default {
},
},
components
:
{
components
:
{
GlIcon
,
GlIcon
,
Gl
Deprecated
Button
,
GlButton
,
UserAvatarLink
,
UserAvatarLink
,
TimeagoTooltip
,
TimeagoTooltip
,
GitlabTeamMemberBadge
:
()
=>
GitlabTeamMemberBadge
:
()
=>
...
@@ -48,7 +48,7 @@ export default {
...
@@ -48,7 +48,7 @@ export default {
// False positive css classes
// False positive css classes
// https://gitlab.com/gitlab-org/frontend/eslint-plugin-i18n/issues/24
// https://gitlab.com/gitlab-org/frontend/eslint-plugin-i18n/issues/24
// eslint-disable-next-line @gitlab/require-i18n-strings
// eslint-disable-next-line @gitlab/require-i18n-strings
return
`
btn btn-grouped
js-btn-epic-action qa-close-reopen-epic-button
${
return
`js-btn-epic-action qa-close-reopen-epic-button
${
this
.
isEpicOpen
?
'
btn-close
'
:
'
btn-open
'
this
.
isEpicOpen
?
'
btn-close
'
:
'
btn-open
'
}
`
;
}
`
;
},
},
...
@@ -83,7 +83,7 @@ export default {
...
@@ -83,7 +83,7 @@ export default {
</
script
>
</
script
>
<
template
>
<
template
>
<div
class=
"detail-page-header"
>
<div
class=
"detail-page-header
gl-flex-wrap gl-py-3
"
>
<div
class=
"detail-page-header-body"
>
<div
class=
"detail-page-header-body"
>
<div
<div
:class=
"
{ 'status-box-open': isEpicOpen, 'status-box-issue-closed': !isEpicOpen }"
:class=
"
{ 'status-box-open': isEpicOpen, 'status-box-issue-closed': !isEpicOpen }"
...
@@ -115,32 +115,38 @@ export default {
...
@@ -115,32 +115,38 @@ export default {
</strong>
</strong>
</div>
</div>
</div>
</div>
<div
class=
"detail-page-header-actions js-issuable-actions"
>
<gl-button
<gl-deprecated-button
:aria-label=
"__('Toggle sidebar')"
class=
"float-right gl-display-block d-sm-none gl-align-self-center gutter-toggle issuable-gutter-toggle js-sidebar-toggle"
type=
"button"
@
click=
"toggleSidebar(
{ sidebarCollapsed })"
>
<i
class=
"fa fa-angle-double-left"
></i>
</gl-button>
<div
class=
"detail-page-header-actions gl-display-flex gl-flex-wrap gl-align-items-center gl-w-full gl-w-sm-auto js-issuable-actions"
>
<gl-button
v-if=
"canUpdate"
v-if=
"canUpdate"
:loading=
"epicStatusChangeInProgress"
:loading=
"epicStatusChangeInProgress"
:class=
"actionButtonClass"
:class=
"actionButtonClass"
category=
"secondary"
variant=
"warning"
class=
"gl-mt-3 gl-mt-sm-0 gl-w-full gl-w-sm-auto"
@
click=
"toggleEpicStatus(isEpicOpen)"
@
click=
"toggleEpicStatus(isEpicOpen)"
>
{{
actionButtonText
}}
</gl-deprecated-button
>
>
{{
actionButtonText
}}
<gl-deprecated-button
</gl-button>
<gl-button
v-if=
"userCanCreate"
v-if=
"userCanCreate"
class=
"btn btn-grouped btn-success btn-inverted js-new-epic-button"
:href=
"newEpicWebUrl"
:href=
"newEpicWebUrl"
data-testid=
"new-epic-button"
data-testid=
"new-epic-button"
class=
"gl-mt-3 gl-mt-sm-0 gl-ml-sm-3 gl-w-full gl-w-sm-auto"
category=
"secondary"
variant=
"success"
>
>
{{
__
(
'
New epic
'
)
}}
{{
__
(
'
New epic
'
)
}}
</gl-
deprecated-
button>
</gl-button>
</div>
</div>
<gl-deprecated-button
:aria-label=
"__('Toggle sidebar')"
variant=
"secondary"
class=
"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>
</gl-deprecated-button>
</div>
</div>
</
template
>
</
template
>
ee/app/assets/stylesheets/pages/epics.scss
View file @
c3a7d311
...
@@ -72,7 +72,6 @@
...
@@ -72,7 +72,6 @@
}
}
.detail-page-header-actions
{
.detail-page-header-actions
{
width
:
auto
;
margin-top
:
0
;
margin-top
:
0
;
}
}
}
}
...
...
ee/spec/frontend/epic/components/epic_header_spec.js
View file @
c3a7d311
...
@@ -70,7 +70,7 @@ describe('EpicHeaderComponent', () => {
...
@@ -70,7 +70,7 @@ describe('EpicHeaderComponent', () => {
vm
.
$store
.
state
.
state
=
statusType
.
open
;
vm
.
$store
.
state
.
state
=
statusType
.
open
;
expect
(
vm
.
actionButtonClass
).
toBe
(
expect
(
vm
.
actionButtonClass
).
toBe
(
'
btn btn-grouped
js-btn-epic-action qa-close-reopen-epic-button btn-close
'
,
'
js-btn-epic-action qa-close-reopen-epic-button btn-close
'
,
);
);
});
});
...
@@ -78,7 +78,7 @@ describe('EpicHeaderComponent', () => {
...
@@ -78,7 +78,7 @@ describe('EpicHeaderComponent', () => {
vm
.
$store
.
state
.
state
=
statusType
.
close
;
vm
.
$store
.
state
.
state
=
statusType
.
close
;
expect
(
vm
.
actionButtonClass
).
toBe
(
expect
(
vm
.
actionButtonClass
).
toBe
(
'
btn btn-grouped
js-btn-epic-action qa-close-reopen-epic-button btn-open
'
,
'
js-btn-epic-action qa-close-reopen-epic-button btn-open
'
,
);
);
});
});
});
});
...
...
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