Skip to content

Commit

Permalink
made landing page mostly functional
Browse files Browse the repository at this point in the history
  • Loading branch information
FePrHPI committed Jun 20, 2024
1 parent c9e2c1a commit 47bbb8d
Show file tree
Hide file tree
Showing 20 changed files with 82 additions and 31 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
save/load
contains: anObject

^ self boards includesKey: anObject.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"boards" : "FP 6/3/2024 11:15",
"boards:" : "FP 6/3/2024 11:15",
"clear" : "FP 6/3/2024 11:15",
"contains:" : "FP 6/20/2024 17:14",
"delete:" : "FP 6/3/2024 11:15",
"load:" : "FP 6/8/2024 11:58",
"loadReadonly:" : "FP 6/8/2024 11:57",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ buildDeleteAllLocalBoardsButtonSpecWith: aBuilder

^ aBuilder pluggableButtonSpec new
model: self;
verticalResizing: #rigid;
action: #deleteAllLocal;
label: 'Delete All';
yourself.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ toolbuilder-manage panel
buildDeleteLocalBoardButtonSpecWith: aBuilder withBoardName: aString

^ aBuilder pluggableButtonSpec new
model: self;
model: [self deleteBoardFromButton: aString];
action: #value;
horizontalResizing: #shrinkWrap;
label: 'Delete';
yourself.
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ buildLocalBoardNameSpecWith: aBuilder withBoardName: aString

^ aBuilder pluggableButtonSpec new
model: self;
label: aString;
label: (aString copyFrom: SPBBoard localPrefix size + 1 to: aString size);
horizontalResizing: #shrinkWrap;
yourself.
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ buildLocalBoardPanelSpecWith: aBuilder withName: aName
^ aBuilder pluggablePanelSpec new
model: self;
layout: #horizontal;
minimumExtent: (200 px @ 50 px);
horizontalResizing: #rigid;
minimumHeight: (50px);
children: {
self buildLocalBoardNameSpecWith: aBuilder withBoardName: aName.
self buildOpenLocalBoardButtonSpecWith: aBuilder withBoardName: aName.
self buildRenameLocalBoardButtonSpecWith: aBuilder withBoardName: aName.
self buildDeleteLocalBoardButtonSpecWith: aBuilder withBoardName: aName.
self buildLocalBoardNameSpecWith: aBuilder withBoardName: aName.
};
yourself.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
toolbuilder-manage panel
buildManageLocalBoardPanelSpecWith: aBuilder
"We just reuse this from the SquotBrowser, idk if this is good"

^ aBuilder pluggablePanelSpec new
model: self;
Expand All @@ -9,9 +8,4 @@ buildManageLocalBoardPanelSpecWith: aBuilder
self buildLocalBoardsListSpecWith: aBuilder.
self buildLocalBoardCommonActionsSpecWith: aBuilder.
};
yourself.

"^ SquotGUIUtilities buildVerticalLayout: {
self buildLocalBoardsListSpecWith: aBuilder.
self buildLocalBoardCommonActionsSpecWith: aBuilder.
} with: aBuilder."
yourself.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ buildNewLocalBoardButtonSpecWith: aBuilder

^ aBuilder pluggableButtonSpec new
model: self;
verticalResizing: #shrinkWrap;
verticalResizing: #rigid;
action: #openNewLocalBoard;
label: 'New Local';
yourself.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ toolbuilder-manage panel
buildOpenLocalBoardButtonSpecWith: aBuilder withBoardName: aString

^ aBuilder pluggableButtonSpec new
model: self;
model: [self openBoardFromButton: aString];
action: #value;
horizontalResizing: #shrinkWrap;
label: 'Open';
yourself.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ toolbuilder-manage panel
buildRenameLocalBoardButtonSpecWith: aBuilder withBoardName: aString

^ aBuilder pluggableButtonSpec new
model: self;
model: [self renameBoardFromButton: aString];
action: #value;
horizontalResizing: #shrinkWrap;
label: 'Rename';
yourself.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
actions
deleteAllLocal

Transcript showln: 'delete all'.
SPBBoardSaver defaultSaver clear.
self updateUI.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
actions
deleteBoardFromButton: aString

SPBBoardSaver defaultSaver delete: aString.
self updateUI.
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ accessing
lastSidebarPart: anObject

lastSidebarPart := anObject.
self changed: #lastSidebarPart.
self changed: #contentPanelChildren.
self updateUI.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
actions
openBoardFromButton: aString

SPBBoard openFromPrompt: aString.
self updateUI.
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
actions
openNewLocalBoard

Transcript showln: 'dbhajdk'.

| prompt boardName |
prompt := FillInTheBlank request: 'Enter a name for the local board.'.
boardName := SPBBoard localPrefix, prompt.
(SPBBoardSaver defaultSaver contains: boardName)
ifTrue: [UIManager inform: 'A board with this name already exists'. ^self.].
SPBBoard openFromPrompt: boardName.
self updateUI.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
actions
renameBoardFromButton: aString

| prompt boardName |
prompt := FillInTheBlank request: 'Enter a new name for the local board.'.
boardName := SPBBoard localPrefix, prompt.
(SPBBoardSaver defaultSaver contains: boardName)
ifTrue: [UIManager inform: 'A board with this name already exists'. ^ self.].
SPBBoardSaver defaultSaver save: (SPBBoardSaver defaultSaver load: aString) as: boardName.
SPBBoardSaver defaultSaver delete: aString.
self updateUI.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
actions
updateUI

self changed: #lastSidebarPart.
self changed: #contentPanelChildren.
28 changes: 16 additions & 12 deletions Squello-Core.package/SPBLandingPage.class/methodProperties.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,42 +12,46 @@
"instance" : {
"buildAuthButtonSpecWith:" : "FP 6/20/2024 16:42",
"buildContentPanelSpecWith:" : "FP 6/13/2024 13:46",
"buildDeleteAllLocalBoardsButtonSpecWith:" : "FP 6/20/2024 16:42",
"buildDeleteLocalBoardButtonSpecWith:withBoardName:" : "FP 6/20/2024 16:44",
"buildDeleteAllLocalBoardsButtonSpecWith:" : "FP 6/20/2024 18:23",
"buildDeleteLocalBoardButtonSpecWith:withBoardName:" : "FP 6/20/2024 18:12",
"buildLocalBoardCommonActionsSpecWith:" : "FP 6/20/2024 16:44",
"buildLocalBoardNameSpecWith:withBoardName:" : "FP 6/20/2024 16:45",
"buildLocalBoardPanelSpecWith:withName:" : "FP 6/20/2024 16:45",
"buildLocalBoardNameSpecWith:withBoardName:" : "FP 6/20/2024 18:34",
"buildLocalBoardPanelSpecWith:withName:" : "FP 6/20/2024 18:25",
"buildLocalBoardsListChildren" : "FP 6/13/2024 11:43",
"buildLocalBoardsListSpecWith:" : "FP 6/20/2024 16:36",
"buildMainLayoutPanelSpecWith:" : "FP 6/20/2024 16:45",
"buildManageLocalBoardPanelSpecWith:" : "FP 6/20/2024 16:23",
"buildNewLocalBoardButtonSpecWith:" : "FP 6/20/2024 16:46",
"buildManageLocalBoardPanelSpecWith:" : "FP 6/20/2024 18:13",
"buildNewLocalBoardButtonSpecWith:" : "FP 6/20/2024 18:24",
"buildOpenButtonSpecWith:" : "FP 6/20/2024 16:46",
"buildOpenLocalBoardButtonSpecWith:withBoardName:" : "FP 6/20/2024 16:47",
"buildOpenLocalBoardButtonSpecWith:withBoardName:" : "FP 6/20/2024 18:12",
"buildRecentGitHubBoardsButtonSpecWith:withBoardInfo:" : "FP 6/20/2024 16:46",
"buildRecentGitHubBoardsChildren" : "FP 6/13/2024 10:57",
"buildRecentGitHubBoardsSpecWith:" : "FP 6/20/2024 16:47",
"buildRecentLocalBoardsButtonSpecWith:withName:" : "FP 6/20/2024 16:50",
"buildRecentLocalBoardsChildren" : "FP 6/13/2024 10:56",
"buildRecentLocalBoardsSpecWith:" : "FP 6/20/2024 16:47",
"buildRenameLocalBoardButtonSpecWith:withBoardName:" : "FP 6/20/2024 16:47",
"buildRenameLocalBoardButtonSpecWith:withBoardName:" : "FP 6/20/2024 18:12",
"buildSidebarSpecWith:" : "FP 6/10/2024 14:36",
"buildWith:" : "FP 6/20/2024 16:48",
"contentPanelChildren" : "FP 6/11/2024 12:13",
"contentPanels" : "FP 6/13/2024 11:19",
"contentSpecDict" : "FP 6/11/2024 12:29",
"deleteAllLocal" : "FP 6/13/2024 11:35",
"deleteAllLocal" : "FP 6/20/2024 17:20",
"deleteBoardFromButton:" : "FP 6/20/2024 17:19",
"initialize" : "Haru 6/7/2024 11:58",
"lastSidebarPart" : "Haru 6/7/2024 11:57",
"lastSidebarPart:" : "FP 6/11/2024 12:05",
"lastSidebarPart:" : "FP 6/20/2024 17:18",
"list" : "FP 6/11/2024 12:23",
"loginLogoutPanel" : "FP 6/13/2024 11:03",
"manageLocalBoardsPanel" : "FP 6/13/2024 14:00",
"manageLocalBoardsPanel" : "FP 6/20/2024 18:24",
"open" : "Haru 6/1/2024 12:22",
"openAuthPanel" : "FP 6/13/2024 11:02",
"openBoard" : "FP 6/13/2024 11:06",
"openBoardFromButton:" : "FP 6/20/2024 17:19",
"openBoardPanel" : "FP 6/13/2024 11:07",
"openNewLocalBoard" : "FP 6/13/2024 11:34",
"openNewLocalBoard" : "FP 6/20/2024 17:28",
"recentBoardsPanel" : "FP 6/11/2024 12:24",
"renameBoardFromButton:" : "FP 6/20/2024 17:48",
"updateUI" : "FP 6/20/2024 17:18",
"usedBuilder" : "Haru 6/1/2024 12:39",
"usedBuilder:" : "Haru 6/1/2024 12:40" } }
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
tests
testContains

self assert: (saver contains: self defaultKey) not.
saver save: self defaultValue as: self defaultKey.
self assert: (saver contains: self defaultKey).
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"setUp" : "FP 6/3/2024 11:18",
"tearDown" : "FP 6/3/2024 11:18",
"testClear" : "FP 6/3/2024 11:21",
"testContains" : "FP 6/20/2024 17:13",
"testDeleteReturnsNil" : "FP 6/3/2024 11:20",
"testLoadCreatesCopy" : "FP 6/3/2024 11:19",
"testLoadIsCopyOfSave" : "FP 6/3/2024 11:19",
Expand Down

0 comments on commit 47bbb8d

Please sign in to comment.