From 3355a5a595f88b3f8e4ccecddc7ae87ffcf80e8e Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Tue, 22 Oct 2024 10:19:03 +0200 Subject: [PATCH] Reordering some git gtViews' priorities --- src/GToolkit4Git/GtGitRepository.class.st | 49 ++++++++++--------- .../IceGitCliRepository.extension.st | 2 +- src/GToolkit4Git/IceRepository.extension.st | 2 +- 3 files changed, 28 insertions(+), 25 deletions(-) diff --git a/src/GToolkit4Git/GtGitRepository.class.st b/src/GToolkit4Git/GtGitRepository.class.st index cae8605e..c660eeb2 100644 --- a/src/GToolkit4Git/GtGitRepository.class.st +++ b/src/GToolkit4Git/GtGitRepository.class.st @@ -734,7 +734,7 @@ GtGitRepository >> gtAllCommitsFor: aView [ self isMissing ifTrue: [ ^ aView empty ]. ^ aView explicit title: 'All Commits' translated; - priority: 4; + priority: 6; stencil: [ | list color branches commits ruler | branches := self repository allBranches. commits := self repository allCommits. @@ -842,7 +842,7 @@ GtGitRepository >> gtChangesFor: aView context: aContext [ items: [ changes children ]; children: #children; expandUpTo: 3; - priority: 1; + priority: 3; stencil: [ :anIceNode | | element contextMenuOptions | contextMenuOptions := self contextMenuOptionsFor: anIceNode. @@ -983,7 +983,7 @@ GtGitRepository >> gtCommitsFor: aView [ outgoingCommits := self viewModel outgoingCommits. ^ aView columnedList title: 'Commits' translated; - priority: 2; + priority: 5; items: [ (AsyncSequenceStream forCollection: incomingCommits) merge: self repository head commitStream ]; column: 'Status' @@ -1099,7 +1099,7 @@ GtGitRepository >> gtReadmeFor: aView context: aContext [ ^ aView explicit title: 'README'; - priority: 5; + priority: 10; stencil: [ | snippet snippetViewModel | snippet := LeTextSnippet string: (readme exists @@ -1165,31 +1165,34 @@ GtGitRepository >> gtViewDetailsIn: composite [ ^ composite columnedList title: 'Details'; - priority: 45; + priority: 2; items: [ { - { 'Name' . self name }. - { 'Origin' . [ self repository originUrl ] on: Error do: [ '' ] }. - { 'Branch' . [ self repository branchName ] on: Error do: [ '' ] }. - { 'Code directory' + { 'name' . self name }. + { 'origin' . [ self repository originUrl ] on: Error do: [ '' ] }. + { 'branch' . [ self repository branchName ] on: Error do: [ '' ] }. + { 'code directory' . [ self repository codeDirectory ] on: Error do: [ '' ] . [ self repository codeDirectory asFileReference ] on: Error do: [ '' ]}. - { 'Implementation' + { 'implementation' . self repository isGitCliRepository ifTrue: [ 'Libgit-CLI' ] ifFalse: [ 'Libgit2 FFI' ] }. - { 'Missing' . self isMissing }. - { 'Setup done' . self isSetupDone }. - { 'Uninitialized' . self isUninitialized }. - { 'Modified' . [ self isModified ] on: Error do: [ '' ] }. - { 'Dirty' . [ self repository isDirty ] on: Error do: [ '' ] }. - { 'Committable' . self isCommittable }. - { 'Has repository' . self hasRepository }. - { 'Has package' . self hasPackage }. - { 'Has database' . self hasDatabase }. - { 'Has basline' . self hasBaseline }. - { 'Has commits' . self hasCommits }. - { 'Has changes' . [ self hasChanges ] on: Error do: [ '' ] }. - { 'Status' . self status } + { 'iceberg repository' . self repository }. + { 'iceberg working copy' . self icebergWorkingCopy }. + { 'lepiter working copy' . self lepiterWorkingCopy }. + { 'missing' . self isMissing }. + { 'setup done' . self isSetupDone }. + { 'uninitialized' . self isUninitialized }. + { 'modified' . [ self isModified ] on: Error do: [ '' ] }. + { 'dirty' . [ self repository isDirty ] on: Error do: [ '' ] }. + { 'committable' . self isCommittable }. + { 'has repository' . self hasRepository }. + { 'has package' . self hasPackage }. + { 'has database' . self hasDatabase }. + { 'has basline' . self hasBaseline }. + { 'has commits' . self hasCommits }. + { 'has changes' . [ self hasChanges ] on: Error do: [ '' ] }. + { 'status' . self status } } ]; column: 'Key' text: #first; column: 'Value' text: #second weight: 3; diff --git a/src/GToolkit4Git/IceGitCliRepository.extension.st b/src/GToolkit4Git/IceGitCliRepository.extension.st index 549cc089..4022cac2 100644 --- a/src/GToolkit4Git/IceGitCliRepository.extension.st +++ b/src/GToolkit4Git/IceGitCliRepository.extension.st @@ -72,7 +72,7 @@ IceGitCliRepository >> gtStatusFor: aView [ self isMissing ifTrue: [ ^ aView empty ]. ^ aView columnedTree title: 'File statuses'; - priority: 2; + priority: 10; items: [ (self getStatusByFile associations groupedBy: [ :each | each value categoryName ]) associations sort: [ :a | diff --git a/src/GToolkit4Git/IceRepository.extension.st b/src/GToolkit4Git/IceRepository.extension.st index 305c619e..e10d91f1 100644 --- a/src/GToolkit4Git/IceRepository.extension.st +++ b/src/GToolkit4Git/IceRepository.extension.st @@ -121,7 +121,7 @@ IceRepository >> gtViewDetailsIn: composite [ ^ composite columnedList title: 'Details'; - priority: 10; + priority: 5; items: [ { { 'name' . self name }. { 'origin' . [ self originUrl ] on: Error do: [ '' ] }.