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
50c52424
Commit
50c52424
authored
Dec 14, 2021
by
Illya Klymov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Address reviewer comments
* remove incorrect aria-role * improve storybook
parent
0385b81e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
14 deletions
+21
-14
app/assets/javascripts/vue_shared/components/pagination_bar/pagination_bar.stories.js
...hared/components/pagination_bar/pagination_bar.stories.js
+2
-8
app/assets/javascripts/vue_shared/components/pagination_bar/pagination_bar.vue
...s/vue_shared/components/pagination_bar/pagination_bar.vue
+18
-2
locale/gitlab.pot
locale/gitlab.pot
+0
-3
spec/frontend/import_entities/import_groups/components/import_table_spec.js
...rt_entities/import_groups/components/import_table_spec.js
+1
-1
No files found.
app/assets/javascripts/vue_shared/components/pagination_bar/pagination_bar.stories.js
View file @
50c52424
...
...
@@ -27,17 +27,11 @@ Default.args = {
Default
.
argTypes
=
{
pageInfo
:
{
description
:
'
Page info object
'
,
control
:
false
,
control
:
{
type
:
'
object
'
}
,
},
pageSizes
:
{
description
:
'
Array of possible page sizes
'
,
control
:
false
,
},
itemsCount
:
{
description
:
'
Total number of items
'
,
control
:
{
type
:
'
number
'
,
},
control
:
{
type
:
'
array
'
},
},
// events
...
...
app/assets/javascripts/vue_shared/components/pagination_bar/pagination_bar.vue
View file @
50c52424
...
...
@@ -42,8 +42,24 @@ export default {
methods
:
{
setPage
(
page
)
{
// eslint-disable-next-line spaced-comment
/**
* Emitted when selected page is updated
*
* @event set-page
**/
this
.
$emit
(
'
set-page
'
,
page
);
},
setPageSize
(
pageSize
)
{
// eslint-disable-next-line spaced-comment
/**
* Emitted when page size is updated
*
* @event set-page-size
**/
this
.
$emit
(
'
set-page-size
'
,
pageSize
);
},
},
};
</
script
>
...
...
@@ -51,7 +67,7 @@ export default {
<
template
>
<div
class=
"gl-display-flex gl-align-items-center"
>
<pagination-links
:change=
"setPage"
:page-info=
"pageInfo"
class=
"gl-m-0"
/>
<gl-dropdown
category=
"tertiary"
class=
"gl-ml-auto"
:aria-label=
"__('Page size')
"
>
<gl-dropdown
category=
"tertiary"
class=
"gl-ml-auto"
data-testid=
"page-size
"
>
<template
#button-content
>
<span
class=
"gl-font-weight-bold"
>
<gl-sprintf
:message=
"__('%
{count} items per page')">
...
...
@@ -62,7 +78,7 @@ export default {
</span>
<gl-icon
class=
"gl-button-icon dropdown-chevron"
name=
"chevron-down"
/>
</template>
<gl-dropdown-item
v-for=
"size in pageSizes"
:key=
"size"
@
click=
"
$emit('set-page-size',
size)"
>
<gl-dropdown-item
v-for=
"size in pageSizes"
:key=
"size"
@
click=
"
setPageSize(
size)"
>
<gl-sprintf
:message=
"__('%{count} items per page')"
>
<
template
#count
>
{{
size
}}
...
...
locale/gitlab.pot
View file @
50c52424
...
...
@@ -25258,9 +25258,6 @@ msgstr ""
msgid "Page settings"
msgstr ""
msgid "Page size"
msgstr ""
msgid "PagerDutySettings|Active"
msgstr ""
...
...
spec/frontend/import_entities/import_groups/components/import_table_spec.js
View file @
50c52424
...
...
@@ -38,7 +38,7 @@ describe('import table', () => {
wrapper
.
findAll
(
'
button
'
).
wrappers
.
find
((
w
)
=>
w
.
text
()
===
'
Import selected
'
);
const
findImportButtons
=
()
=>
wrapper
.
findAll
(
'
button
'
).
wrappers
.
filter
((
w
)
=>
w
.
text
()
===
'
Import
'
);
const
findPaginationDropdown
=
()
=>
wrapper
.
find
(
'
[
aria-label="Page
size"]
'
);
const
findPaginationDropdown
=
()
=>
wrapper
.
find
(
'
[
data-testid="page-
size"]
'
);
const
findPaginationDropdownText
=
()
=>
findPaginationDropdown
().
find
(
'
button
'
).
text
();
const
findSelectionCount
=
()
=>
wrapper
.
find
(
'
[data-test-id="selection-count"]
'
);
...
...
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