Skip to content

Commit

Permalink
extract class: sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Cram committed Aug 1, 2022
1 parent 3074192 commit e6765bc
Show file tree
Hide file tree
Showing 140 changed files with 453 additions and 380 deletions.
2 changes: 1 addition & 1 deletion Squello-Core.package/SPBBoard.class/instance/addColumn.st
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ addColumn
boardProvider: self boardProvider;
changeProvider: self changeProvider.
self columns add: column.
self updateColumnsWithCards.
self updateColumns.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ buildAndOpen

| window |
self createColumns.

self createSidebar.
window := self buildWith: SPBMorphicToolBuilder new.
window openInWorld.
^ window.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ toolbuilder
buildSidebarAssigneeListSpecWith: aBuilder

^ aBuilder pluggableListSpec new
model: self;
model: self sidebar;
name: #sidebarAssigneeList;
frame: (0@0 corner: 0.5@1);
list: #activeCardAssigneeList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ toolbuilder
buildSidebarAssigneePanelSpecWith: aBuilder

^ aBuilder pluggablePanelSpec new
model: self;
model: self sidebar;
name: #sidebarAssigneeList;
frame: (0@0.1 corner: 1@0.25);
minimumHeight: 20;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ toolbuilder
buildSidebarDescriptionSpecWith: aBuilder

^ aBuilder pluggableTextSpec new
model: self;
model: self sidebar;
name: #sidebarDescription;
setText: #updateActiveCardDescription:;
getText: #activeCardDescription;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ toolbuilder
buildSidebarLabelListSpecWith: aBuilder

^ aBuilder pluggableListSpec new
model: self;
model: self sidebar;
name: #sidebarLabelList;
frame: (0@0 corner: 0.5@1);
list: #activeCardLabelList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ toolbuilder
buildSidebarLabelPanelSpecWith: aBuilder

^ aBuilder pluggablePanelSpec new
model: self;
model: self sidebar;
name: #sidebarLabelList;
frame: (0@0.25 corner: 1@0.4);
minimumHeight: 20;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ toolbuilder
buildSidebarPotentialAssigneeListSpecWith: aBuilder

^ aBuilder pluggableListSpec new
model: self;
model: self sidebar;
name: #sidebarPotentialAssigneeList;
frame: (0.5@0 corner: 1@1);
list: #potentialAssigneesList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ toolbuilder
buildSidebarPotentialLabelListSpecWith: aBuilder

^ aBuilder pluggableListSpec new
model: self;
model: self sidebar;
name: #sidebarPotentialLabelList;
frame: (0.5@0 corner: 1@1);
list: #potentialLabelsList;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
toolbuilder
buildSidebarSpecWith: aBuilder

^ self buildSidebarSpecWith: aBuilder witdh: 0.75.
^ self buildSidebarSpecWith: aBuilder width: 0.75.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
toolbuilder
buildSidebarSpecWith: aBuilder witdh: aNumber
buildSidebarSpecWith: aBuilder width: aNumber

^ aBuilder pluggablePanelSpec new
name: #sidebar;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ toolbuilder
buildSidebarTitleSpecWith: aBuilder

^ aBuilder pluggableTextSpec new
model: self;
model: self sidebar;
name: #sidebarTitle;
setText: #updateActiveCardTitle:;
getText: #activeCardTitle;
Expand Down
2 changes: 1 addition & 1 deletion Squello-Core.package/SPBBoard.class/instance/buildWith..st
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ buildWith: aBuilder

self window: (aBuilder build: spec).

self updateColumns.
self setupColumns.

^ self window.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
update sidebar
changeActiveCardTo: anSPBCard

self activeCard: anSPBCard.
self sidebar activeCard: anSPBCard.
(self usedBuilder widgetAt: #sidebarTitle) setText: anSPBCard title asText.
(self usedBuilder widgetAt: #sidebarDescription) setText: anSPBCard description asText.
(self usedBuilder widgetAt: #sidebarAssigneeList) updateList.
Expand Down
7 changes: 7 additions & 0 deletions Squello-Core.package/SPBBoard.class/instance/createSidebar.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
toolbuilder
createSidebar

self sidebar:
(SPBSidebar new
board: self;
boardProvider: self boardProvider).

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
drag and drop
update window
rerenderColumns

self columns
Expand Down
12 changes: 12 additions & 0 deletions Squello-Core.package/SPBBoard.class/instance/setupColumns.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
update window
setupColumns

self columns
do: [:column | column pasteup: (self usedBuilder widgetAt: column id).
column
initializeIndicator;
fetchCards;
buildCards;
board: self;
resizeToFitCards;
initializeBottomDetection].
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
drag and drop
update window
showColumns

self columns
Expand Down
4 changes: 4 additions & 0 deletions Squello-Core.package/SPBBoard.class/instance/sidebar..st
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
sidebar: anSPBSidebar

sidebar := anSPBSidebar.
4 changes: 4 additions & 0 deletions Squello-Core.package/SPBBoard.class/instance/sidebar.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
sidebar

^ sidebar.
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ update: aSymbol with: aDictionary
boardProvider: self boardProvider;
changeProvider: self changeProvider.
self columns add: column.
self updateColumnsWithCards].
self updateColumns].
15 changes: 5 additions & 10 deletions Squello-Core.package/SPBBoard.class/instance/updateColumns.st
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
accessing
update window
updateColumns

self columns
do: [:column | column pasteup: (self usedBuilder widgetAt: column id).
column
initializeIndicator;
fetchCards;
buildCards;
board: self;
resizeToFitCards;
initializeBottomDetection].
self
changed: #buildColumnAreaChildren;
rerenderColumns;
resizeColumnArea.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ updateColumnsAndSidebar

oldSidebar := self usedBuilder widgetAt: #sidebar.
oldSidebar abandon.
newSidebar := (self usedBuilder build: (self buildSidebarSpecWith: self usedBuilder witdh: currentWidth)).
newSidebar := (self usedBuilder build: (self buildSidebarSpecWith: self usedBuilder width: currentWidth)).

self usedBuilder add: newColumnArea to: self window.
self usedBuilder add: newSidebar to: self window.

This file was deleted.

77 changes: 21 additions & 56 deletions Squello-Core.package/SPBBoard.class/methodProperties.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,12 @@
"open" : "NTK 6/1/2022 16:41",
"registerInAppsMenu" : "lo 6/4/2022 23:19" },
"instance" : {
"activeCard" : "lo 7/31/2022 16:08",
"activeCard:" : "lo 7/31/2022 16:07",
"activeCardAssigneeList" : "lo 7/31/2022 17:13",
"activeCardAssigneeListHeader" : "lo 7/31/2022 17:18",
"activeCardDescription" : "lo 7/31/2022 16:08",
"activeCardLabelList" : "lo 7/31/2022 17:13",
"activeCardLabelListHeader" : "lo 7/31/2022 17:18",
"activeCardTitle" : "lo 7/31/2022 16:09",
"addColumn" : "jh 7/31/2022 13:51",
"assigneeSelected" : "mcr 5/27/2022 19:11",
"assigneeSelected:" : "lo 7/31/2022 16:32",
"addColumn" : "mcr 8/1/2022 01:27",
"boardProvider" : "jh 7/29/2022 11:34",
"boardProvider:" : "lo 7/31/2022 16:32",
"buildAddColumnButtonPanelSpecWith:" : "tk 7/30/2022 21:38",
"buildAddColumnButtonSpecWith:" : "tk 7/30/2022 21:38",
"buildAndOpen" : "tk 7/30/2022 21:48",
"buildAndOpen" : "mcr 8/1/2022 00:47",
"buildColumnAreaChildren" : "tk 7/30/2022 21:48",
"buildColumnAreaSpecWith:" : "tk 7/30/2022 21:40",
"buildColumnAreaSpecWith:width:" : "tk 7/30/2022 21:40",
Expand All @@ -32,63 +22,38 @@
"buildColumnHeaderTitleSpecWith:and:" : "tk 7/30/2022 21:47",
"buildColumnSpecWith:and:" : "tk 7/30/2022 21:48",
"buildColumnsSpecWith:" : "tk 7/30/2022 21:48",
"buildSidebarAssigneeListSpecWith:" : "LW 7/14/2022 11:39",
"buildSidebarAssigneePanelSpecWith:" : "LW 7/30/2022 15:57",
"buildSidebarDescriptionSpecWith:" : "LW 7/14/2022 11:40",
"buildSidebarLabelListSpecWith:" : "LW 7/14/2022 11:40",
"buildSidebarLabelPanelSpecWith:" : "LW 7/30/2022 15:57",
"buildSidebarPotentialAssigneeListSpecWith:" : "LW 7/14/2022 11:40",
"buildSidebarPotentialLabelListSpecWith:" : "LW 7/14/2022 11:40",
"buildSidebarSpecWith:" : "tk 7/14/2022 16:01",
"buildSidebarSpecWith:witdh:" : "LW 7/30/2022 15:57",
"buildSidebarTitleSpecWith:" : "LW 7/14/2022 11:41",
"buildWith:" : "tk 7/30/2022 21:50",
"changeActiveCardTo:" : "jh 7/29/2022 12:50",
"buildSidebarAssigneeListSpecWith:" : "mcr 8/1/2022 00:49",
"buildSidebarAssigneePanelSpecWith:" : "mcr 8/1/2022 00:49",
"buildSidebarDescriptionSpecWith:" : "mcr 8/1/2022 00:49",
"buildSidebarLabelListSpecWith:" : "mcr 8/1/2022 00:48",
"buildSidebarLabelPanelSpecWith:" : "mcr 8/1/2022 00:48",
"buildSidebarPotentialAssigneeListSpecWith:" : "mcr 8/1/2022 00:48",
"buildSidebarPotentialLabelListSpecWith:" : "mcr 8/1/2022 00:48",
"buildSidebarSpecWith:" : "mcr 8/1/2022 00:48",
"buildSidebarSpecWith:width:" : "mcr 8/1/2022 00:48",
"buildSidebarTitleSpecWith:" : "mcr 8/1/2022 00:47",
"buildWith:" : "mcr 8/1/2022 01:26",
"changeActiveCardTo:" : "mcr 8/1/2022 00:54",
"changeProvider" : "lo 7/8/2022 14:00",
"changeProvider:" : "lo 7/8/2022 15:29",
"columns" : "tk 7/30/2022 21:38",
"columns:" : "tk 7/30/2022 21:38",
"createColumns" : "tk 7/30/2022 22:06",
"dragFromAssignees:" : "mcr 5/27/2022 19:26",
"dragFromLabels:" : "lo 6/5/2022 14:46",
"dragFromPotentialAssignees:" : "mcr 5/27/2022 19:37",
"dragFromPotentialLabels:" : "lo 6/5/2022 15:11",
"dropOnAssignees:at:" : "lo 7/31/2022 16:23",
"dropOnLabels:at:" : "lo 7/31/2022 16:37",
"dropOnPotentialAssignees:at:" : "lo 7/31/2022 16:41",
"dropOnPotentialLabels:at:" : "lo 7/31/2022 16:42",
"createSidebar" : "mcr 8/1/2022 01:20",
"errorCannotAddColumn:" : "jh 7/31/2022 14:28",
"errorInvalidUrl" : "jh 7/31/2022 14:28",
"initialize" : "jh 7/29/2022 11:36",
"labelIcon:" : "NTK 7/30/2022 13:45",
"labelSelected" : "lo 6/5/2022 14:56",
"labelSelected:" : "lo 7/31/2022 16:33",
"loadProject:" : "jh 7/31/2022 14:15",
"potentialAssigneeSelected" : "mcr 5/27/2022 19:11",
"potentialAssigneeSelected:" : "lo 7/31/2022 16:33",
"potentialAssignees" : "jh 7/29/2022 11:36",
"potentialAssignees:" : "mcr 5/27/2022 15:29",
"potentialAssigneesList" : "lo 7/31/2022 17:00",
"potentialAssigneesListHeader" : "lo 7/31/2022 17:18",
"potentialLabelIcon:" : "LW 7/14/2022 10:54",
"potentialLabelSelected" : "mcr 7/3/2022 17:54",
"potentialLabelSelected:" : "lo 7/31/2022 16:34",
"potentialLabels" : "jh 7/29/2022 11:36",
"potentialLabels:" : "tk 7/30/2022 23:02",
"potentialLabelsList" : "lo 7/31/2022 16:58",
"potentialLabelsListHeader" : "lo 7/31/2022 17:17",
"rerenderColumns" : "lo 7/31/2022 16:42",
"resizeColumnArea" : "tk 7/30/2022 22:09",
"setupColumns" : "mcr 8/1/2022 01:26",
"showColumns" : "lo 7/31/2022 16:42",
"update:with:" : "tk 7/30/2022 22:09",
"updateActiveCardDescription:" : "lo 7/31/2022 16:52",
"updateActiveCardTitle:" : "lo 7/31/2022 16:52",
"updateColumns" : "lo 7/31/2022 16:35",
"updateColumnsAndSidebar" : "tk 7/30/2022 21:51",
"updateColumnsWithCards" : "lo 7/31/2022 16:35",
"sidebar" : "mcr 8/1/2022 00:44",
"sidebar:" : "mcr 8/1/2022 00:44",
"update:with:" : "mcr 8/1/2022 01:27",
"updateColumns" : "mcr 8/1/2022 01:27",
"updateColumnsAndSidebar" : "mcr 8/1/2022 00:48",
"usedBuilder" : "lo 5/26/2022 15:02",
"usedBuilder:" : "lo 5/26/2022 15:02",
"wantsAssigneeDrop:" : "mcr 5/27/2022 18:02",
"wantsLabelDrop:" : "tk 7/30/2022 22:37",
"window" : "lo 7/3/2022 14:09",
"window:" : "lo 7/31/2022 16:36" } }
11 changes: 2 additions & 9 deletions Squello-Core.package/SPBBoard.class/properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,13 @@
"LastProject" ],
"commentStamp" : "LW 6/20/2022 09:44",
"instvars" : [
"boardProvider",
"changeProvider",
"activeCard",
"usedBuilder",
"columns",
"boardProvider",
"potentialAssignees",
"potentialLabels",
"assigneeSelected",
"labelSelected",
"potentialAssigneeSelected",
"potentialLabelSelected",
"projects",
"window",
"constructor" ],
"sidebar" ],
"name" : "SPBBoard",
"pools" : [
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ changeIndexOfColumn: aNumber
ifFalse: [columns
removeAt: index;
add: self beforeIndex: aNumber].
self board updateColumnsWithCards.
self board updateColumns.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ update: aSymbol with: aDictionary

((aDictionary at: 'action') = #delete)
ifTrue: [self board columns remove: self.
self board updateColumnsWithCards].
self board updateColumns].

((aDictionary at: 'action') = #edit)
ifTrue: [self title: (aDictionary at: 'title')].
Expand Down
Loading

0 comments on commit e6765bc

Please sign in to comment.