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

Feat (Advanced Settings): Make new "Appearance" category #4845

Merged
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Remove visualization editor sidebar background ([#4719](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4719))
- [Vis Colors] Remove customized colors from sample visualizations and dashboards ([#4741](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4741))
- [Decouple] Allow plugin manifest config to define semver compatible OpenSearch plugin and verify if it is installed on the cluster([#4612](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4612))
- [Advanced Settings] Consolidate settings into new "Appearance" category and add category IDs ([#4845](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4845))
- Adds Data explorer framework and implements Discover using it ([#4806](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4806))

### 🐛 Bug Fixes
Expand Down
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