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
a2edabc8
Commit
a2edabc8
authored
Dec 14, 2020
by
Florie Guibert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Boards - Remove List model from GraphQL boards
Review feedback
parent
1a19552e
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
34 additions
and
17 deletions
+34
-17
app/assets/javascripts/boards/components/board_list_header_new.vue
...s/javascripts/boards/components/board_list_header_new.vue
+13
-7
app/assets/javascripts/boards/components/board_list_new.vue
app/assets/javascripts/boards/components/board_list_new.vue
+11
-3
ee/spec/frontend/boards/components/board_list_header_new_spec.js
.../frontend/boards/components/board_list_header_new_spec.js
+3
-3
locale/gitlab.pot
locale/gitlab.pot
+3
-0
spec/frontend/boards/components/board_list_header_new_spec.js
.../frontend/boards/components/board_list_header_new_spec.js
+2
-2
spec/frontend/boards/mock_data.js
spec/frontend/boards/mock_data.js
+2
-2
No files found.
app/assets/javascripts/boards/components/board_list_header_new.vue
View file @
a2edabc8
...
@@ -9,7 +9,7 @@ import {
...
@@ -9,7 +9,7 @@ import {
GlSprintf
,
GlSprintf
,
GlTooltipDirective
,
GlTooltipDirective
,
}
from
'
@gitlab/ui
'
;
}
from
'
@gitlab/ui
'
;
import
{
n__
,
s__
}
from
'
~/locale
'
;
import
{
n__
,
s__
,
__
}
from
'
~/locale
'
;
import
AccessorUtilities
from
'
../../lib/utils/accessor
'
;
import
AccessorUtilities
from
'
../../lib/utils/accessor
'
;
import
IssueCount
from
'
./issue_count.vue
'
;
import
IssueCount
from
'
./issue_count.vue
'
;
import
eventHub
from
'
../eventhub
'
;
import
eventHub
from
'
../eventhub
'
;
...
@@ -19,6 +19,12 @@ import { isScopedLabel } from '~/lib/utils/common_utils';
...
@@ -19,6 +19,12 @@ import { isScopedLabel } from '~/lib/utils/common_utils';
import
{
isListDraggable
}
from
'
~/boards/boards_util
'
;
import
{
isListDraggable
}
from
'
~/boards/boards_util
'
;
export
default
{
export
default
{
i18n
:
{
newIssue
:
__
(
'
New issue
'
),
listSettings
:
__
(
'
List settings
'
),
expand
:
s__
(
'
Boards|Expand
'
),
collapse
:
s__
(
'
Boards|Collapse
'
),
},
components
:
{
components
:
{
GlButtonGroup
,
GlButtonGroup
,
GlButton
,
GlButton
,
...
@@ -97,7 +103,7 @@ export default {
...
@@ -97,7 +103,7 @@ export default {
return
n__
(
`%d issue`
,
`%d issues`
,
this
.
issuesCount
);
return
n__
(
`%d issue`
,
`%d issues`
,
this
.
issuesCount
);
},
},
chevronTooltip
()
{
chevronTooltip
()
{
return
this
.
list
.
collapsed
?
s__
(
'
Boards|Expand
'
)
:
s__
(
'
Boards|Collapse
'
)
;
return
this
.
list
.
collapsed
?
this
.
$options
.
i18n
.
expand
:
this
.
$options
.
i18n
.
collapse
;
},
},
chevronIcon
()
{
chevronIcon
()
{
return
this
.
list
.
collapsed
?
'
chevron-down
'
:
'
chevron-right
'
;
return
this
.
list
.
collapsed
?
'
chevron-down
'
:
'
chevron-right
'
;
...
@@ -329,8 +335,8 @@ export default {
...
@@ -329,8 +335,8 @@ export default {
v-show=
"!list.collapsed"
v-show=
"!list.collapsed"
ref=
"newIssueBtn"
ref=
"newIssueBtn"
v-gl-tooltip
.
hover
v-gl-tooltip
.
hover
:aria-label=
"
__('New issue')
"
:aria-label=
"
$options.i18n.newIssue
"
:title=
"
__('New issue')
"
:title=
"
$options.i18n.newIssue
"
class=
"issue-count-badge-add-button no-drag"
class=
"issue-count-badge-add-button no-drag"
icon=
"plus"
icon=
"plus"
@
click=
"showNewIssueForm"
@
click=
"showNewIssueForm"
...
@@ -340,13 +346,13 @@ export default {
...
@@ -340,13 +346,13 @@ export default {
v-if=
"isSettingsShown"
v-if=
"isSettingsShown"
ref=
"settingsBtn"
ref=
"settingsBtn"
v-gl-tooltip
.
hover
v-gl-tooltip
.
hover
:aria-label=
"
__('List settings')
"
:aria-label=
"
$options.i18n.listSettings
"
class=
"no-drag js-board-settings-button"
class=
"no-drag js-board-settings-button"
:title=
"
__('List settings')
"
:title=
"
$options.i18n.listSettings
"
icon=
"settings"
icon=
"settings"
@
click=
"openSidebarSettings"
@
click=
"openSidebarSettings"
/>
/>
<gl-tooltip
:target=
"() => $refs.settingsBtn"
>
{{
__('List settings')
}}
</gl-tooltip>
<gl-tooltip
:target=
"() => $refs.settingsBtn"
>
{{
$options.i18n.listSettings
}}
</gl-tooltip>
</gl-button-group>
</gl-button-group>
</h3>
</h3>
</header>
</header>
...
...
app/assets/javascripts/boards/components/board_list_new.vue
View file @
a2edabc8
...
@@ -12,6 +12,11 @@ import { sprintf, __ } from '~/locale';
...
@@ -12,6 +12,11 @@ import { sprintf, __ } from '~/locale';
export
default
{
export
default
{
name
:
'
BoardList
'
,
name
:
'
BoardList
'
,
i18n
:
{
loadingIssues
:
__
(
'
Loading issues
'
),
loadingMoreissues
:
__
(
'
Loading more issues
'
),
showingAllIssues
:
__
(
'
Showing all issues
'
),
},
components
:
{
components
:
{
BoardCard
,
BoardCard
,
BoardNewIssue
,
BoardNewIssue
,
...
@@ -68,6 +73,9 @@ export default {
...
@@ -68,6 +73,9 @@ export default {
// When list is draggable, the reference to the list needs to be accessed differently
// When list is draggable, the reference to the list needs to be accessed differently
return
this
.
canAdminList
?
this
.
$refs
.
list
.
$el
:
this
.
$refs
.
list
;
return
this
.
canAdminList
?
this
.
$refs
.
list
.
$el
:
this
.
$refs
.
list
;
},
},
showingAllIssues
()
{
return
this
.
issues
.
length
===
this
.
list
.
issuesCount
;
},
treeRootWrapper
()
{
treeRootWrapper
()
{
return
this
.
canAdminList
?
Draggable
:
'
ul
'
;
return
this
.
canAdminList
?
Draggable
:
'
ul
'
;
},
},
...
@@ -201,7 +209,7 @@ export default {
...
@@ -201,7 +209,7 @@ export default {
<div
<div
v-if=
"loading"
v-if=
"loading"
class=
"gl-mt-4 gl-text-center"
class=
"gl-mt-4 gl-text-center"
:aria-label=
"
__('Loading issues')
"
:aria-label=
"
$options.i18n.loadingIssues
"
data-testid=
"board_list_loading"
data-testid=
"board_list_loading"
>
>
<gl-loading-icon
/>
<gl-loading-icon
/>
...
@@ -230,8 +238,8 @@ export default {
...
@@ -230,8 +238,8 @@ export default {
:disabled=
"disabled"
:disabled=
"disabled"
/>
/>
<li
v-if=
"showCount"
class=
"board-list-count gl-text-center"
data-issue-id=
"-1"
>
<li
v-if=
"showCount"
class=
"board-list-count gl-text-center"
data-issue-id=
"-1"
>
<gl-loading-icon
v-if=
"loadingMore"
label=
"Loading more
issues"
/>
<gl-loading-icon
v-if=
"loadingMore"
:label=
"$options.i18n.loadingMore
issues"
/>
<span
v-if=
"
issues.length === list.issuesCount"
>
{{
__
(
'
Showing all issues
'
)
}}
</span>
<span
v-if=
"
showingAllIssues"
>
{{
$options
.
i18n
.
showingAllIssues
}}
</span>
<span
v-else
>
{{
paginatedIssueText
}}
</span>
<span
v-else
>
{{
paginatedIssueText
}}
</span>
</li>
</li>
</component>
</component>
...
...
ee/spec/frontend/boards/components/board_list_header_new_spec.js
View file @
a2edabc8
...
@@ -3,7 +3,7 @@ import Vuex from 'vuex';
...
@@ -3,7 +3,7 @@ import Vuex from 'vuex';
import
BoardListHeader
from
'
ee/boards/components/board_list_header_new.vue
'
;
import
BoardListHeader
from
'
ee/boards/components/board_list_header_new.vue
'
;
import
getters
from
'
ee/boards/stores/getters
'
;
import
getters
from
'
ee/boards/stores/getters
'
;
import
{
mockL
ist2
}
from
'
jest/boards/mock_data
'
;
import
{
mockL
abelList
}
from
'
jest/boards/mock_data
'
;
import
{
ListType
,
inactiveId
}
from
'
~/boards/constants
'
;
import
{
ListType
,
inactiveId
}
from
'
~/boards/constants
'
;
import
sidebarEventHub
from
'
~/sidebar/event_hub
'
;
import
sidebarEventHub
from
'
~/sidebar/event_hub
'
;
...
@@ -37,7 +37,7 @@ describe('Board List Header Component', () => {
...
@@ -37,7 +37,7 @@ describe('Board List Header Component', () => {
const
boardId
=
'
1
'
;
const
boardId
=
'
1
'
;
const
listMock
=
{
const
listMock
=
{
...
mockL
ist2
,
...
mockL
abelList
,
listType
,
listType
,
collapsed
,
collapsed
,
};
};
...
@@ -109,7 +109,7 @@ describe('Board List Header Component', () => {
...
@@ -109,7 +109,7 @@ describe('Board List Header Component', () => {
});
});
it
(
'
does not emit event when there is an active List
'
,
()
=>
{
it
(
'
does not emit event when there is an active List
'
,
()
=>
{
store
.
state
.
activeId
=
mockL
ist2
.
id
;
store
.
state
.
activeId
=
mockL
abelList
.
id
;
createComponent
({
listType
:
hasSettings
[
0
]
});
createComponent
({
listType
:
hasSettings
[
0
]
});
wrapper
.
vm
.
openSidebarSettings
();
wrapper
.
vm
.
openSidebarSettings
();
...
...
locale/gitlab.pot
View file @
a2edabc8
...
@@ -16507,6 +16507,9 @@ msgstr ""
...
@@ -16507,6 +16507,9 @@ msgstr ""
msgid "Loading issues"
msgid "Loading issues"
msgstr ""
msgstr ""
msgid "Loading more issues"
msgstr ""
msgid "Loading snippet"
msgid "Loading snippet"
msgstr ""
msgstr ""
...
...
spec/frontend/boards/components/board_list_header_new_spec.js
View file @
a2edabc8
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
{
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
mockL
ist2
}
from
'
jest/boards/mock_data
'
;
import
{
mockL
abelList
}
from
'
jest/boards/mock_data
'
;
import
BoardListHeader
from
'
~/boards/components/board_list_header_new.vue
'
;
import
BoardListHeader
from
'
~/boards/components/board_list_header_new.vue
'
;
import
{
ListType
}
from
'
~/boards/constants
'
;
import
{
ListType
}
from
'
~/boards/constants
'
;
...
@@ -31,7 +31,7 @@ describe('Board List Header Component', () => {
...
@@ -31,7 +31,7 @@ describe('Board List Header Component', () => {
const
boardId
=
'
1
'
;
const
boardId
=
'
1
'
;
const
listMock
=
{
const
listMock
=
{
...
mockL
ist2
,
...
mockL
abelList
,
listType
,
listType
,
collapsed
,
collapsed
,
};
};
...
...
spec/frontend/boards/mock_data.js
View file @
a2edabc8
...
@@ -295,7 +295,7 @@ export const mockList = {
...
@@ -295,7 +295,7 @@ export const mockList = {
issuesCount
:
1
,
issuesCount
:
1
,
};
};
export
const
mockL
ist2
=
{
export
const
mockL
abelList
=
{
id
:
'
gid://gitlab/List/2
'
,
id
:
'
gid://gitlab/List/2
'
,
title
:
'
To Do
'
,
title
:
'
To Do
'
,
position
:
0
,
position
:
0
,
...
@@ -314,7 +314,7 @@ export const mockList2 = {
...
@@ -314,7 +314,7 @@ export const mockList2 = {
issuesCount
:
0
,
issuesCount
:
0
,
};
};
export
const
mockLists
=
[
mockList
,
mockL
ist2
];
export
const
mockLists
=
[
mockList
,
mockL
abelList
];
export
const
mockListsById
=
keyBy
(
mockLists
,
'
id
'
);
export
const
mockListsById
=
keyBy
(
mockLists
,
'
id
'
);
...
...
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