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
16b4cf42
Commit
16b4cf42
authored
Sep 01, 2021
by
Florie Guibert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up unecessary uses of deprecated BoardsStore
From board_settings_sidebar and config_toggle
parent
dc00d719
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
17 deletions
+17
-17
app/assets/javascripts/boards/components/board_settings_sidebar.vue
.../javascripts/boards/components/board_settings_sidebar.vue
+2
-3
app/assets/javascripts/boards/components/config_toggle.vue
app/assets/javascripts/boards/components/config_toggle.vue
+0
-8
app/assets/javascripts/boards/config_toggle.js
app/assets/javascripts/boards/config_toggle.js
+1
-2
app/assets/javascripts/boards/index.js
app/assets/javascripts/boards/index.js
+1
-1
ee/spec/frontend/boards/components/board_settings_sidebar_spec.js
...frontend/boards/components/board_settings_sidebar_spec.js
+12
-2
spec/frontend/boards/components/board_settings_sidebar_spec.js
...frontend/boards/components/board_settings_sidebar_spec.js
+1
-1
No files found.
app/assets/javascripts/boards/components/board_settings_sidebar.vue
View file @
16b4cf42
...
...
@@ -3,7 +3,6 @@ import { GlButton, GlDrawer, GlLabel } from '@gitlab/ui';
import
{
MountingPortal
}
from
'
portal-vue
'
;
import
{
mapActions
,
mapState
,
mapGetters
}
from
'
vuex
'
;
import
{
LIST
,
ListType
,
ListTypeTitles
}
from
'
~/boards/constants
'
;
import
boardsStore
from
'
~/boards/stores/boards_store
'
;
import
{
isScopedLabel
}
from
'
~/lib/utils/common_utils
'
;
import
{
__
}
from
'
~/locale
'
;
import
eventHub
from
'
~/sidebar/event_hub
'
;
...
...
@@ -23,7 +22,7 @@ export default {
import
(
'
ee_component/boards/components/board_settings_list_types.vue
'
),
},
mixins
:
[
glFeatureFlagMixin
(),
Tracking
.
mixin
()],
inject
:
[
'
canAdminList
'
],
inject
:
[
'
canAdminList
'
,
'
scopedLabelsAvailable
'
],
inheritAttrs
:
false
,
data
()
{
return
{
...
...
@@ -61,7 +60,7 @@ export default {
methods
:
{
...
mapActions
([
'
unsetActiveId
'
,
'
removeList
'
]),
showScopedLabels
(
label
)
{
return
boardsStore
.
scopedLabels
.
enabled
&&
isScopedLabel
(
label
);
return
this
.
scopedLabelsAvailable
&&
isScopedLabel
(
label
);
},
deleteBoard
()
{
// eslint-disable-next-line no-alert
...
...
app/assets/javascripts/boards/components/config_toggle.vue
View file @
16b4cf42
...
...
@@ -15,11 +15,6 @@ export default {
},
mixins
:
[
Tracking
.
mixin
()],
props
:
{
boardsStore
:
{
type
:
Object
,
required
:
false
,
default
:
null
,
},
canAdminList
:
{
type
:
Boolean
,
required
:
true
,
...
...
@@ -41,9 +36,6 @@ export default {
showPage
()
{
this
.
track
(
'
click_button
'
,
{
label
:
'
edit_board
'
});
eventHub
.
$emit
(
'
showBoardModal
'
,
formType
.
edit
);
if
(
this
.
boardsStore
)
{
this
.
boardsStore
.
showPage
(
formType
.
edit
);
}
},
},
};
...
...
app/assets/javascripts/boards/config_toggle.js
View file @
16b4cf42
...
...
@@ -2,7 +2,7 @@ import Vue from 'vue';
import
{
parseBoolean
}
from
'
~/lib/utils/common_utils
'
;
import
ConfigToggle
from
'
./components/config_toggle.vue
'
;
export
default
(
boardsStore
=
undefined
)
=>
{
export
default
()
=>
{
const
el
=
document
.
querySelector
(
'
.js-board-config
'
);
if
(
!
el
)
{
...
...
@@ -15,7 +15,6 @@ export default (boardsStore = undefined) => {
render
(
h
)
{
return
h
(
ConfigToggle
,
{
props
:
{
boardsStore
,
canAdminList
:
parseBoolean
(
el
.
dataset
.
canAdminList
),
hasScope
:
parseBoolean
(
el
.
dataset
.
hasScope
),
},
...
...
app/assets/javascripts/boards/index.js
View file @
16b4cf42
...
...
@@ -298,7 +298,7 @@ export default () => {
});
}
boardConfigToggle
(
boardsStore
);
boardConfigToggle
();
toggleFocusMode
();
toggleLabels
();
...
...
ee/spec/frontend/boards/components/board_settings_sidebar_spec.js
View file @
16b4cf42
import
{
GlLabel
}
from
'
@gitlab/ui
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
Vuex
from
'
vuex
'
;
...
...
@@ -33,6 +34,7 @@ describe('ee/BoardSettingsSidebar', () => {
wipLimits
:
isWipLimitsOn
,
},
canAdminList
:
false
,
scopedLabelsAvailable
:
true
,
},
stubs
:
{
'
board-settings-sidebar-wip-limit
'
:
BoardSettingsWipLimit
,
...
...
@@ -48,12 +50,20 @@ describe('ee/BoardSettingsSidebar', () => {
it
(
'
confirms we render BoardSettingsSidebarWipLimit
'
,
()
=>
{
createComponent
({
list
:
mockLabelList
,
isWipLimitsOn
:
true
});
expect
(
wrapper
.
find
(
BoardSettingsWipLimit
).
exists
()).
toBe
(
true
);
expect
(
wrapper
.
find
Component
(
BoardSettingsWipLimit
).
exists
()).
toBe
(
true
);
});
it
(
'
confirms we render BoardSettingsListTypes
'
,
()
=>
{
createComponent
({
list
:
mockMilestoneList
});
expect
(
wrapper
.
find
(
BoardSettingsListTypes
).
exists
()).
toBe
(
true
);
expect
(
wrapper
.
findComponent
(
BoardSettingsListTypes
).
exists
()).
toBe
(
true
);
});
it
(
'
passes scoped prop to label when label is scoped
'
,
()
=>
{
createComponent
({
list
:
{
...
mockLabelList
,
label
:
{
...
mockLabelList
.
label
,
title
:
'
foo::bar
'
}
},
});
expect
(
wrapper
.
findComponent
(
GlLabel
).
props
(
'
scoped
'
)).
toBe
(
true
);
});
});
spec/frontend/boards/components/board_settings_sidebar_spec.js
View file @
16b4cf42
import
'
~/boards/models/list
'
;
import
{
GlDrawer
,
GlLabel
}
from
'
@gitlab/ui
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
MountingPortal
}
from
'
portal-vue
'
;
...
...
@@ -44,6 +43,7 @@ describe('BoardSettingsSidebar', () => {
store
,
provide
:
{
canAdminList
,
scopedLabelsAvailable
:
false
,
},
}),
);
...
...
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