Skip to content

Commit

Permalink
recent board buttons work now :)
Browse files Browse the repository at this point in the history
  • Loading branch information
FePrHPI committed Jun 10, 2024
1 parent b107d6c commit 187301c
Show file tree
Hide file tree
Showing 10 changed files with 41 additions and 35 deletions.
4 changes: 1 addition & 3 deletions Squello-Core.package/SPBBoard.class/class/open.st
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,4 @@ open
prompt := self promptUrl.
prompt = '' ifTrue: [^ self].
self lastProject: prompt.
(prompt beginsWith: self localPrefix) ifTrue: [^ self openLocal: prompt].
^ self newWith: prompt.

^ self openFromPrompt: prompt.
7 changes: 7 additions & 0 deletions Squello-Core.package/SPBBoard.class/class/openFromPrompt..st
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
startup
openFromPrompt: prompt

[(prompt beginsWith: self localPrefix)
ifTrue: [self openLocal: prompt]
ifFalse: [self newWith: prompt.]] fork.

4 changes: 0 additions & 4 deletions Squello-Core.package/SPBBoard.class/class/openInBackground.st

This file was deleted.

4 changes: 2 additions & 2 deletions Squello-Core.package/SPBBoard.class/methodProperties.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"localPrefix" : "FP 5/27/2024 17:40",
"newLocalWith:" : "FP 5/23/2024 09:43",
"newWith:" : "mcr 8/4/2022 01:09",
"open" : "FP 5/27/2024 17:40",
"openInBackground" : "FP 5/27/2024 15:33",
"open" : "FP 6/10/2024 16:24",
"openFromPrompt:" : "FP 6/10/2024 16:26",
"openLocal:" : "FP 6/8/2024 11:59",
"promptUrl" : "FP 5/23/2024 11:00",
"registerInAppsMenu" : "lo 6/4/2022 23:19" },
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
currently not in use
toolbuilder
buildRecentGitHubBoardsButtonSpecWith: aBuilder withBoardInfo: aDictionary


| name |
name := (aDictionary at: #repo), ' : ' ,( aDictionary at: #name).
^ aBuilder build: (aBuilder pluggableButtonSpec new
model: [SPBBoard openFromPrompt: (aDictionary at: #url)];
label: name;
action: #value;
yourself).

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
toolbuilder
buildRecentGitHubBoardsChildren

|children|
children := ( self class RecentGitHubBoards collect: [:dictOfRecentBoard | self buildRecentGitHubBoardsButtonSpecWith: self usedBuilder withBoardInfo: dictOfRecentBoard] )asOrderedCollection.
^ children.
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
toolbuilder
buildRecentGitHubBoardsSpecWith: aBuilder

| spec |
self usedBuilder: aBuilder.
spec := aBuilder pluggablePanelSpec new
model: self;
"label: 'Recent Local Boards';"

"frame: ([email protected] corner: 1@1);"
children:
{"self class RecentGitHubBoards: [:recentGitHubBoard | self buildRecentGitHubBoardsButtonSpecWith: aBuilder withBoardInfo: recentGitHubBoard]
"};
layout: #horizontal;
yourself.
^ aBuilder build: spec.
^ aBuilder pluggablePanelSpec new
name: #RecentGitHubBoards;
model: self;
children: #buildRecentGitHubBoardsChildren;
layout: #horizontal;
yourself.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ buildRecentLocalBoardsButtonSpecWith: aBuilder withName: aName


^ aBuilder build: (aBuilder pluggableButtonSpec new
model: self;
model: [SPBBoard openFromPrompt: aName];
action: #value;
label: aName;
yourself).

Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,4 @@ buildRecentLocalBoardsChildren

|children|
children := ( self class RecentLocalBoards collect: [:NameOfRecentLocalBoard | self buildRecentLocalBoardsButtonSpecWith: self usedBuilder withName: NameOfRecentLocalBoard] )asOrderedCollection.
^ children.
"pluggableButtonSpec new
model: self;
label:
yourself."

^ children.
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@
"buildNewLocalBoardSpecWith:" : "Haru 6/7/2024 12:14",
"buildOpenBoardSpecWith:" : "Haru 6/7/2024 12:14",
"buildRecentBoardsSpecWith:" : "FP 6/10/2024 15:28",
"buildRecentGitHubBoardsButtonSpecWith:withBoardInfo:" : "Haru 6/9/2024 13:57",
"buildRecentGitHubBoardsSpecWith:" : "Haru 6/9/2024 19:55",
"buildRecentLocalBoardsButtonSpecWith:withName:" : "FP 6/10/2024 14:09",
"buildRecentLocalBoardsChildren" : "FP 6/10/2024 14:06",
"buildRecentGitHubBoardsButtonSpecWith:withBoardInfo:" : "FP 6/10/2024 16:27",
"buildRecentGitHubBoardsChildren" : "FP 6/10/2024 16:00",
"buildRecentGitHubBoardsSpecWith:" : "FP 6/10/2024 15:55",
"buildRecentLocalBoardsButtonSpecWith:withName:" : "FP 6/10/2024 16:27",
"buildRecentLocalBoardsChildren" : "FP 6/10/2024 15:59",
"buildRecentLocalBoardsSpecWith:" : "FP 6/10/2024 14:20",
"buildResetUserAccountSpecWith:" : "Haru 6/7/2024 12:15",
"buildSidebarSpecWith:" : "FP 6/10/2024 14:36",
Expand Down

0 comments on commit 187301c

Please sign in to comment.