From 609bc4d97db56edd0299c7733e80ffe0cabe135b Mon Sep 17 00:00:00 2001 From: Ricardo Espinoza Date: Sat, 24 Aug 2024 09:24:08 -0400 Subject: [PATCH] refactor(editor): Standardize components sections order (no-changelog) (#10540) --- packages/@n8n_io/eslint-config/frontend.js | 6 + .../src/components/N8nActionBox/ActionBox.vue | 52 +- .../N8nActionDropdown/ActionDropdown.vue | 108 +- .../N8nActionToggle/ActionToggle.vue | 70 +- .../src/components/N8nAlert/Alert.vue | 50 +- .../src/components/N8nAvatar/Avatar.vue | 32 +- .../src/components/N8nBadge/Badge.vue | 16 +- .../src/components/N8nBlockUi/BlockUi.vue | 20 +- .../src/components/N8nButton/Button.vue | 48 +- .../src/components/N8nCallout/Callout.vue | 34 +- .../src/components/N8nCard/Card.vue | 40 +- .../src/components/N8nCheckbox/Checkbox.vue | 44 +- .../N8nCircleLoader/CircleLoader.vue | 46 +- .../src/components/N8nDatatable/Datatable.vue | 124 +- .../src/components/N8nFormBox/FormBox.vue | 80 +- .../src/components/N8nFormInput/FormInput.vue | 186 +- .../src/components/N8nHeading/Heading.vue | 12 +- .../src/components/N8nIcon/Icon.vue | 12 +- .../components/N8nIconButton/IconButton.vue | 8 +- .../N8nInfoAccordion/InfoAccordion.vue | 80 +- .../src/components/N8nInfoTip/InfoTip.vue | 68 +- .../src/components/N8nInput/Input.vue | 64 +- .../components/N8nInputLabel/InputLabel.vue | 66 +- .../src/components/N8nLink/Link.vue | 20 +- .../src/components/N8nLoading/Loading.vue | 68 +- .../src/components/N8nMarkdown/Markdown.vue | 40 +- .../src/components/N8nMenu/Menu.vue | 110 +- .../src/components/N8nMenuItem/MenuItem.vue | 128 +- .../src/components/N8nNodeIcon/NodeIcon.vue | 74 +- .../src/components/N8nNotice/Notice.vue | 34 +- .../src/components/N8nPulse/Pulse.vue | 8 +- .../N8nRadioButtons/RadioButton.vue | 32 +- .../N8nRadioButtons/RadioButtons.vue | 34 +- .../N8nResizeWrapper/ResizeWrapper.vue | 26 +- .../N8nResizeableSticky/ResizeableSticky.vue | 34 +- .../src/components/N8nRoute/Route.vue | 28 +- .../src/components/N8nSpinner/Spinner.vue | 24 +- .../src/components/N8nSticky/Sticky.vue | 96 +- .../src/components/N8nTabs/Tabs.vue | 112 +- .../src/components/N8nTag/Tag.vue | 12 +- .../src/components/N8nTags/Tags.vue | 40 +- .../src/components/N8nText/Text.vue | 12 +- .../src/components/N8nTooltip/Tooltip.vue | 44 +- .../src/components/N8nTree/Tree.vue | 56 +- .../src/components/N8nUserInfo/UserInfo.vue | 54 +- .../components/N8nUserSelect/UserSelect.vue | 64 +- .../src/components/N8nUsersList/UsersList.vue | 72 +- .../src/styleguide/VariableTable.vue | 34 +- .../styleguide/components/SpacingPreview.vue | 22 +- .../editor-ui/src/components/AboutModal.vue | 86 +- .../src/components/ActivationModal.vue | 72 +- packages/editor-ui/src/components/Badge.vue | 12 +- packages/editor-ui/src/components/Banner.vue | 74 +- .../src/components/BinaryDataDisplay.vue | 40 +- .../src/components/BinaryDataDisplayEmbed.vue | 50 +- .../src/components/BreakpointsObserver.vue | 12 +- .../src/components/CanvasControls.vue | 67 +- .../src/components/ChangePasswordModal.vue | 60 +- .../CodeNodeEditor/CodeNodeEditor.vue | 96 +- .../src/components/CollectionParameter.vue | 100 +- .../src/components/CollectionWorkflowCard.vue | 14 +- .../src/components/CommunityPackageCard.vue | 126 +- .../CommunityPackageInstallModal.vue | 184 +- .../CommunityPackageManageConfirmModal.vue | 68 +- .../src/components/ContactPromptModal.vue | 68 +- .../editor-ui/src/components/CopyInput.vue | 48 +- .../CredentialEdit/CredentialConfig.vue | 316 +- .../CredentialEdit/CredentialDocs.vue | 48 +- .../CredentialEdit/CredentialEdit.vue | 230 +- .../CredentialEdit/CredentialInfo.vue | 40 +- .../CredentialEdit/CredentialInputs.vue | 50 +- .../CredentialEdit/CredentialSharing.ee.vue | 98 +- .../CredentialEdit/GoogleAuthButton.vue | 16 +- .../components/CredentialEdit/OauthButton.vue | 16 +- .../src/components/CredentialsSelect.vue | 100 +- .../src/components/CredentialsSelectModal.vue | 118 +- .../editor-ui/src/components/Draggable.vue | 34 +- .../src/components/DraggableTarget.vue | 12 +- .../components/DuplicateWorkflowDialog.vue | 98 +- .../src/components/EnterpriseEdition.ee.vue | 14 +- .../ExpandableInput/ExpandableInputBase.vue | 14 +- .../ExpandableInput/ExpandableInputEdit.vue | 32 +- .../ExpandableInputPreview.vue | 20 +- .../src/components/ExpressionEditModal.vue | 182 +- .../ExpressionEditorModalInput.vue | 8 +- .../src/components/ExpressionFunctionIcon.vue | 12 +- .../src/components/FeatureComingSoon.vue | 56 +- .../components/FixedCollectionParameter.vue | 256 +- .../editor-ui/src/components/GoBackButton.vue | 14 +- .../src/components/HoverableNodeIcon.vue | 82 +- .../src/components/HtmlEditor/HtmlEditor.vue | 14 +- .../src/components/ImportCurlModal.vue | 82 +- .../src/components/InlineNameEdit.vue | 64 +- .../src/components/InlineTextEdit.vue | 44 +- .../editor-ui/src/components/InputPanel.vue | 270 +- .../src/components/IntersectionObserved.vue | 12 +- .../src/components/IntersectionObserver.vue | 12 +- .../src/components/InviteUsersModal.vue | 124 +- .../src/components/JsEditor/JsEditor.vue | 14 +- .../src/components/JsonEditor/JsonEditor.vue | 14 +- packages/editor-ui/src/components/Logo.vue | 8 +- .../src/components/MainHeader/TabBar.vue | 32 +- .../editor-ui/src/components/MainSidebar.vue | 198 +- .../src/components/MfaSetupModal.vue | 264 +- packages/editor-ui/src/components/Modal.vue | 98 +- .../editor-ui/src/components/ModalDrawer.vue | 36 +- .../editor-ui/src/components/ModalRoot.vue | 26 +- .../src/components/MultipleParameter.vue | 170 +- .../src/components/NDVFloatingNodes.vue | 76 +- .../src/components/NDVSubConnections.vue | 248 +- packages/editor-ui/src/components/Node.vue | 358 +-- .../Node/NodeCreator/ItemTypes/ActionItem.vue | 44 +- .../Node/NodeCreator/ItemTypes/LabelItem.vue | 12 +- .../Node/NodeCreator/ItemTypes/LinkItem.vue | 20 +- .../Node/NodeCreator/ItemTypes/NodeItem.vue | 85 +- .../NodeCreator/ItemTypes/SubcategoryItem.vue | 32 +- .../Node/NodeCreator/ItemTypes/ViewItem.vue | 20 +- .../Node/NodeCreator/NodeCreator.vue | 52 +- .../Node/NodeCreator/Panel/NoResults.vue | 38 +- .../Node/NodeCreator/Panel/SearchBar.vue | 50 +- .../src/components/NodeCredentials.vue | 222 +- .../src/components/NodeDetailsView.vue | 280 +- .../src/components/NodeExecuteButton.vue | 58 +- .../editor-ui/src/components/NodeIcon.vue | 34 +- .../editor-ui/src/components/NodeList.vue | 28 +- .../editor-ui/src/components/NodeSettings.vue | 362 +-- .../src/components/NodeSettingsTabs.vue | 18 +- .../editor-ui/src/components/NodeTitle.vue | 86 +- .../editor-ui/src/components/NodeWebhooks.vue | 102 +- .../editor-ui/src/components/OutputPanel.vue | 208 +- .../editor-ui/src/components/PageAlert.vue | 8 +- .../src/components/PanelDragButton.vue | 62 +- .../src/components/ParameterInput.vue | 1174 ++++---- .../src/components/ParameterInputExpanded.vue | 112 +- .../src/components/ParameterInputFull.vue | 156 +- .../src/components/ParameterInputHint.vue | 40 +- .../src/components/ParameterInputList.vue | 328 +-- .../src/components/ParameterInputWrapper.vue | 94 +- .../src/components/ParameterIssues.vue | 22 +- .../src/components/ParameterOptions.vue | 82 +- .../src/components/PersonalizationModal.vue | 108 +- .../PromptMfaCodeModal/PromptMfaCodeModal.vue | 72 +- .../src/components/PushConnectionTracker.vue | 26 +- .../ResourceLocator/ResourceLocator.vue | 292 +- .../ResourceLocatorDropdown.vue | 158 +- packages/editor-ui/src/components/RunData.vue | 2598 ++++++++--------- .../RunDataAi/AiRunContentBlock.vue | 126 +- .../src/components/RunDataAi/RunDataAi.vue | 128 +- .../components/RunDataAi/RunDataAiContent.vue | 146 +- .../editor-ui/src/components/RunDataHtml.vue | 8 +- .../editor-ui/src/components/RunDataJson.vue | 152 +- .../src/components/RunDataJsonActions.vue | 72 +- .../editor-ui/src/components/RunDataTable.vue | 326 +-- packages/editor-ui/src/components/RunInfo.vue | 66 +- .../EventDestinationCard.ee.vue | 94 +- .../EventDestinationSettingsModal.ee.vue | 336 +-- .../EventSelection.ee.vue | 112 +- .../src/components/SettingsSidebar.vue | 44 +- .../editor-ui/src/components/ShortenName.vue | 12 +- .../src/components/SqlEditor/SqlEditor.vue | 26 +- packages/editor-ui/src/components/Sticky.vue | 212 +- .../src/components/TagsContainer.vue | 98 +- .../editor-ui/src/components/TagsDropdown.vue | 117 +- .../components/TagsManager/TagsManager.vue | 60 +- .../TagsManager/TagsView/TagsTable.vue | 214 +- .../TagsManager/TagsView/TagsTableHeader.vue | 58 +- .../TagsManager/TagsView/TagsView.vue | 48 +- .../editor-ui/src/components/TemplateCard.vue | 102 +- .../src/components/TemplateDetails.vue | 117 +- .../src/components/TemplateDetailsBlock.vue | 12 +- .../src/components/TemplateFilters.vue | 82 +- .../editor-ui/src/components/TemplateList.vue | 70 +- .../src/components/TemplatesInfoCard.vue | 28 +- .../src/components/TemplatesInfoCarousel.vue | 76 +- .../editor-ui/src/components/TextEdit.vue | 60 +- .../editor-ui/src/components/TitledList.vue | 13 +- .../editor-ui/src/components/TriggerPanel.vue | 218 +- .../editor-ui/src/components/UpdatesPanel.vue | 76 +- .../editor-ui/src/components/VersionCard.vue | 38 +- .../src/components/WorkerList.ee.vue | 40 +- .../components/Workers/WorkerAccordion.ee.vue | 30 +- .../src/components/Workers/WorkerCard.ee.vue | 70 +- .../Workers/WorkerChartsAccordion.ee.vue | 66 +- .../Workers/WorkerJobAccordion.ee.vue | 36 +- .../Workers/WorkerNetAccordion.ee.vue | 42 +- .../WorkflowLMChat/MessageOptionAction.vue | 22 +- .../WorkflowLMChat/MessageOptionTooltip.vue | 12 +- .../WorkflowLMChat/WorkflowLMChat.vue | 154 +- .../src/components/WorkflowPreview.vue | 48 +- .../src/components/WorkflowSettings.vue | 742 ++--- .../src/components/WorkflowShareModal.ee.vue | 236 +- .../forms/ResourceFiltersDropdown.vue | 92 +- .../src/components/layouts/PageViewLayout.vue | 18 +- .../layouts/ResourcesListLayout.vue | 294 +- packages/editor-ui/src/views/AuthView.vue | 46 +- .../editor-ui/src/views/CanvasAddButton.vue | 38 +- .../src/views/ChangePasswordView.vue | 20 +- .../editor-ui/src/views/CredentialsView.vue | 126 +- packages/editor-ui/src/views/ErrorView.vue | 36 +- .../src/views/ForgotMyPasswordView.vue | 8 +- packages/editor-ui/src/views/MfaView.vue | 140 +- packages/editor-ui/src/views/NodeView.vue | 438 +-- .../editor-ui/src/views/SettingsApiView.vue | 176 +- .../src/views/SettingsCommunityNodesView.vue | 82 +- .../src/views/SettingsFakeDoorView.vue | 8 +- .../editor-ui/src/views/SettingsLdapView.vue | 268 +- .../src/views/SettingsLogStreamingView.vue | 148 +- packages/editor-ui/src/views/SetupView.vue | 18 +- packages/editor-ui/src/views/SigninView.vue | 40 +- .../src/views/TemplatesCollectionView.vue | 102 +- .../src/views/TemplatesSearchView.vue | 166 +- .../editor-ui/src/views/TemplatesView.vue | 32 +- .../src/views/TemplatesWorkflowView.vue | 114 +- packages/editor-ui/src/views/WorkerView.vue | 26 +- .../editor-ui/src/views/WorkflowsView.vue | 322 +- 215 files changed, 11224 insertions(+), 11213 deletions(-) diff --git a/packages/@n8n_io/eslint-config/frontend.js b/packages/@n8n_io/eslint-config/frontend.js index c801a6007cf9f..cd62a6059a352 100644 --- a/packages/@n8n_io/eslint-config/frontend.js +++ b/packages/@n8n_io/eslint-config/frontend.js @@ -66,6 +66,12 @@ module.exports = { useAttrs: 'attrs', }, ], + 'vue/block-order': [ + 'error', + { + order: ['script', 'template', 'style'], + }, + ], // TODO: fix these '@typescript-eslint/no-unsafe-call': 'off', diff --git a/packages/design-system/src/components/N8nActionBox/ActionBox.vue b/packages/design-system/src/components/N8nActionBox/ActionBox.vue index 575895ab1585b..c048c3f6438c5 100644 --- a/packages/design-system/src/components/N8nActionBox/ActionBox.vue +++ b/packages/design-system/src/components/N8nActionBox/ActionBox.vue @@ -1,3 +1,29 @@ + + - - diff --git a/packages/editor-ui/src/components/FeatureComingSoon.vue b/packages/editor-ui/src/components/FeatureComingSoon.vue index 3dcf1e58b13df..a96b3d0ec31f8 100644 --- a/packages/editor-ui/src/components/FeatureComingSoon.vue +++ b/packages/editor-ui/src/components/FeatureComingSoon.vue @@ -1,31 +1,3 @@ - - + + diff --git a/packages/editor-ui/src/components/NodeList.vue b/packages/editor-ui/src/components/NodeList.vue index 53d710ad15932..8e93ecbe5ae49 100644 --- a/packages/editor-ui/src/components/NodeList.vue +++ b/packages/editor-ui/src/components/NodeList.vue @@ -1,17 +1,3 @@ - - + + diff --git a/packages/editor-ui/src/components/ResourceLocator/ResourceLocatorDropdown.vue b/packages/editor-ui/src/components/ResourceLocator/ResourceLocatorDropdown.vue index ddadd763f9b0e..658f2da9d59d3 100644 --- a/packages/editor-ui/src/components/ResourceLocator/ResourceLocatorDropdown.vue +++ b/packages/editor-ui/src/components/ResourceLocator/ResourceLocatorDropdown.vue @@ -1,82 +1,3 @@ - - + + diff --git a/packages/editor-ui/src/components/TemplatesInfoCarousel.vue b/packages/editor-ui/src/components/TemplatesInfoCarousel.vue index 377f6c81373a8..6810443b26d32 100644 --- a/packages/editor-ui/src/components/TemplatesInfoCarousel.vue +++ b/packages/editor-ui/src/components/TemplatesInfoCarousel.vue @@ -1,41 +1,3 @@ - - + + diff --git a/packages/editor-ui/src/components/WorkflowLMChat/WorkflowLMChat.vue b/packages/editor-ui/src/components/WorkflowLMChat/WorkflowLMChat.vue index 333a16cc3661e..9d032f5fa1bb4 100644 --- a/packages/editor-ui/src/components/WorkflowLMChat/WorkflowLMChat.vue +++ b/packages/editor-ui/src/components/WorkflowLMChat/WorkflowLMChat.vue @@ -1,80 +1,3 @@ - - + +