From 9a3de436f452144933888fb1e4f336efeb93293a Mon Sep 17 00:00:00 2001 From: silverwind Date: Sat, 2 Sep 2023 16:59:07 +0200 Subject: [PATCH] Reorder blocks in vue SFCs (#26874) The [recommended order](https://vuejs.org/guide/scaling-up/sfc.html) for SFC blocks is script -> template -> style, which we were violating because template and script were swapped. I do find script first also easier to read because the imports are on top, letting me immideatly see a component's dependencies. This is a pure cut-paste refactor with some removal of some empty lines. --------- Co-authored-by: Lauris BH --- web_src/js/components/ActionRunStatus.vue | 21 +- web_src/js/components/ActivityHeatmap.vue | 28 +- web_src/js/components/ContextPopup.vue | 49 ++- web_src/js/components/DashboardRepoList.vue | 298 +++++++++--------- web_src/js/components/DiffCommitSelector.vue | 143 +++++---- web_src/js/components/DiffFileList.vue | 43 ++- web_src/js/components/DiffFileTree.vue | 19 +- web_src/js/components/DiffFileTreeItem.vue | 46 ++- .../js/components/PullRequestMergeForm.vue | 156 +++++---- web_src/js/components/RepoActionView.vue | 241 +++++++------- .../js/components/RepoActivityTopAuthors.vue | 101 +++--- .../js/components/RepoBranchTagSelector.vue | 146 +++++---- .../components/ScopedAccessTokenSelector.vue | 49 ++- 13 files changed, 661 insertions(+), 679 deletions(-) diff --git a/web_src/js/components/ActionRunStatus.vue b/web_src/js/components/ActionRunStatus.vue index 1955decc1..51a774543 100644 --- a/web_src/js/components/ActionRunStatus.vue +++ b/web_src/js/components/ActionRunStatus.vue @@ -2,17 +2,6 @@ Please also update the template file above if this vue is modified. action status accepted: success, skipped, waiting, blocked, running, failure, cancelled, unknown --> - - + diff --git a/web_src/js/components/ActivityHeatmap.vue b/web_src/js/components/ActivityHeatmap.vue index 1b083ed13..96a6e6801 100644 --- a/web_src/js/components/ActivityHeatmap.vue +++ b/web_src/js/components/ActivityHeatmap.vue @@ -1,17 +1,3 @@ - + diff --git a/web_src/js/components/ContextPopup.vue b/web_src/js/components/ContextPopup.vue index b6852655f..303e6d0c8 100644 --- a/web_src/js/components/ContextPopup.vue +++ b/web_src/js/components/ContextPopup.vue @@ -1,28 +1,3 @@ - - + diff --git a/web_src/js/components/DashboardRepoList.vue b/web_src/js/components/DashboardRepoList.vue index 898362776..5b8075f07 100644 --- a/web_src/js/components/DashboardRepoList.vue +++ b/web_src/js/components/DashboardRepoList.vue @@ -1,152 +1,3 @@ - - +