Skip to content

Commit 7fc09ed

Browse files
feat: UX changes to add source yaml (kyma-project#4571)
* feat: Rework add source yaml * Fixes * Fix width problem * Remove unnecessary stuff * Update src/components/Modules/community/components/AddSourceYamls.tsx Co-authored-by: Oliwia Gowor <72342415+OliwiaGowor@users.noreply.github.com> * Review changes * Fix typo * Fix translations --------- Co-authored-by: Oliwia Gowor <72342415+OliwiaGowor@users.noreply.github.com>
1 parent 0b468a7 commit 7fc09ed

File tree

5 files changed

+223
-166
lines changed

5 files changed

+223
-166
lines changed

public/i18n/en.yaml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -970,6 +970,7 @@ modules:
970970
messages:
971971
delete-failure: 'Failed to delete the {{module}}: {{error}}'
972972
delete-template-failure: 'Failed to delete templates: {{error}}'
973+
example-format: 'Example format: http://github.com/project/repo/file.yaml'
973974
install-failure: 'Failed to install the {{resourceType}}: {{error}}'
974975
module-added: Community Module added
975976
module-uninstall: Community Module deleted
@@ -978,8 +979,9 @@ modules:
978979
resources-delete-in-progress: Resources are still being deleted. Try again later.
979980
source-yaml-added: Source YAML added
980981
source-yaml-failed: Failed to add Source YAML
981-
source-yaml-fetch-failed: 'Failed to download source yaml: {{error}}'
982-
source-yaml-invalid-url: Ensure your URL ends with ".yaml".
982+
source-yaml-invalid-url: |-
983+
'We couldn’t reach that URL. Check the link and try again. {0}
984+
Example format: http://github.com/project/repo/file.yaml'
983985
success: '{{resourceType}} installed'
984986
upload: Start {{resourceType}} upload
985987
no-modules: No community modules available
@@ -991,12 +993,12 @@ modules:
991993
source-yaml:
992994
add-source-yaml: Add Source YAML
993995
add-source-yaml-info: Add your own custom modules to the Kyma cluster by adding their source files to this list. After that, your modules show up automatically in the list.
994-
example-format: 'Example format: http://github.com/project/repo/file.yaml'
995-
module-already-exists: <0> {{moduleTemplate}} </0> already exists in the <0> {{namespace}} </0> namespace.
996-
module-templates-to-add: ModuleTemplates to add
997-
modules-wont-be-added: Following ModuleTemplates already exist in the cluster and cannot be added.
996+
add-to-namespace: Add to Namespace
997+
all-modules-installed: All modules in this YAML are already installed.
998+
module-already-exists: <0> {{moduleTemplate}} </0> exists in <0> {{namespace}} </0>.
999+
module-templates-to-add: 'You can install the remaining modules:'
1000+
modules-wont-be-added: Some modules in this YAML already exist in the cluster.
9981001
namespace-description: Namespace where ModuleTemplates are applied. If left empty, the namespace defined in the ModuleTemplates is used. Resources cannot be created in the kyma-system namespace.
999-
no-module-templates: No ModuleTemplates to add.
10001002
no-source-yaml: No source YAML added.
10011003
remove-source-yaml: Remove Source YAML
10021004
remove-source-yaml-desc: Your previously installed modules will remain available, but you won't be able to add any of the following
Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,32 @@
11
.sourceurl-messagebox {
2-
width: 50%;
2+
width: 50vw;
3+
container-name: messagebox;
4+
container-type: inline-size;
5+
}
6+
7+
.sourceurl-content {
8+
--_ui5-v2-18-0_popup_content_padding_xl: 3rem;
9+
--_ui5-v2-18-0_popup_content_padding_m_l: 2rem;
10+
--_ui5-v2-18-0_popup_content_padding_s: 1rem;
11+
}
12+
13+
@container messagebox (min-width: 1439px) {
14+
.sourceurl-content {
15+
width: calc(50vw - (2 * var(--_ui5-v2-18-0_popup_content_padding_xl)));
16+
}
17+
}
18+
19+
@container messagebox (min-width: 599px) and (max-width: 1439px) {
20+
.sourceurl-content {
21+
width: calc(50vw - (2 * var(--_ui5-v2-18-0_popup_content_padding_m_l)));
22+
}
23+
}
24+
25+
@container messagebox (max-width: 599px) {
26+
.sourceurl-content {
27+
width: calc(50vw - (2 * var(--_ui5-v2-18-0_popup_content_padding_s)));
28+
min-width: calc(320px - (2 * var(--_ui5-v2-18-0_popup_content_padding_s)));
29+
}
330
}
431

532
.to-add-list-header {
@@ -10,13 +37,16 @@
1037
font-size: var(--sapFontHeader5Size);
1138
}
1239

13-
.namespace-select {
14-
width: 100%;
15-
}
16-
1740
.option-content {
1841
display: flex;
1942
align-items: center;
2043
justify-content: space-between;
2144
width: 100%;
2245
}
46+
47+
ul.unordered-list-disc {
48+
list-style-type: disc;
49+
margin-left: 1rem;
50+
overflow: visible;
51+
display: block;
52+
}

0 commit comments

Comments
 (0)