Просмотр исходного кода

added Legacy keyword in front of theme names

GitOrigin-RevId: 67153578ba1cdfcc2df45caf4dee185644ec1021
Davinder Singh 3 лет назад
Родитель
Сommit
acad014cc9

+ 1 - 1
services/web/frontend/js/features/editor-left-menu/components/settings/settings-editor-theme.tsx

@@ -30,7 +30,7 @@ export default function SettingsEditorTheme() {
     const legacyEditorThemeOptions: Array<Option> =
       legacyEditorThemes?.map(theme => ({
         value: theme,
-        label: theme.replace(/_/g, ' '),
+        label: theme.replace(/_/g, ' ') + ' (Legacy)',
       })) ?? []
 
     return [...editorThemeOptions, dividerOption, ...legacyEditorThemeOptions]

+ 3 - 1
services/web/test/frontend/features/editor-left-menu/components/settings/settings-editor-theme.test.tsx

@@ -30,7 +30,9 @@ describe('<SettingsEditorTheme />', function () {
     }
 
     for (const theme of legacyEditorThemes) {
-      const option = within(select).getByText(theme.replace(/_/g, ' '))
+      const option = within(select).getByText(
+        theme.replace(/_/g, ' ') + ' (Legacy)'
+      )
       expect(option.getAttribute('value')).to.equal(theme)
     }
   })