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
DS: I18N settings, create modal #10749
Conversation
4186c79
to
6b6437d
Compare
e3fd56a
to
c03631a
Compare
Codecov Report
@@ Coverage Diff @@
## v4/ds-migration #10749 +/- ##
================================================
Coverage 58.84% 58.84%
================================================
Files 174 174
Lines 6007 6007
Branches 1251 1251
================================================
Hits 3535 3535
Misses 2054 2054
Partials 418 418
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
} | ||
/> | ||
</ContentLayout> | ||
<EmptyStateLayout |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here you can use the CustomContentLayout
component instead:
import { CustomContentLayout } from '@strapi/helper-plugin';
<CustomContentLayout
shouldShowEmptyState={locales === undefined || locales?.length === 0}
action={
onToggleCreateModal ? (
<Button variant="secondary" startIcon={<AddIcon />} onClick={onToggleCreateModal}>
{formatMessage({ id: getTrad('Settings.list.actions.add') })}
</Button>
) : null
}
>
<LocaleTable
locales={locales}
onDeleteLocale={handleDeleteLocale}
onEditLocale={handleEditLocale}
/>
</CustomContentLayout>
packages/plugins/i18n/admin/src/components/LocaleSelect/index.js
Outdated
Show resolved
Hide resolved
f98a1a4
to
dc0ce92
Compare
dc0ce92
to
2d75759
Compare
@@ -0,0 +1,75 @@ | |||
<!--- EmptyStateLayout.stories.mdx ---> | |||
|
|||
import { Meta, ArgsTable, Canvas, Story } from '@storybook/addon-docs'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
return !foundLocale; | ||
}); | ||
|
||
const computedValue = value || ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const computedValue = value || options[0]?.value || '';
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it won't match the default display name if we do that
What does it do?
Moves the I18N settings modal for creating a new locale to the new DS
How to test it?
Screenshot