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

[Backport 2.x] Feat (Advanced Settings): Make new "Appearance" category #4902

Merged
merged 1 commit into from
Sep 1, 2023
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
2 changes: 1 addition & 1 deletion src/core/server/ui_settings/settings/accessibility.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const getAccessibilitySettings = (): Record<string, UiSettingsParams> =>
defaultMessage:
'Turn off all unnecessary animations in the OpenSearch Dashboards UI. Refresh the page to apply the changes.',
}),
category: ['accessibility'],
category: ['appearance'],
requiresPageReload: true,
schema: schema.boolean(),
},
Expand Down
1 change: 1 addition & 0 deletions src/core/server/ui_settings/settings/navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export const getNavigationSettings = (): Record<string, UiSettingsParams> => {
defaultMessage: 'Legacy',
}),
},
category: ['appearance'],
schema: schema.oneOf([schema.literal('modern'), schema.literal('legacy')]),
},
};
Expand Down
8 changes: 7 additions & 1 deletion src/core/server/ui_settings/settings/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export const getThemeSettings = (): Record<string, UiSettingsParams> => {
defaultMessage: `Enable a dark mode for the OpenSearch Dashboards UI. A page refresh is required for the setting to be applied.`,
}),
requiresPageReload: true,
category: ['appearance'],
schema: schema.boolean(),
},
'theme:version': {
Expand All @@ -53,9 +54,14 @@ export const getThemeSettings = (): Record<string, UiSettingsParams> => {
type: 'select',
options: ['v7', 'Next (preview)'],
description: i18n.translate('core.ui_settings.params.themeVersionText', {
defaultMessage: `Switch between the theme used for the current and next version of OpenSearch Dashboards, A page refresh is required for the setting to be applied.`,
defaultMessage: `<p>Switch between the themes used for the current and next versions of OpenSearch Dashboards. A page refresh is required for the setting to be applied.</p><p><a href="{href}">{linkText}</a></p>`,
values: {
href: 'https://forum.opensearch.org/t/feedback-on-dark-mode-experience/15725',
linkText: 'Theme feedback',
},
}),
requiresPageReload: true,
category: ['appearance'],
schema: schema.oneOf([schema.literal('v7'), schema.literal('Next (preview)')]),
},
};
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ export class Form extends PureComponent<FormProps> {
renderCategory(category: Category, settings: FieldSetting[], totalSettings: number) {
return (
<Fragment key={category}>
<EuiPanel paddingSize="l">
<EuiPanel paddingSize="l" id={category}>
<EuiForm>
<EuiText>
<EuiFlexGroup alignItems="baseline">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ const names: Record<string, string> = {
general: i18n.translate('advancedSettings.categoryNames.generalLabel', {
defaultMessage: 'General',
}),
appearance: i18n.translate('advancedSettings.categoryNames.appearanceLabel', {
defaultMessage: 'Appearance',
}),
timeline: i18n.translate('advancedSettings.categoryNames.timelineLabel', {
defaultMessage: 'Timeline',
}),
Expand Down