Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Loc]Mwpw-163903: fixes for design feedback on loc create screen #3361

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion libs/blocks/locui-create/input-locale/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ export default function useInputLocale() {

const handleNext = async () => {
if (!errorPresent()) return;
const sortedLanguages = transformActiveLocales().sort((a, b) => a.language - b.language);
const sortedLanguages = transformActiveLocales()
.sort((a, b) => a.language.localeCompare(b.language));
setProject({ languages: prefillActionAndWorkflow(sortedLanguages) });
setLocale({ selectedRegion, selectedLocale, activeLocales });

Expand Down
4 changes: 2 additions & 2 deletions libs/blocks/locui-create/input-urls/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,14 +273,14 @@ export default function InputUrls() {
</div>
`}

<div class="form-field pb-4">
<div class="form-field pb-8">
<div class="form-field-label">* Enter the URLs</div>
<div class="form-field-desc">
(for multiple URLs, enter each on a new line.)
</div>
</div>
<textarea
class=${`form-field-textarea ${errors.urlsStr && 'error'}`}
class=${`form-field-textarea ${errors.urlsStr && 'error'} pl-14`}
rows="10"
value=${urlsStr}
onInput=${handleUrlsChange}
Expand Down
41 changes: 25 additions & 16 deletions libs/blocks/locui-create/locui-create.css
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,14 @@ body {
.locui-step-controls {
display: flex;
justify-content: space-between;
padding: 16px;
padding: 16px 28px;
}

.locui-title-bar {
font-size: 22px;
font-weight: 700;
padding: 16px 16px 16px 30px;
margin-bottom: 16px;
margin-bottom: 2.5rem;
background: #e5e5e5;
}

Expand Down Expand Up @@ -146,6 +146,7 @@ body {
.segment-ctrl {
display: flex;
font-size: 16px;
padding-bottom: 30px;
}

.segment-ctrl > div {
Expand Down Expand Up @@ -485,7 +486,7 @@ body {
border-width: 2px;
list-style: none;
padding-bottom: 1rem;
padding-inline-start: 0.5rem;
padding-inline-start: 0.875rem;
margin-bottom: 0;
}

Expand Down Expand Up @@ -544,6 +545,7 @@ body {
.locui-create-fragment-label {
font-size: 1.125rem;
font-weight: 700;
margin-left: 0.5rem;
}

.locui-create-fragment-parent {
Expand Down Expand Up @@ -643,7 +645,7 @@ body {

.locui-table p {
margin: 0;
padding-bottom: 10px;
padding-bottom: 1.875rem;
}

.locui-table td,
Expand Down Expand Up @@ -690,7 +692,6 @@ body {
text-decoration: none;
}


.locale-list-item {
border: 2px solid #8f8e8e;
border-radius: 20px;
Expand Down Expand Up @@ -757,33 +758,30 @@ body {
.region-buttons {
margin-bottom: 30px;
}

.language-grid,
.locale-grid {
flex: 1;
min-height: 200px;
}

.region-grid,
.language-grid,
.locale-grid {
margin-top: 10px;
margin-top: 24px;
}

.region-grid {
padding: 10px;
padding: 20px;
border: 1px solid #ccc;
border-radius: 8px;
margin-top: 10px;
}

.region-buttons,.additional-cta {
display: flex;
gap:10px
gap:20px
}

.section-header {
font-size: 16px;
font-weight: bold;
margin: 0 0 10px 0;
margin: 0 0 10px;
}


Expand All @@ -804,8 +802,8 @@ body {
.language-buttons {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
gap: 10px;
padding: 10px;
gap: 20px;
padding: 20px;
border: 1px solid #ccc;
border-radius: 8px;
max-height: 350px;
Expand Down Expand Up @@ -857,12 +855,23 @@ body {
.pl-8 {
padding-left: 8px;
}

.pb-4 {
padding-bottom: 4px;
}

.pb-12 {
padding-bottom: 12px;
}

.m-0 {
margin: 0;
}

.pb-8 {
padding-bottom: 8px;
}

.pl-14 {
padding-left: 14px;
}
4 changes: 0 additions & 4 deletions libs/blocks/locui-create/utils/constant.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
export const LOCALES = 'locales';
export const LOCALE_GROUPS = 'localegroups';
export const URL_SEPARATOR_PATTERN = /[,\r\n]/g;
export const LOCALIZATION_TYPES = {
rollout: 'rollout',
translation: 'translation',
};
export const PROJECT_TYPES = {
translation: 'localization',
rollout: 'rollout',
Expand Down
2 changes: 1 addition & 1 deletion libs/blocks/locui-create/utils/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export function processLocaleData(localeData) {
.split(',')
.map((loc) => loc.trim())
.join(','),
}));
})).sort((a, b) => a.language.localeCompare(b.language));

const processedLocaleRegion = localeData.localegroups.data.map((item) => ({
...item,
Expand Down
Loading