From da83e3c4e377601eab59140cc7e4d89aa3523763 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Prei=C3=9Fner?= Date: Sat, 22 Jun 2024 11:30:07 +0200 Subject: [PATCH] merge FeatureLandingPage into master --- .../SPBBoardSaver.class/instance/contains..st | 4 ++ .../SPBBoardSaver.class/methodProperties.json | 1 + .../instance/buildAuthButtonSpecWith..st | 4 +- ...uildDeleteAllLocalBoardsButtonSpecWith..st | 6 +-- ...LocalBoardButtonSpecWith.withBoardName..st | 9 ++-- .../buildLocalBoardCommonActionChildren.st | 4 -- .../buildLocalBoardCommonActionsSpecWith..st | 5 +- ...ldLocalBoardNameSpecWith.withBoardName..st | 8 +-- .../buildLocalBoardPanelSpecWith.withName..st | 10 ++-- .../instance/buildLocalBoardsListSpecWith..st | 4 +- .../instance/buildMainLayoutPanelSpecWith..st | 7 ++- .../buildManageLocalBoardPanelSpecWith..st | 15 +++--- .../buildNewLocalBoardButtonSpecWith..st | 7 ++- .../instance/buildOpenButtonSpecWith..st | 4 +- ...LocalBoardButtonSpecWith.withBoardName..st | 9 ++-- ...tHubBoardsButtonSpecWith.withBoardInfo..st | 5 +- .../buildRecentGitHubBoardsSpecWith..st | 5 +- ...centLocalBoardsButtonSpecWith.withName..st | 5 +- .../buildRecentLocalBoardsSpecWith..st | 5 +- ...LocalBoardButtonSpecWith.withBoardName..st | 9 ++-- .../instance/buildWith..st | 4 +- .../instance/deleteAllLocal.st | 3 +- .../instance/deleteBoardFromButton..st | 5 ++ .../instance/lastSidebarPart..st | 3 +- .../instance/openBoardFromButton..st | 5 ++ .../instance/openNewLocalBoard.st | 10 +++- .../instance/renameBoardFromButton..st | 11 +++++ .../SPBLandingPage.class/instance/updateUI.st | 5 ++ .../methodProperties.json | 49 ++++++++++--------- .../instance/testContains.st | 6 +++ .../methodProperties.json | 1 + 31 files changed, 137 insertions(+), 91 deletions(-) create mode 100644 Squello-Core.package/SPBBoardSaver.class/instance/contains..st delete mode 100644 Squello-Core.package/SPBLandingPage.class/instance/buildLocalBoardCommonActionChildren.st create mode 100644 Squello-Core.package/SPBLandingPage.class/instance/deleteBoardFromButton..st create mode 100644 Squello-Core.package/SPBLandingPage.class/instance/openBoardFromButton..st create mode 100644 Squello-Core.package/SPBLandingPage.class/instance/renameBoardFromButton..st create mode 100644 Squello-Core.package/SPBLandingPage.class/instance/updateUI.st create mode 100644 Squello-Tests.package/SPBLocalSaveTests.class/instance/testContains.st diff --git a/Squello-Core.package/SPBBoardSaver.class/instance/contains..st b/Squello-Core.package/SPBBoardSaver.class/instance/contains..st new file mode 100644 index 00000000..134935dd --- /dev/null +++ b/Squello-Core.package/SPBBoardSaver.class/instance/contains..st @@ -0,0 +1,4 @@ +save/load +contains: anObject + + ^ self boards includesKey: anObject. \ No newline at end of file diff --git a/Squello-Core.package/SPBBoardSaver.class/methodProperties.json b/Squello-Core.package/SPBBoardSaver.class/methodProperties.json index 514cb03d..b7764380 100644 --- a/Squello-Core.package/SPBBoardSaver.class/methodProperties.json +++ b/Squello-Core.package/SPBBoardSaver.class/methodProperties.json @@ -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", diff --git a/Squello-Core.package/SPBLandingPage.class/instance/buildAuthButtonSpecWith..st b/Squello-Core.package/SPBLandingPage.class/instance/buildAuthButtonSpecWith..st index 1229c619..bdd4d690 100644 --- a/Squello-Core.package/SPBLandingPage.class/instance/buildAuthButtonSpecWith..st +++ b/Squello-Core.package/SPBLandingPage.class/instance/buildAuthButtonSpecWith..st @@ -1,8 +1,8 @@ toolbuilder buildAuthButtonSpecWith: aBuilder - ^ aBuilder build: (aBuilder pluggableButtonSpec new + ^ aBuilder pluggableButtonSpec new model: self; action: #openAuthPanel; label: 'Open Auth Panel'; - yourself). \ No newline at end of file + yourself. \ No newline at end of file diff --git a/Squello-Core.package/SPBLandingPage.class/instance/buildDeleteAllLocalBoardsButtonSpecWith..st b/Squello-Core.package/SPBLandingPage.class/instance/buildDeleteAllLocalBoardsButtonSpecWith..st index 2ee392fe..96ef99ed 100644 --- a/Squello-Core.package/SPBLandingPage.class/instance/buildDeleteAllLocalBoardsButtonSpecWith..st +++ b/Squello-Core.package/SPBLandingPage.class/instance/buildDeleteAllLocalBoardsButtonSpecWith..st @@ -1,9 +1,9 @@ toolbuilder-manage panel buildDeleteAllLocalBoardsButtonSpecWith: aBuilder - ^ aBuilder build: (aBuilder pluggableButtonSpec new + ^ aBuilder pluggableButtonSpec new model: self; + verticalResizing: #rigid; action: #deleteAllLocal; label: 'Delete All'; - yourself). - + yourself. \ No newline at end of file diff --git a/Squello-Core.package/SPBLandingPage.class/instance/buildDeleteLocalBoardButtonSpecWith.withBoardName..st b/Squello-Core.package/SPBLandingPage.class/instance/buildDeleteLocalBoardButtonSpecWith.withBoardName..st index 7c196c5a..9807d4cf 100644 --- a/Squello-Core.package/SPBLandingPage.class/instance/buildDeleteLocalBoardButtonSpecWith.withBoardName..st +++ b/Squello-Core.package/SPBLandingPage.class/instance/buildDeleteLocalBoardButtonSpecWith.withBoardName..st @@ -1,8 +1,9 @@ toolbuilder-manage panel buildDeleteLocalBoardButtonSpecWith: aBuilder withBoardName: aString - ^ "aBuilder build:" (aBuilder pluggableButtonSpec new - model: self; + ^ aBuilder pluggableButtonSpec new + model: [self deleteBoardFromButton: aString]; + action: #value; + horizontalResizing: #shrinkWrap; label: 'Delete'; - yourself). - \ No newline at end of file + yourself. \ No newline at end of file diff --git a/Squello-Core.package/SPBLandingPage.class/instance/buildLocalBoardCommonActionChildren.st b/Squello-Core.package/SPBLandingPage.class/instance/buildLocalBoardCommonActionChildren.st deleted file mode 100644 index 880906c0..00000000 --- a/Squello-Core.package/SPBLandingPage.class/instance/buildLocalBoardCommonActionChildren.st +++ /dev/null @@ -1,4 +0,0 @@ -toolbuilder-manage panel -buildLocalBoardCommonActionChildren - - ^ {self buildDeleteAllLocalBoardsButtonSpecWith: self usedBuilder. self buildNewLocalBoardButtonSpecWith: self usedBuilder} asOrderedCollection. \ No newline at end of file diff --git a/Squello-Core.package/SPBLandingPage.class/instance/buildLocalBoardCommonActionsSpecWith..st b/Squello-Core.package/SPBLandingPage.class/instance/buildLocalBoardCommonActionsSpecWith..st index ac11bcaa..2879c406 100644 --- a/Squello-Core.package/SPBLandingPage.class/instance/buildLocalBoardCommonActionsSpecWith..st +++ b/Squello-Core.package/SPBLandingPage.class/instance/buildLocalBoardCommonActionsSpecWith..st @@ -3,7 +3,10 @@ buildLocalBoardCommonActionsSpecWith: aBuilder ^ aBuilder pluggablePanelSpec new model: self; - children: #buildLocalBoardCommonActionChildren; + children: { + self buildDeleteAllLocalBoardsButtonSpecWith: self usedBuilder. + self buildNewLocalBoardButtonSpecWith: self usedBuilder + }; layout: #horizontal; verticalResizing: #shrinkWrap; yourself. diff --git a/Squello-Core.package/SPBLandingPage.class/instance/buildLocalBoardNameSpecWith.withBoardName..st b/Squello-Core.package/SPBLandingPage.class/instance/buildLocalBoardNameSpecWith.withBoardName..st index 15b86a58..6db21c77 100644 --- a/Squello-Core.package/SPBLandingPage.class/instance/buildLocalBoardNameSpecWith.withBoardName..st +++ b/Squello-Core.package/SPBLandingPage.class/instance/buildLocalBoardNameSpecWith.withBoardName..st @@ -1,8 +1,8 @@ toolbuilder-manage panel buildLocalBoardNameSpecWith: aBuilder withBoardName: aString - ^ "aBuilder build:" (aBuilder pluggableTextSpec new + ^ aBuilder pluggableButtonSpec new model: self; - setText: aString; - yourself). - \ No newline at end of file + label: (aString copyFrom: SPBBoard localPrefix size + 1 to: aString size); + horizontalResizing: #shrinkWrap; + yourself. \ No newline at end of file diff --git a/Squello-Core.package/SPBLandingPage.class/instance/buildLocalBoardPanelSpecWith.withName..st b/Squello-Core.package/SPBLandingPage.class/instance/buildLocalBoardPanelSpecWith.withName..st index 55b7d768..936123c5 100644 --- a/Squello-Core.package/SPBLandingPage.class/instance/buildLocalBoardPanelSpecWith.withName..st +++ b/Squello-Core.package/SPBLandingPage.class/instance/buildLocalBoardPanelSpecWith.withName..st @@ -1,15 +1,15 @@ toolbuilder-manage panel buildLocalBoardPanelSpecWith: aBuilder withName: aName - ^ "aBuilder build:" (aBuilder pluggablePanelSpec new + ^ aBuilder pluggablePanelSpec new model: self; layout: #horizontal; - minimumHeight: 50px; + 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). - \ No newline at end of file + yourself. \ No newline at end of file diff --git a/Squello-Core.package/SPBLandingPage.class/instance/buildLocalBoardsListSpecWith..st b/Squello-Core.package/SPBLandingPage.class/instance/buildLocalBoardsListSpecWith..st index e832c176..894d1ad8 100644 --- a/Squello-Core.package/SPBLandingPage.class/instance/buildLocalBoardsListSpecWith..st +++ b/Squello-Core.package/SPBLandingPage.class/instance/buildLocalBoardsListSpecWith..st @@ -4,7 +4,7 @@ buildLocalBoardsListSpecWith: aBuilder ^ aBuilder pluggableScrollPaneSpec new model: self; vScrollBarPolicy: #always; - children: "#buildLocalBoardsListChildren;"(self buildLocalBoardsListChildren); - layout: #horizontal; + children: self buildLocalBoardsListChildren; + layout: #vertical; yourself. \ No newline at end of file diff --git a/Squello-Core.package/SPBLandingPage.class/instance/buildMainLayoutPanelSpecWith..st b/Squello-Core.package/SPBLandingPage.class/instance/buildMainLayoutPanelSpecWith..st index 5af82be2..9bf98802 100644 --- a/Squello-Core.package/SPBLandingPage.class/instance/buildMainLayoutPanelSpecWith..st +++ b/Squello-Core.package/SPBLandingPage.class/instance/buildMainLayoutPanelSpecWith..st @@ -4,10 +4,9 @@ buildMainLayoutPanelSpecWith: aBuilder ^ aBuilder pluggablePanelSpec new model: self; frame: (0@0 corner: 1@1); - children: - {self buildSidebarSpecWith: aBuilder. + children: { + self buildSidebarSpecWith: aBuilder. self buildContentPanelSpecWith: aBuilder. }; layout: #horizontal; - yourself. - \ No newline at end of file + yourself. \ No newline at end of file diff --git a/Squello-Core.package/SPBLandingPage.class/instance/buildManageLocalBoardPanelSpecWith..st b/Squello-Core.package/SPBLandingPage.class/instance/buildManageLocalBoardPanelSpecWith..st index 57b4d8e0..08f6991c 100644 --- a/Squello-Core.package/SPBLandingPage.class/instance/buildManageLocalBoardPanelSpecWith..st +++ b/Squello-Core.package/SPBLandingPage.class/instance/buildManageLocalBoardPanelSpecWith..st @@ -1,8 +1,11 @@ toolbuilder-manage panel buildManageLocalBoardPanelSpecWith: aBuilder -"We just reuse this from the SquotBrowser, idk if this is good" - - ^ SquotGUIUtilities buildVerticalLayout: { - self buildLocalBoardsListSpecWith: aBuilder. - self buildLocalBoardCommonActionsSpecWith: aBuilder. - } with: aBuilder \ No newline at end of file + + ^ aBuilder pluggablePanelSpec new + model: self; + layout: #vertical; + children: { + self buildLocalBoardsListSpecWith: aBuilder. + self buildLocalBoardCommonActionsSpecWith: aBuilder. + }; + yourself. \ No newline at end of file diff --git a/Squello-Core.package/SPBLandingPage.class/instance/buildNewLocalBoardButtonSpecWith..st b/Squello-Core.package/SPBLandingPage.class/instance/buildNewLocalBoardButtonSpecWith..st index d9f05e61..a6533783 100644 --- a/Squello-Core.package/SPBLandingPage.class/instance/buildNewLocalBoardButtonSpecWith..st +++ b/Squello-Core.package/SPBLandingPage.class/instance/buildNewLocalBoardButtonSpecWith..st @@ -1,10 +1,9 @@ toolbuilder-manage panel buildNewLocalBoardButtonSpecWith: aBuilder - ^ aBuilder build: (aBuilder pluggableButtonSpec new + ^ aBuilder pluggableButtonSpec new model: self; - verticalResizing: #shrinkWrap; + verticalResizing: #rigid; action: #openNewLocalBoard; label: 'New Local'; - yourself). - + yourself. \ No newline at end of file diff --git a/Squello-Core.package/SPBLandingPage.class/instance/buildOpenButtonSpecWith..st b/Squello-Core.package/SPBLandingPage.class/instance/buildOpenButtonSpecWith..st index 34155e26..f645a5a6 100644 --- a/Squello-Core.package/SPBLandingPage.class/instance/buildOpenButtonSpecWith..st +++ b/Squello-Core.package/SPBLandingPage.class/instance/buildOpenButtonSpecWith..st @@ -1,8 +1,8 @@ toolbuilder buildOpenButtonSpecWith: aBuilder - ^ aBuilder build: (aBuilder pluggableButtonSpec new + ^ aBuilder pluggableButtonSpec new model: self; action: #openBoard; label: 'Open Board'; - yourself). \ No newline at end of file + yourself. \ No newline at end of file diff --git a/Squello-Core.package/SPBLandingPage.class/instance/buildOpenLocalBoardButtonSpecWith.withBoardName..st b/Squello-Core.package/SPBLandingPage.class/instance/buildOpenLocalBoardButtonSpecWith.withBoardName..st index ff21be1a..99ea898b 100644 --- a/Squello-Core.package/SPBLandingPage.class/instance/buildOpenLocalBoardButtonSpecWith.withBoardName..st +++ b/Squello-Core.package/SPBLandingPage.class/instance/buildOpenLocalBoardButtonSpecWith.withBoardName..st @@ -1,8 +1,9 @@ toolbuilder-manage panel buildOpenLocalBoardButtonSpecWith: aBuilder withBoardName: aString - ^ "aBuilder build:" (aBuilder pluggableButtonSpec new - model: self; + ^ aBuilder pluggableButtonSpec new + model: [self openBoardFromButton: aString]; + action: #value; + horizontalResizing: #shrinkWrap; label: 'Open'; - yourself). - \ No newline at end of file + yourself. \ No newline at end of file diff --git a/Squello-Core.package/SPBLandingPage.class/instance/buildRecentGitHubBoardsButtonSpecWith.withBoardInfo..st b/Squello-Core.package/SPBLandingPage.class/instance/buildRecentGitHubBoardsButtonSpecWith.withBoardInfo..st index 2bd31127..8997ebcb 100644 --- a/Squello-Core.package/SPBLandingPage.class/instance/buildRecentGitHubBoardsButtonSpecWith.withBoardInfo..st +++ b/Squello-Core.package/SPBLandingPage.class/instance/buildRecentGitHubBoardsButtonSpecWith.withBoardInfo..st @@ -3,9 +3,8 @@ buildRecentGitHubBoardsButtonSpecWith: aBuilder withBoardInfo: aDictionary | name | name := (aDictionary at: #repo), ' : ' ,( aDictionary at: #name). - ^ aBuilder build: (aBuilder pluggableButtonSpec new + ^ aBuilder pluggableButtonSpec new model: [SPBBoard openFromPrompt: (aDictionary at: #url)]; label: name; action: #value; - yourself). - \ No newline at end of file + yourself. \ No newline at end of file diff --git a/Squello-Core.package/SPBLandingPage.class/instance/buildRecentGitHubBoardsSpecWith..st b/Squello-Core.package/SPBLandingPage.class/instance/buildRecentGitHubBoardsSpecWith..st index eb3d66bf..dc113b00 100644 --- a/Squello-Core.package/SPBLandingPage.class/instance/buildRecentGitHubBoardsSpecWith..st +++ b/Squello-Core.package/SPBLandingPage.class/instance/buildRecentGitHubBoardsSpecWith..st @@ -4,7 +4,6 @@ buildRecentGitHubBoardsSpecWith: aBuilder ^ aBuilder pluggablePanelSpec new name: #RecentGitHubBoards; model: self; - children: #buildRecentGitHubBoardsChildren; + children: self buildRecentGitHubBoardsChildren; layout: #horizontal; - yourself. - \ No newline at end of file + yourself. \ No newline at end of file diff --git a/Squello-Core.package/SPBLandingPage.class/instance/buildRecentLocalBoardsButtonSpecWith.withName..st b/Squello-Core.package/SPBLandingPage.class/instance/buildRecentLocalBoardsButtonSpecWith.withName..st index 10f31198..2b6fdb14 100644 --- a/Squello-Core.package/SPBLandingPage.class/instance/buildRecentLocalBoardsButtonSpecWith.withName..st +++ b/Squello-Core.package/SPBLandingPage.class/instance/buildRecentLocalBoardsButtonSpecWith.withName..st @@ -1,9 +1,8 @@ toolbuilder-recent boards buildRecentLocalBoardsButtonSpecWith: aBuilder withName: aName - ^ aBuilder build: (aBuilder pluggableButtonSpec new + ^ aBuilder pluggableButtonSpec new model: [SPBBoard openFromPrompt: aName]; action: #value; label: aName; - yourself). - + yourself. \ No newline at end of file diff --git a/Squello-Core.package/SPBLandingPage.class/instance/buildRecentLocalBoardsSpecWith..st b/Squello-Core.package/SPBLandingPage.class/instance/buildRecentLocalBoardsSpecWith..st index 5036d596..b799cfc7 100644 --- a/Squello-Core.package/SPBLandingPage.class/instance/buildRecentLocalBoardsSpecWith..st +++ b/Squello-Core.package/SPBLandingPage.class/instance/buildRecentLocalBoardsSpecWith..st @@ -4,7 +4,6 @@ buildRecentLocalBoardsSpecWith: aBuilder ^ aBuilder pluggablePanelSpec new name: #RecentLocalBoards; model: self; - children: #buildRecentLocalBoardsChildren; + children: self buildRecentLocalBoardsChildren; layout: #horizontal; - yourself. - \ No newline at end of file + yourself. \ No newline at end of file diff --git a/Squello-Core.package/SPBLandingPage.class/instance/buildRenameLocalBoardButtonSpecWith.withBoardName..st b/Squello-Core.package/SPBLandingPage.class/instance/buildRenameLocalBoardButtonSpecWith.withBoardName..st index 94af8e6d..f277683e 100644 --- a/Squello-Core.package/SPBLandingPage.class/instance/buildRenameLocalBoardButtonSpecWith.withBoardName..st +++ b/Squello-Core.package/SPBLandingPage.class/instance/buildRenameLocalBoardButtonSpecWith.withBoardName..st @@ -1,8 +1,9 @@ toolbuilder-manage panel buildRenameLocalBoardButtonSpecWith: aBuilder withBoardName: aString - ^ "aBuilder build:" (aBuilder pluggableButtonSpec new - model: self; + ^ aBuilder pluggableButtonSpec new + model: [self renameBoardFromButton: aString]; + action: #value; + horizontalResizing: #shrinkWrap; label: 'Rename'; - yourself). - \ No newline at end of file + yourself. \ No newline at end of file diff --git a/Squello-Core.package/SPBLandingPage.class/instance/buildWith..st b/Squello-Core.package/SPBLandingPage.class/instance/buildWith..st index a21aad4d..035666c5 100644 --- a/Squello-Core.package/SPBLandingPage.class/instance/buildWith..st +++ b/Squello-Core.package/SPBLandingPage.class/instance/buildWith..st @@ -7,8 +7,8 @@ buildWith: aBuilder model: self; label: 'Squello Hub'; minimumExtent: 500px @200px; - children: - {self buildMainLayoutPanelSpecWith: aBuilder. + children: { + self buildMainLayoutPanelSpecWith: aBuilder. }; yourself. ^ aBuilder build: spec. diff --git a/Squello-Core.package/SPBLandingPage.class/instance/deleteAllLocal.st b/Squello-Core.package/SPBLandingPage.class/instance/deleteAllLocal.st index 1f38ba93..9226c9b8 100644 --- a/Squello-Core.package/SPBLandingPage.class/instance/deleteAllLocal.st +++ b/Squello-Core.package/SPBLandingPage.class/instance/deleteAllLocal.st @@ -1,4 +1,5 @@ actions deleteAllLocal - Transcript showln: 'delete all'. \ No newline at end of file + SPBBoardSaver defaultSaver clear. + self updateUI. \ No newline at end of file diff --git a/Squello-Core.package/SPBLandingPage.class/instance/deleteBoardFromButton..st b/Squello-Core.package/SPBLandingPage.class/instance/deleteBoardFromButton..st new file mode 100644 index 00000000..a00a8d09 --- /dev/null +++ b/Squello-Core.package/SPBLandingPage.class/instance/deleteBoardFromButton..st @@ -0,0 +1,5 @@ +actions +deleteBoardFromButton: aString + + SPBBoardSaver defaultSaver delete: aString. + self updateUI. \ No newline at end of file diff --git a/Squello-Core.package/SPBLandingPage.class/instance/lastSidebarPart..st b/Squello-Core.package/SPBLandingPage.class/instance/lastSidebarPart..st index 31554564..8545615c 100644 --- a/Squello-Core.package/SPBLandingPage.class/instance/lastSidebarPart..st +++ b/Squello-Core.package/SPBLandingPage.class/instance/lastSidebarPart..st @@ -2,5 +2,4 @@ accessing lastSidebarPart: anObject lastSidebarPart := anObject. - self changed: #lastSidebarPart. - self changed: #contentPanelChildren. \ No newline at end of file + self updateUI. \ No newline at end of file diff --git a/Squello-Core.package/SPBLandingPage.class/instance/openBoardFromButton..st b/Squello-Core.package/SPBLandingPage.class/instance/openBoardFromButton..st new file mode 100644 index 00000000..0e57fe1a --- /dev/null +++ b/Squello-Core.package/SPBLandingPage.class/instance/openBoardFromButton..st @@ -0,0 +1,5 @@ +actions +openBoardFromButton: aString + + SPBBoard openFromPrompt: aString. + self updateUI. \ No newline at end of file diff --git a/Squello-Core.package/SPBLandingPage.class/instance/openNewLocalBoard.st b/Squello-Core.package/SPBLandingPage.class/instance/openNewLocalBoard.st index 1aaa1ca9..8724015e 100644 --- a/Squello-Core.package/SPBLandingPage.class/instance/openNewLocalBoard.st +++ b/Squello-Core.package/SPBLandingPage.class/instance/openNewLocalBoard.st @@ -1,4 +1,10 @@ actions openNewLocalBoard - - Transcript showln: 'dbhajdk'. \ No newline at end of file + + | 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. \ No newline at end of file diff --git a/Squello-Core.package/SPBLandingPage.class/instance/renameBoardFromButton..st b/Squello-Core.package/SPBLandingPage.class/instance/renameBoardFromButton..st new file mode 100644 index 00000000..9a138248 --- /dev/null +++ b/Squello-Core.package/SPBLandingPage.class/instance/renameBoardFromButton..st @@ -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. \ No newline at end of file diff --git a/Squello-Core.package/SPBLandingPage.class/instance/updateUI.st b/Squello-Core.package/SPBLandingPage.class/instance/updateUI.st new file mode 100644 index 00000000..0f24ae68 --- /dev/null +++ b/Squello-Core.package/SPBLandingPage.class/instance/updateUI.st @@ -0,0 +1,5 @@ +actions +updateUI + + self changed: #lastSidebarPart. + self changed: #contentPanelChildren. \ No newline at end of file diff --git a/Squello-Core.package/SPBLandingPage.class/methodProperties.json b/Squello-Core.package/SPBLandingPage.class/methodProperties.json index 4ffa287e..9e6cb1d8 100644 --- a/Squello-Core.package/SPBLandingPage.class/methodProperties.json +++ b/Squello-Core.package/SPBLandingPage.class/methodProperties.json @@ -10,45 +10,48 @@ "numberOfRecentLocalBoards" : "Haru 6/8/2024 12:37", "open" : "Haru 6/1/2024 12:28" }, "instance" : { - "buildAuthButtonSpecWith:" : "FP 6/13/2024 11:03", + "buildAuthButtonSpecWith:" : "FP 6/20/2024 16:42", "buildContentPanelSpecWith:" : "FP 6/13/2024 13:46", - "buildDeleteAllLocalBoardsButtonSpecWith:" : "FP 6/13/2024 13:49", - "buildDeleteLocalBoardButtonSpecWith:withBoardName:" : "FP 6/13/2024 14:33", - "buildLocalBoardCommonActionChildren" : "FP 6/13/2024 11:37", - "buildLocalBoardCommonActionsSpecWith:" : "FP 6/13/2024 13:45", - "buildLocalBoardNameSpecWith:withBoardName:" : "FP 6/13/2024 14:32", - "buildLocalBoardPanelSpecWith:withName:" : "FP 6/13/2024 14:28", + "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 18:34", + "buildLocalBoardPanelSpecWith:withName:" : "FP 6/20/2024 18:25", "buildLocalBoardsListChildren" : "FP 6/13/2024 11:43", - "buildLocalBoardsListSpecWith:" : "FP 6/13/2024 14:41", - "buildMainLayoutPanelSpecWith:" : "FP 6/13/2024 13:43", - "buildManageLocalBoardPanelSpecWith:" : "FP 6/13/2024 14:21", - "buildNewLocalBoardButtonSpecWith:" : "FP 6/13/2024 12:12", - "buildOpenButtonSpecWith:" : "FP 6/13/2024 11:06", - "buildOpenLocalBoardButtonSpecWith:withBoardName:" : "FP 6/13/2024 14:33", - "buildRecentGitHubBoardsButtonSpecWith:withBoardInfo:" : "FP 6/10/2024 16:27", + "buildLocalBoardsListSpecWith:" : "FP 6/20/2024 16:36", + "buildMainLayoutPanelSpecWith:" : "FP 6/20/2024 16:45", + "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 18:12", + "buildRecentGitHubBoardsButtonSpecWith:withBoardInfo:" : "FP 6/20/2024 16:46", "buildRecentGitHubBoardsChildren" : "FP 6/13/2024 10:57", - "buildRecentGitHubBoardsSpecWith:" : "FP 6/10/2024 15:55", - "buildRecentLocalBoardsButtonSpecWith:withName:" : "FP 6/13/2024 10:56", + "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/10/2024 14:20", - "buildRenameLocalBoardButtonSpecWith:withBoardName:" : "FP 6/13/2024 14:33", + "buildRecentLocalBoardsSpecWith:" : "FP 6/20/2024 16:47", + "buildRenameLocalBoardButtonSpecWith:withBoardName:" : "FP 6/20/2024 18:12", "buildSidebarSpecWith:" : "FP 6/10/2024 14:36", - "buildWith:" : "FP 6/11/2024 13:43", + "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" } } diff --git a/Squello-Tests.package/SPBLocalSaveTests.class/instance/testContains.st b/Squello-Tests.package/SPBLocalSaveTests.class/instance/testContains.st new file mode 100644 index 00000000..88a3612c --- /dev/null +++ b/Squello-Tests.package/SPBLocalSaveTests.class/instance/testContains.st @@ -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). \ No newline at end of file diff --git a/Squello-Tests.package/SPBLocalSaveTests.class/methodProperties.json b/Squello-Tests.package/SPBLocalSaveTests.class/methodProperties.json index d88e559e..7093f4a6 100644 --- a/Squello-Tests.package/SPBLocalSaveTests.class/methodProperties.json +++ b/Squello-Tests.package/SPBLocalSaveTests.class/methodProperties.json @@ -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",