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
7f06b11a
Commit
7f06b11a
authored
Mar 10, 2020
by
Nick Kipling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added custom empty strings for each package type
Updated snapshot Updated tests Updated pot file
parent
34426a7f
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
41 additions
and
23 deletions
+41
-23
ee/app/assets/javascripts/packages/list/components/packages_list_app.vue
...avascripts/packages/list/components/packages_list_app.vue
+11
-5
ee/app/assets/javascripts/packages/list/constants.js
ee/app/assets/javascripts/packages/list/constants.js
+5
-4
ee/spec/frontend/packages/list/components/__snapshots__/packages_list_app_spec.js.snap
...t/components/__snapshots__/packages_list_app_spec.js.snap
+9
-8
ee/spec/frontend/packages/list/components/packages_list_app_spec.js
...ontend/packages/list/components/packages_list_app_spec.js
+13
-6
locale/gitlab.pot
locale/gitlab.pot
+3
-0
No files found.
ee/app/assets/javascripts/packages/list/components/packages_list_app.vue
View file @
7f06b11a
...
...
@@ -54,12 +54,21 @@ export default {
this
.
setSelectedType
(
selectedType
);
this
.
requestPackagesList
();
},
emptyStateTitle
({
title
,
type
})
{
if
(
type
)
{
return
sprintf
(
s__
(
'
PackageRegistry|There are no %{packageType} packages yet
'
),
{
packageType
:
title
,
});
}
return
s__
(
'
PackageRegistry|There are no packages yet
'
);
},
},
};
</
script
>
<
template
>
<gl-tabs
@
input=
"tabChanged"
>
<gl-tabs
active-tab-class=
"js-package-active-tab"
@
input=
"tabChanged"
>
<template
#tabs-end
>
<div
class=
"align-self-center ml-auto"
>
<package-sort
@
sort:changed=
"requestPackagesList"
/>
...
...
@@ -69,10 +78,7 @@ export default {
<gl-tab
v-for=
"(tab, index) in tabsToRender"
:key=
"index"
:title=
"tab.title"
>
<package-list
@
page:changed=
"onPageChanged"
@
package:delete=
"onPackageDeleteRequest"
>
<
template
#empty-state
>
<gl-empty-state
:title=
"s__('PackageRegistry|There are no packages yet')"
:svg-path=
"emptyListIllustration"
>
<gl-empty-state
:title=
"emptyStateTitle(tab)"
:svg-path=
"emptyListIllustration"
>
<template
#description
>
<p
v-html=
"emptyListText"
></p>
</
template
>
...
...
ee/app/assets/javascripts/packages/list/constants.js
View file @
7f06b11a
import
{
__
,
s__
}
from
'
~/locale
'
;
import
{
PackageType
}
from
'
../shared/constants
'
;
export
const
FETCH_PACKAGES_LIST_ERROR_MESSAGE
=
__
(
'
Something went wrong while fetching the packages list.
'
,
...
...
@@ -74,18 +75,18 @@ export const PACKAGE_REGISTRY_TABS = [
},
{
title
:
s__
(
'
PackageRegistry|Conan
'
),
type
:
'
conan
'
,
type
:
PackageType
.
CONAN
,
},
{
title
:
s__
(
'
PackageRegistry|Maven
'
),
type
:
'
maven
'
,
type
:
PackageType
.
MAVEN
,
},
{
title
:
s__
(
'
PackageRegistry|NPM
'
),
type
:
'
npm
'
,
type
:
PackageType
.
NPM
,
},
{
title
:
s__
(
'
PackageRegistry|NuGet
'
),
type
:
'
nuget
'
,
type
:
PackageType
.
NUGET
,
},
];
ee/spec/frontend/packages/list/components/__snapshots__/packages_list_app_spec.js.snap
View file @
7f06b11a
...
...
@@ -3,6 +3,7 @@
exports[`packages_list_app renders 1`] = `
<b-tabs-stub
activenavitemclass="gl-tab-nav-item-active gl-tab-nav-item-active-indigo"
activetabclass="js-package-active-tab"
class="gl-tabs"
contentclass=",gl-tab-content"
navclass="gl-tabs-nav"
...
...
@@ -97,7 +98,7 @@ exports[`packages_list_app renders 1`] = `
class="svg-250 svg-content"
>
<img
alt="There are no packages yet"
alt="There are no
Conan
packages yet"
class=""
src="helpSvg"
/>
...
...
@@ -114,7 +115,7 @@ exports[`packages_list_app renders 1`] = `
class="center"
style=""
>
There are no packages yet
There are no
Conan
packages yet
</h4>
<p
...
...
@@ -164,7 +165,7 @@ exports[`packages_list_app renders 1`] = `
class="svg-250 svg-content"
>
<img
alt="There are no packages yet"
alt="There are no
Maven
packages yet"
class=""
src="helpSvg"
/>
...
...
@@ -181,7 +182,7 @@ exports[`packages_list_app renders 1`] = `
class="center"
style=""
>
There are no packages yet
There are no
Maven
packages yet
</h4>
<p
...
...
@@ -231,7 +232,7 @@ exports[`packages_list_app renders 1`] = `
class="svg-250 svg-content"
>
<img
alt="There are no packages yet"
alt="There are no
NPM
packages yet"
class=""
src="helpSvg"
/>
...
...
@@ -248,7 +249,7 @@ exports[`packages_list_app renders 1`] = `
class="center"
style=""
>
There are no packages yet
There are no
NPM
packages yet
</h4>
<p
...
...
@@ -298,7 +299,7 @@ exports[`packages_list_app renders 1`] = `
class="svg-250 svg-content"
>
<img
alt="There are no packages yet"
alt="There are no
NuGet
packages yet"
class=""
src="helpSvg"
/>
...
...
@@ -315,7 +316,7 @@ exports[`packages_list_app renders 1`] = `
class="center"
style=""
>
There are no packages yet
There are no
NuGet
packages yet
</h4>
<p
...
...
ee/spec/frontend/packages/list/components/packages_list_app_spec.js
View file @
7f06b11a
...
...
@@ -58,15 +58,22 @@ describe('packages_list_app', () => {
expect
(
wrapper
.
element
).
toMatchSnapshot
();
});
describe
(
'
empty state
'
,
()
=>
{
it
(
'
generate the correct empty list link
'
,
()
=>
{
const
emptyState
=
findListComponent
();
const
link
=
emptyState
.
find
(
'
a
'
);
const
link
=
findListComponent
().
find
(
'
a
'
);
expect
(
link
.
html
()).
toMatchInlineSnapshot
(
`"<a href=\\"
${
emptyListHelpUrl
}
\\" target=\\"_blank\\">publish and share your packages</a>"`
,
);
});
it
(
'
includes the right content on the default tab
'
,
()
=>
{
const
heading
=
findListComponent
().
find
(
'
h4
'
);
expect
(
heading
.
text
()).
toBe
(
'
There are no packages yet
'
);
});
});
it
(
'
call requestPackagesList on page:changed
'
,
()
=>
{
const
list
=
findListComponent
();
list
.
vm
.
$emit
(
'
page:changed
'
,
1
);
...
...
locale/gitlab.pot
View file @
7f06b11a
...
...
@@ -13951,6 +13951,9 @@ msgstr ""
msgid "PackageRegistry|Remove package"
msgstr ""
msgid "PackageRegistry|There are no %{packageType} packages yet"
msgstr ""
msgid "PackageRegistry|There are no packages yet"
msgstr ""
...
...
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