From 04b533ff54f5e677a9a70785f4d9ad7eb2c33fa5 Mon Sep 17 00:00:00 2001 From: sgfost <46429375+sgfost@users.noreply.github.com> Date: Wed, 3 May 2023 19:02:14 -0700 Subject: [PATCH] refactor: form/field component renaming - use more descripting prefixes for form components - some type/variable renaming - create src/types.ts for shared types and a `BaseFieldProps` for field components to extend --- .../src/components/CodebaseListSidebar.vue | 18 ++++---- .../src/components/EventEditForm.vue | 36 ++++++++-------- frontend-vue3/src/components/FormDemo.vue | 22 +++++----- .../src/components/ProfileEditForm.vue | 40 +++++++++--------- .../__tests__/CodebaseSearch.test.ts | 32 +++++++-------- .../src/components/form/CheckboxField.vue | 34 +++++++++++++++ ...FormDatePicker.vue => DatepickerField.vue} | 22 ++++------ .../form/{FormError.vue => FieldError.vue} | 0 .../form/{FormHelp.vue => FieldHelp.vue} | 0 .../form/{FormLabel.vue => FieldLabel.vue} | 0 .../src/components/form/FormAlert.vue | 10 ++--- .../src/components/form/FormCheckbox.vue | 41 ------------------- .../{FormMarkdown.vue => MarkdownField.vue} | 22 ++++------ ...FormOrgSearch.vue => ResearchOrgField.vue} | 25 +++++------ ...mOrgItems.vue => ResearchOrgListField.vue} | 31 ++++++-------- .../form/{FormSelect.vue => SelectField.vue} | 26 +++++------- .../form/{FormTagger.vue => TaggerField.vue} | 24 +++++------ .../form/{FormTextInput.vue => TextField.vue} | 22 ++++------ .../{FormTextItems.vue => TextListField.vue} | 23 ++++------- .../{FormTextArea.vue => TextareaField.vue} | 24 +++++------ frontend-vue3/src/composables/api/ror.ts | 28 +------------ frontend-vue3/src/composables/api/tags.ts | 3 +- frontend-vue3/src/types.ts | 37 +++++++++++++++++ 23 files changed, 240 insertions(+), 280 deletions(-) create mode 100644 frontend-vue3/src/components/form/CheckboxField.vue rename frontend-vue3/src/components/form/{FormDatePicker.vue => DatepickerField.vue} (64%) rename frontend-vue3/src/components/form/{FormError.vue => FieldError.vue} (100%) rename frontend-vue3/src/components/form/{FormHelp.vue => FieldHelp.vue} (100%) rename frontend-vue3/src/components/form/{FormLabel.vue => FieldLabel.vue} (100%) delete mode 100644 frontend-vue3/src/components/form/FormCheckbox.vue rename frontend-vue3/src/components/form/{FormMarkdown.vue => MarkdownField.vue} (61%) rename frontend-vue3/src/components/form/{FormOrgSearch.vue => ResearchOrgField.vue} (81%) rename frontend-vue3/src/components/form/{FormOrgItems.vue => ResearchOrgListField.vue} (86%) rename frontend-vue3/src/components/form/{FormSelect.vue => SelectField.vue} (57%) rename frontend-vue3/src/components/form/{FormTagger.vue => TaggerField.vue} (77%) rename frontend-vue3/src/components/form/{FormTextInput.vue => TextField.vue} (62%) rename frontend-vue3/src/components/form/{FormTextItems.vue => TextListField.vue} (80%) rename frontend-vue3/src/components/form/{FormTextArea.vue => TextareaField.vue} (55%) create mode 100644 frontend-vue3/src/types.ts diff --git a/frontend-vue3/src/components/CodebaseListSidebar.vue b/frontend-vue3/src/components/CodebaseListSidebar.vue index f74d273c7..1532f1e6e 100644 --- a/frontend-vue3/src/components/CodebaseListSidebar.vue +++ b/frontend-vue3/src/components/CodebaseListSidebar.vue @@ -7,11 +7,11 @@ > diff --git a/frontend-vue3/src/components/form/FormCheckbox.vue b/frontend-vue3/src/components/form/FormCheckbox.vue deleted file mode 100644 index bf3a7c226..000000000 --- a/frontend-vue3/src/components/form/FormCheckbox.vue +++ /dev/null @@ -1,41 +0,0 @@ - - - diff --git a/frontend-vue3/src/components/form/FormMarkdown.vue b/frontend-vue3/src/components/form/MarkdownField.vue similarity index 61% rename from frontend-vue3/src/components/form/FormMarkdown.vue rename to frontend-vue3/src/components/form/MarkdownField.vue index d486ddcec..7396a7504 100644 --- a/frontend-vue3/src/components/form/FormMarkdown.vue +++ b/frontend-vue3/src/components/form/MarkdownField.vue @@ -1,7 +1,7 @@