Skip to content

Commit

Permalink
Reordering some git gtViews' priorities
Browse files Browse the repository at this point in the history
  • Loading branch information
svenvc committed Oct 22, 2024
1 parent 0a4ed4d commit 3355a5a
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 25 deletions.
49 changes: 26 additions & 23 deletions src/GToolkit4Git/GtGitRepository.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -1165,31 +1165,34 @@ GtGitRepository >> gtViewDetailsIn: composite [
<gtView>
^ 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;
Expand Down
2 changes: 1 addition & 1 deletion src/GToolkit4Git/IceGitCliRepository.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
2 changes: 1 addition & 1 deletion src/GToolkit4Git/IceRepository.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ IceRepository >> gtViewDetailsIn: composite [
<gtView>
^ composite columnedList
title: 'Details';
priority: 10;
priority: 5;
items: [ {
{ 'name' . self name }.
{ 'origin' . [ self originUrl ] on: Error do: [ '' ] }.
Expand Down

0 comments on commit 3355a5a

Please sign in to comment.