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
7dc7cb0e
Commit
7dc7cb0e
authored
May 06, 2021
by
Florie Guibert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Boards - Hide EE components in CE
Hide epic, weight and iteration in EE board sidebar
parent
1d48e365
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
6 deletions
+54
-6
app/assets/javascripts/boards/components/board_content.vue
app/assets/javascripts/boards/components/board_content.vue
+1
-1
app/assets/javascripts/boards/components/board_content_sidebar.vue
...s/javascripts/boards/components/board_content_sidebar.vue
+20
-4
ee/app/assets/javascripts/boards/components/board_content_sidebar.vue
...s/javascripts/boards/components/board_content_sidebar.vue
+21
-0
ee/spec/frontend/boards/components/board_content_sidebar_spec.js
.../frontend/boards/components/board_content_sidebar_spec.js
+12
-1
No files found.
app/assets/javascripts/boards/components/board_content.vue
View file @
7dc7cb0e
...
...
@@ -16,7 +16,7 @@ export default {
gon
.
features
?.
graphqlBoardLists
||
gon
.
features
?.
epicBoards
?
BoardColumn
:
BoardColumnDeprecated
,
BoardContentSidebar
:
()
=>
import
(
'
~
/boards/components/board_content_sidebar.vue
'
),
BoardContentSidebar
:
()
=>
import
(
'
ee_else_ce
/boards/components/board_content_sidebar.vue
'
),
EpicBoardContentSidebar
:
()
=>
import
(
'
ee_component/boards/components/epic_board_content_sidebar.vue
'
),
EpicsSwimlanes
:
()
=>
import
(
'
ee_component/boards/components/epics_swimlanes.vue
'
),
...
...
app/assets/javascripts/boards/components/board_content_sidebar.vue
View file @
7dc7cb0e
...
...
@@ -11,7 +11,6 @@ import { contentTop } from '~/lib/utils/common_utils';
import
SidebarAssigneesWidget
from
'
~/sidebar/components/assignees/sidebar_assignees_widget.vue
'
;
import
SidebarConfidentialityWidget
from
'
~/sidebar/components/confidential/sidebar_confidentiality_widget.vue
'
;
import
SidebarSubscriptionsWidget
from
'
~/sidebar/components/subscriptions/sidebar_subscriptions_widget.vue
'
;
import
glFeatureFlagsMixin
from
'
~/vue_shared/mixins/gl_feature_flags_mixin
'
;
export
default
{
headerHeight
:
`
${
contentTop
()}
px`
,
...
...
@@ -32,7 +31,11 @@ export default {
SidebarIterationWidget
:
()
=>
import
(
'
ee_component/sidebar/components/sidebar_iteration_widget.vue
'
),
},
mixins
:
[
glFeatureFlagsMixin
()],
inject
:
{
weightFeatureAvailable
:
{
default
:
false
,
},
},
computed
:
{
...
mapGetters
([
'
isSidebarOpen
'
,
...
...
@@ -50,6 +53,15 @@ export default {
fullPath
()
{
return
this
.
activeBoardItem
?.
referencePath
?.
split
(
'
#
'
)[
0
]
||
''
;
},
showEpicSelector
()
{
return
false
;
},
showIterationSelector
()
{
return
false
;
},
showWeightSelector
()
{
return
false
;
},
},
methods
:
{
...
mapActions
([
'
toggleBoardItem
'
,
'
setAssignees
'
,
'
setActiveItemConfidential
'
]),
...
...
@@ -77,10 +89,11 @@ export default {
class=
"assignee"
@
assignees-updated=
"setAssignees"
/>
<board-sidebar-epic-select
class=
"epic"
/>
<board-sidebar-epic-select
v-if=
"showEpicSelector"
class=
"epic"
/>
<div>
<board-sidebar-milestone-select
/>
<sidebar-iteration-widget
v-if=
"showIterationSelector"
:iid=
"activeBoardItem.iid"
:workspace-path=
"projectPathForActiveIssue"
:iterations-workspace-path=
"groupPathForActiveIssue"
...
...
@@ -91,7 +104,10 @@ export default {
<board-sidebar-time-tracker
class=
"swimlanes-sidebar-time-tracker"
/>
<board-sidebar-due-date
/>
<board-sidebar-labels-select
class=
"labels"
/>
<board-sidebar-weight-input
v-if=
"glFeatures.issueWeights"
class=
"weight"
/>
<board-sidebar-weight-input
v-if=
"weightFeatureAvailable && showWeightSelector"
class=
"weight"
/>
<sidebar-confidentiality-widget
:iid=
"activeBoardItem.iid"
:full-path=
"fullPath"
...
...
ee/app/assets/javascripts/boards/components/board_content_sidebar.vue
0 → 100644
View file @
7dc7cb0e
<
script
>
// This is a false violation of @gitlab/no-runtime-template-compiler, since it
// extends a valid Vue single file component.
/* eslint-disable @gitlab/no-runtime-template-compiler */
import
BoardContentSidebarFoss
from
'
~/boards/components/board_content_sidebar.vue
'
;
export
default
{
extends
:
BoardContentSidebarFoss
,
computed
:
{
showEpicSelector
()
{
return
true
;
},
showIterationSelector
()
{
return
true
;
},
showWeightSelector
()
{
return
true
;
},
},
};
</
script
>
ee/spec/frontend/boards/components/board_content_sidebar_spec.js
View file @
7dc7cb0e
import
{
GlDrawer
}
from
'
@gitlab/ui
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
Vuex
from
'
vuex
'
;
import
BoardContentSidebar
from
'
ee_component/boards/components/board_content_sidebar.vue
'
;
import
BoardSidebarEpicSelect
from
'
ee_component/boards/components/sidebar/board_sidebar_epic_select.vue
'
;
import
BoardSidebarWeightInput
from
'
ee_component/boards/components/sidebar/board_sidebar_weight_input.vue
'
;
import
SidebarIterationWidget
from
'
ee_component/sidebar/components/sidebar_iteration_widget
'
;
import
{
stubComponent
}
from
'
helpers/stub_component
'
;
import
BoardContentSidebar
from
'
~/boards/components/board_content_sidebar.vue
'
;
import
{
ISSUABLE
,
issuableTypes
}
from
'
~/boards/constants
'
;
import
{
mockIssue
,
mockIssueGroupPath
,
mockIssueProjectPath
}
from
'
../mock_data
'
;
...
...
@@ -45,6 +47,7 @@ describe('ee/BoardContentSidebar', () => {
canUpdate
:
true
,
rootPath
:
'
/
'
,
groupId
:
1
,
weightFeatureAvailable
:
true
,
},
store
,
stubs
:
{
...
...
@@ -83,4 +86,12 @@ describe('ee/BoardContentSidebar', () => {
it
(
'
renders SidebarIterationWidget
'
,
()
=>
{
expect
(
wrapper
.
find
(
SidebarIterationWidget
).
exists
()).
toBe
(
true
);
});
it
(
'
renders BoardSidebarEpicSelect
'
,
()
=>
{
expect
(
wrapper
.
find
(
BoardSidebarEpicSelect
).
exists
()).
toBe
(
true
);
});
it
(
'
renders BoardSidebarWeightInput
'
,
()
=>
{
expect
(
wrapper
.
find
(
BoardSidebarWeightInput
).
exists
()).
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