Skip to content

Commit ab2cf6a

Browse files
authored
fix: Change "Preferences" to "Settings" (kyma-project#4485)
* fix: Change "Preferences" to "Settings" * test: Adjust command palette test * fix: being back ThemePreviewImage * adjust test
1 parent 4ab499a commit ab2cf6a

File tree

73 files changed

+172
-148
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+172
-148
lines changed

docs/features.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ KYMA_COMPANION:
184184

185185
The **match** keys and **messageSrc** must use the format described in the [`jsonpath` repository](https://github.com/dchester/jsonpath).
186186

187-
- **RESOURCE_VALIDATION** - determines the selected policies for [resource validation](resource-validation/README.md). They can be overwritten in the user preferences.
187+
- **RESOURCE_VALIDATION** - determines the selected policies for [resource validation](resource-validation/README.md). They can be overwritten in the user settings.
188188

189189
Default settings:
190190

docs/operator/feature-flags.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ This table lists the frontend configurable feature flags, their descriptions, an
3535
| **KUBECONFIG_ID** | Configures the URL to which Busola sends a request to download a kubeconfig file. If you add `?kubeconfigID={your ID}` to the Busola URL, Busola tries to download the kubeconfig from `{kubeconfigUrl}/{yourID}`. If the operation succeeds, Busola adds the kubeconfing file to the cluster. If you use a full address in the **kubeconfigUrl** field, Busola also reads it. With optional **showClustersOverview** you can instruct Busola to show **Clusters Overview** rather than the current context cluster, after the clusters are loaded. **defaultKubeconfig** defined the optional default **KUBECONFIG_ID** to load this kubeconfig when you visit Busola homepage `/` and there are no memorized clusters in the application. | <ul><li>`isEnabled: true`</li><li>`config.kubeconfigUrl: https://kyma-env-broker.cp.dev.kyma.cloud.sap/kubeconfig`</li><li>`config.showClustersOverview: false`</li><li>`config.defaultKubeconfig: AAAAA-BBBBB`</li></ul> |
3636
| **LEGAL_LINKS** | Shows or hides legal links. In **config**, you can find the unchangeable keys (you cannot use **legalDisclosure** instead of **legal-disclosure**). The keys include both the default link, which takes you to the default address, and a link that depends on your chosen language. The link under the given key is selected based on your language code (`de`, `en`, `pl`, and more). If the code is not available, the default link is used. | <ul><li>`config.legal-disclosure.default: https://www.sap.com/corporate/en/legal/impressum.html`</li><li>`config.legal-disclosure.de: https://www.sap.com/corporate/de/legal/impressum.html`</li><li>`config.privacy.default: https://help.sap.com/viewer/82bdf2271c6041f79387c122147cf774/Cloud/en-US`</li><li>`config.copyright.default: https://www.sap.com/corporate/en/legal/copyright.html`</li><li>`config.copyright.de: https://www.sap.com/corporate/de/legal/copyright.html`</li><li>`config.trademark.default: https://www.sap.com/corporate/en/legal/trademark.html`</li><li>`config.trademark.de: https://www.sap.com/corporate/de/legal/trademark.html`</li></ul> |
3737
| **PROTECTED_RESOURCES** | Blocks the edit and delete functions based on the determined rules. If the resource meets the rule requirements, the resource becomes protected and cannot be edited/deleted. Each resource requires the **match** field, which includes a list of key-value pairs. The proper rule description is when the definition given in the key matches the value. To switch comparison mode from **standard** to **regex**, set the **regex** parameter to `true`. Optionally, you can provide the **message** parameter, which displays a simple message, or **messageSrc**, which is a YAML path where the message to be displayed is included. If neither **message** nor **messageSrc** is provided, a generic message is used. | <ul><li>`isEnabled: true`</li><li>`config.resources.match: { $.metadata.labels.foo: bar}` </li><li>`config.resources.message: This resource is protected`</li><li>`config.resources.match: { $.metadata.labels.foo: bar, $.metadata.labels.baz: qux }`</li><li>`config.resources.messageSrc: $.metadata.annotations.protected-message`</li><li>`config.resources.match: { $.metadata.labels.foo: ^[a-zA-Z0-9]$ }`</li><li>`config.resources.regex: true`</li></ul> |
38-
| **RESOURCE_VALIDATION** | Determines the selected policies for [resource validation](https://github.com/kyma-project/busola/blob/main/docs/resource-validation/README.md). They can be overwritten in the user preferences. | <ul><li>`isEnabled: true`</li><li>`config.policies: Default`</li></ul> |
38+
| **RESOURCE_VALIDATION** | Determines the selected policies for [resource validation](https://github.com/kyma-project/busola/blob/main/docs/resource-validation/README.md). They can be overwritten in the user settings. | <ul><li>`isEnabled: true`</li><li>`config.policies: Default`</li></ul> |
3939
| **SENTRY** | Enables monitoring of uncaught exceptions, which are then analyzed and repaired. The address to which you send the information is located under the **dsn** key. | <ul><li>`isEnabled: false`</li><li>`config.dsn: ''`</li></ul> |
4040
| **SNOW** | Determines if the snow animation is enabled in Busola. | `isEnabled: false` |
4141

docs/resource-validation/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ With Busola's resource validation feature, you can validate resources, for examp
66

77
## Select policies
88

9-
You can choose which policies should be validated in the user preferences or set a [feature flag](../features.md).
9+
You can choose which policies should be validated in the user settings or set a [feature flag](../features.md).
1010

11-
In the user preferences, go to **Clusters > Resource Validation**. Click on **Customize** in the **Enabled Policies** section.
11+
In the user settings, go to **Clusters > Resource Validation**. Click on **Customize** in the **Enabled Policies** section.
1212

13-
<img src="./assets/customize-policy-preferences.png" alt="Preferences menu when choosing which policies to enable" width="40%" style="border: 1px solid #D2D5D9">
13+
<img src="./assets/customize-policy-preferences.png" alt="Settings menu when choosing which policies to enable" width="40%" style="border: 1px solid #D2D5D9">
1414

1515
In the [feature flag](../features.md) config, set the following specifications:
1616

docs/user/01-20-command-palette.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Kyma Dashboard Command Palette
22

33
With the Kyma dashboard command palette feature, you can easily navigate through all your dashboard resources, such as workloads, deployments, and more.
4-
You can perform actions such as listing or accessing your namespaces, or preferences, or uploading YAML files.
4+
You can perform actions such as listing or accessing your namespaces, or settings, or uploading YAML files.
55

66
## Features
77

public/i18n/en.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ command-palette:
179179
crd-aliases: CRD Aliases
180180
full: Use <0>↑</0> and <0>↓</0> to navigate between results, <0>⏎</0> to choose, <0>Tab</0> to autocomplete.
181181
navigation: Navigation
182-
open-preferences: Open preferences
182+
open-settings: Open settings
183183
open-upload-yaml: Open upload YAML
184184
resource-aliases: Built-in resource aliases
185185
short-help: Type <0>?</0> for help
@@ -286,7 +286,7 @@ common:
286286
delete-title: Delete {{type}}
287287
disconnect-message: Are you sure you want to disconnect {{type}} {{name}}?
288288
disconnect-title: Disconnect {{type}}
289-
information: You've switched off removal confirmations for all resources. You can switch them back on in Preferences.
289+
information: You've switched off removal confirmations for all resources. You can switch them back on in Settings.
290290
errors:
291291
couldnt-fetch-resources: Couldn't fetch resources.
292292
delete: Deletion of resource failed
@@ -373,7 +373,7 @@ common:
373373
secret-ref-namespace: Select namespace
374374
product-title: Kyma
375375
protected-resource: Protected resource
376-
protected-resource-description: Resource protected. Go to Preferences to turn on the modification of protected resources.
376+
protected-resource-description: Resource protected. Go to Settings to turn on the modification of protected resources.
377377
sorting:
378378
asc: Ascending
379379
count: Count
@@ -411,7 +411,7 @@ common:
411411
k8s-name-input: Name must consist of lowercase alphanumeric characters or '-', and must start and end with an alphanumeric character (e.g. 'my-name', or '123-abc').
412412
key-value: Key and value must start and end with an alphanumeric character, can contain '-', '_' or '.'.
413413
line: Ln
414-
protected-resources-info: To allow for modifying protected resources go to Preferences > Clusters.
414+
protected-resources-info: To allow for modifying protected resources go to Settings > Clusters.
415415
read-file: Read file content as a single value, with file name as a key.
416416
resource-ref-name: Unique name within a Namespace to refer to a {{resource}} resource.
417417
resource-ref-namespace: Namespace defines the space within which the {{resource}} name must be unique.
@@ -1028,9 +1028,9 @@ navigation:
10281028
menu:
10291029
get-help: Get Help
10301030
legal-information: Legal Information
1031-
preferences:
1032-
title: Preferences
10331031
select-namespace: Select Namespace...
1032+
settings:
1033+
title: Settings
10341034
snow: Let it snow
10351035
snow-stop: Stop the snow
10361036
upload-yaml:
@@ -1462,7 +1462,7 @@ settings:
14621462
all: All
14631463
default-last-used: Default (last one used)
14641464
default-page-size: Default Page Size
1465-
info: Changes to the page size only take effect locally. To set the global default page size, go to Preferences.
1465+
info: Changes to the page size only take effect locally. To set the global default page size, go to Settings.
14661466
of: of {{pagesCount}}
14671467
page: Page
14681468
pagination: Pagination

src/command-pallette/CommandPalletteUI/handlers/nonResourceHandler.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ export function createNonResourceOptions({
1717
type: 'upload',
1818
},
1919
{
20-
names: ['preferences', 'prefs'],
21-
type: 'preferences',
20+
names: ['settings', 'set'],
21+
type: 'settings',
2222
},
2323
{
2424
names: ['help', '?'],
@@ -90,16 +90,16 @@ function createResults(context: CommandPaletteContext): Result[] | null {
9090
aliases: ['up'],
9191
},
9292
];
93-
case 'preferences':
93+
case 'settings':
9494
return [
9595
{
96-
label: t('navigation.preferences.title'),
97-
query: 'preferences',
96+
label: t('navigation.settings.title'),
97+
query: 'settings',
9898
onActivate: () => {
99-
context.setOpenPreferencesModal(true);
99+
context.setOpenSettingsModal(true);
100100
},
101-
customActionText: t('command-palette.help.open-preferences'),
102-
aliases: ['prefs'],
101+
customActionText: t('command-palette.help.open-settings'),
102+
aliases: ['set'],
103103
},
104104
];
105105
case 'overview':
@@ -149,9 +149,9 @@ export const nonResourceHandler: Handler = {
149149
description: t('command-palette.help.cluster-overview'),
150150
},
151151
{
152-
name: 'preferences',
153-
alias: 'prefs',
154-
description: t('command-palette.help.open-preferences'),
152+
name: 'settings',
153+
alias: 'set',
154+
description: t('command-palette.help.open-settings'),
155155
},
156156
{
157157
name: 'ns -a',

src/command-pallette/CommandPalletteUI/helpers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ export const activateResult = (query: string, activateCallback: () => void) => {
77

88
export const isResultGoingToRedirect = (resultQuery: string) => {
99
switch (resultQuery) {
10-
case 'preferences':
11-
case 'prefs':
10+
case 'settings':
11+
case 'set':
1212
case 'upload':
1313
case 'up':
1414
return false;

src/command-pallette/CommandPalletteUI/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export type CommandPaletteContext = {
2020
resourceCache: Record<string, K8sResource[]>;
2121
updateResourceCache: (key: string, resources: K8sResource[]) => void;
2222
t: TFunction<'translation', undefined>;
23-
setOpenPreferencesModal: (open: boolean) => void;
23+
setOpenSettingsModal: (open: boolean) => void;
2424
setShowYamlUpload: (show: boolean) => void;
2525
clustersInfo: useClustersInfoType;
2626
navigate: (_: string) => void;

src/command-pallette/CommandPalletteUI/useSearchResults.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { useEffect } from 'react';
22
import { useTranslation } from 'react-i18next';
33
import { useAtomValue, useSetAtom } from 'jotai';
4-
import { isPreferencesOpenAtom } from 'state/preferences/isPreferencesModalOpenAtom';
4+
import { isSettingsOpenAtom } from 'state/settings/isSettingsModalOpenAtom';
55
import { useFetch } from 'shared/hooks/BackendAPI/useFetch';
6-
import { showHiddenNamespacesAtom } from 'state/preferences/showHiddenNamespacesAtom';
6+
import { showHiddenNamespacesAtom } from 'state/settings/showHiddenNamespacesAtom';
77
import { columnLayoutAtom } from 'state/columnLayoutAtom';
88

99
import * as handlers from './handlers';
@@ -48,7 +48,7 @@ export function useSearchResults({
4848
const showHiddenNamespaces = useAtomValue(showHiddenNamespacesAtom);
4949
const fetch = useFetch();
5050
const { t } = useTranslation();
51-
const setOpenPreferencesModal = useSetAtom(isPreferencesOpenAtom);
51+
const setOpenSettingsModal = useSetAtom(isSettingsOpenAtom);
5252
const setShowYamlUpload = useSetAtom(showYamlUploadDialogAtom);
5353
const clustersInfo = useClustersInfo();
5454
const navigate = useNavigate();
@@ -78,7 +78,7 @@ export function useSearchResults({
7878
resourceCache,
7979
updateResourceCache,
8080
t,
81-
setOpenPreferencesModal,
81+
setOpenSettingsModal: setOpenSettingsModal,
8282
setShowYamlUpload,
8383
clustersInfo,
8484
navigate: navigateAndCloseColumns,

src/components/App/App.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { useUrl } from 'hooks/useUrl';
1414
import { useSentry } from 'hooks/useSentry';
1515

1616
import { clusterAtom } from 'state/clusterAtom';
17-
import { languageAtom } from 'state/preferences/languageAtom';
17+
import { languageAtom } from 'state/settings/languageAtom';
1818
import { activeNamespaceIdAtom } from 'state/activeNamespaceIdAtom';
1919
import { useAuthHandler } from 'state/authDataAtom';
2020
import { useGetConfiguration } from 'state/configuration/configurationAtom';
@@ -38,7 +38,7 @@ import {
3838
} from '@ui5/webcomponents-react';
3939
import { showKymaCompanionAtom } from 'state/companion/showKymaCompanionAtom';
4040
import KymaCompanion from 'components/KymaCompanion/components/KymaCompanion';
41-
import { Preferences } from 'components/Preferences/Preferences';
41+
import { Settings } from 'components/Settings/Settings';
4242
import { Header } from 'header/Header';
4343
import { ContentWrapper } from './ContentWrapper/ContentWrapper';
4444
import { Sidebar } from 'sidebar/Sidebar';
@@ -48,7 +48,7 @@ import { IncorrectPath } from './IncorrectPath';
4848
import { Spinner } from 'shared/components/Spinner/Spinner';
4949
import { ContextChooserMessage } from 'components/Clusters/components/ContextChooser/ContextChooser';
5050

51-
import { themeAtom } from 'state/preferences/themeAtom';
51+
import { themeAtom } from 'state/settings/themeAtom';
5252
import { initTheme } from './initTheme';
5353

5454
import './App.scss';
@@ -215,7 +215,7 @@ export default function App() {
215215
</Route>
216216
{makeGardenerLoginRoute}
217217
</Routes>
218-
<Preferences />
218+
<Settings />
219219
</ContentWrapper>
220220
</div>
221221
</div>

0 commit comments

Comments
 (0)