From 3c87f60481abbb0e2559d3233a5387db4c3f35dc Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Fri, 29 Apr 2022 12:14:29 +0200 Subject: [PATCH] scaffolder: tweak names of TemplateEditor components Signed-off-by: Patrik Oldsberg --- .../{EditorIntro.tsx => TemplateEditorIntro.tsx} | 4 ++-- .../components/TemplateEditorPage/TemplateEditorPage.tsx | 8 ++++---- .../{TemplateFormEditor.tsx => TemplateFormPreviewer.tsx} | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) rename plugins/scaffolder/src/components/TemplateEditorPage/{EditorIntro.tsx => TemplateEditorIntro.tsx} (98%) rename plugins/scaffolder/src/components/TemplateEditorPage/{TemplateFormEditor.tsx => TemplateFormPreviewer.tsx} (99%) diff --git a/plugins/scaffolder/src/components/TemplateEditorPage/EditorIntro.tsx b/plugins/scaffolder/src/components/TemplateEditorPage/TemplateEditorIntro.tsx similarity index 98% rename from plugins/scaffolder/src/components/TemplateEditorPage/EditorIntro.tsx rename to plugins/scaffolder/src/components/TemplateEditorPage/TemplateEditorIntro.tsx index 1c07a78c9e..dc411ee965 100644 --- a/plugins/scaffolder/src/components/TemplateEditorPage/EditorIntro.tsx +++ b/plugins/scaffolder/src/components/TemplateEditorPage/TemplateEditorIntro.tsx @@ -47,7 +47,7 @@ interface EditorIntroProps { onSelect?: (option: 'local' | 'form') => void; } -export const EditorIntro = (props: EditorIntroProps) => { +export function TemplateEditorIntro(props: EditorIntroProps) { const classes = useStyles(); const supportsLoad = WebFileSystemAccess.isSupported(); @@ -124,4 +124,4 @@ export const EditorIntro = (props: EditorIntroProps) => { ); -}; +} diff --git a/plugins/scaffolder/src/components/TemplateEditorPage/TemplateEditorPage.tsx b/plugins/scaffolder/src/components/TemplateEditorPage/TemplateEditorPage.tsx index f2f603337d..3741a6fc3d 100644 --- a/plugins/scaffolder/src/components/TemplateEditorPage/TemplateEditorPage.tsx +++ b/plugins/scaffolder/src/components/TemplateEditorPage/TemplateEditorPage.tsx @@ -19,9 +19,9 @@ import { TemplateDirectoryAccess, WebFileSystemAccess, } from '../../lib/filesystem'; -import { EditorIntro } from './EditorIntro'; +import { TemplateEditorIntro } from './TemplateEditorIntro'; import { TemplateEditor } from './TemplateEditor'; -import { TemplateFormEditor } from './TemplateFormEditor'; +import { TemplateFormPreviewer } from './TemplateFormPreviewer'; import { FieldExtensionOptions } from '../../extensions'; type Selection = @@ -52,7 +52,7 @@ export function TemplateEditorPage(props: TemplateEditorPageProps) { ); } else if (selection?.type === 'form') { content = ( - setSelection(undefined)} @@ -61,7 +61,7 @@ export function TemplateEditorPage(props: TemplateEditorPageProps) { } else { content = ( - { if (option === 'local') { WebFileSystemAccess.get() diff --git a/plugins/scaffolder/src/components/TemplateEditorPage/TemplateFormEditor.tsx b/plugins/scaffolder/src/components/TemplateEditorPage/TemplateFormPreviewer.tsx similarity index 99% rename from plugins/scaffolder/src/components/TemplateEditorPage/TemplateFormEditor.tsx rename to plugins/scaffolder/src/components/TemplateEditorPage/TemplateFormPreviewer.tsx index 43c7f10a32..bff515d13b 100644 --- a/plugins/scaffolder/src/components/TemplateEditorPage/TemplateFormEditor.tsx +++ b/plugins/scaffolder/src/components/TemplateEditorPage/TemplateFormPreviewer.tsx @@ -105,7 +105,7 @@ const useStyles = makeStyles(theme => ({ }, })); -export const TemplateFormEditor = ({ +export const TemplateFormPreviewer = ({ defaultPreviewTemplate = EXAMPLE_TEMPLATE_PARAMS_YAML, customFieldExtensions = [], onClose,