Skip to content

Commit

Permalink
Refactor Lanes to Columns (tests not included)
Browse files Browse the repository at this point in the history
  • Loading branch information
tk committed Jul 30, 2022
1 parent 2f1ab20 commit 2f4556e
Show file tree
Hide file tree
Showing 248 changed files with 674 additions and 682 deletions.
3 changes: 2 additions & 1 deletion Squello-Core.package/SPBBoard.class/class/lastProject..st
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
accessing
lastProject: anObject
LastProject := anObject

LastProject := anObject.
3 changes: 2 additions & 1 deletion Squello-Core.package/SPBBoard.class/class/lastProject.st
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
accessing
lastProject
^ LastProject

^ LastProject.
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
toolbuilder
addLane
addColumn

| lane prompt |
| column prompt |
prompt := FillInTheBlankMorph request: 'Enter a lane name' initialAnswer:''.
(prompt = '')
ifTrue: [^ self].
lane := self boardProvider createColumn: prompt.
column := self boardProvider createColumn: prompt.

lane
column
board: self;
boardProvider: self boardProvider;
changeProvider: self changeProvider.
self lanes add: lane.
self updateLanesWithCards.
self columns add: column.
self updateColumnsWithCards.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
toolbuilder
buildAddColumnButtonPanelSpecWith: aBuilder

^ aBuilder pluggablePanelSpec new
minimumExtent: (300@200);
children: {self buildAddColumnButtonSpecWith: aBuilder};
yourself.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
toolbuilder
buildAddColumnButtonSpecWith: aBuilder

^ aBuilder pluggableActionButtonSpec new
frame: (0@0 corner: 1@0.1);
model: self;
action: #addColumn;
label: '+ Add column';
help: 'add a new column to the board';
yourself.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ initialize-release
buildAndOpen

| window |
self createLanes.
self createColumns.

window := self buildWith: SPBMorphicToolBuilder new.
window openInWorld.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
toolbuilder
buildColumnAreaChildren

| children |

children := ((self buildColumnsSpecWith: self usedBuilder)
collect: [:spec | self usedBuilder build: spec]) asOrderedCollection.
children
add: ((self usedBuilder build: (self buildAddColumnButtonPanelSpecWith: self usedBuilder)) color: Color lightGray).

^ children.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
toolbuilder
buildColumnAreaSpecWith: aBuilder

^ self buildColumnAreaSpecWith: aBuilder width: 0.75.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
toolbuilder
buildLaneAreaSpecWith: aBuilder width: aNumber
buildColumnAreaSpecWith: aBuilder width: aNumber

^ aBuilder resizeScrollPaneSpec new
frame: (0@0 corner: aNumber@1);
name: #laneArea;
name: #columnArea;
model: self;
scrollBarThickness: 20;
vScrollBarPolicy: #never;
children: #buildLaneAreaChildren;
children: #buildColumnAreaChildren;
layout: #horizontal;
yourself.
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
toolbuilder
buildLaneBodySpecWith: aBuilder and: anSPBLane
buildColumnBodySpecWith: aBuilder and: anSPBColumn

^aBuilder pluggableScrollPaneSpec new
frame: (0@0.15 corner: 1@1);
name: #laneScrollPane;
name: #columnScrollPane;
model: self;
hScrollBarPolicy: #never;
vScrollBarPolicy: #always;
children: {aBuilder pasteUpSpec new
minimumExtent: 300@290;
model: anSPBLane;
name: anSPBLane id;
model: anSPBColumn;
name: anSPBColumn id;
dropped: #cardDropped:Event:;
reject: [:morph :event | ((morph class = SPBCard) or: [morph class = SPBGhostLane]) not];
reject: [:morph :event | ((morph class = SPBCard) or: [morph class = SPBGhostColumn]) not];
yourself};
layout: #vertical;
yourself.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
toolbuilder
buildLaneHeaderAddCardButtonSpecWith: aBuilder and: anSPBLane
buildColumnHeaderAddCardButtonSpecWith: aBuilder and: anSPBColumn

^ aBuilder pluggableActionButtonSpec new
frame: (0@0.6 corner: 0.85@1);
model: anSPBLane;
model: anSPBColumn;
action: #addCard;
label: '+ Add card';
help: 'add a new card to the lane';
help: 'add a new card to the column';
yourself.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
toolbuilder
buildColumnHeaderMoveColumnButtonSpecWith: aBuilder and: anSPBColumn

^ aBuilder pluggableActionButtonSpec new
frame: (0.85@0.6 corner: 1@1);
model: anSPBColumn;
action: #moveColumn;
label: '<->';
help: 'move the column to another place';
yourself.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
toolbuilder
buildColumnHeaderSpecWith: aBuilder and: anSPBColumn

^ aBuilder pluggablePanelSpec new
frame: (0@0 corner: 1@0.15);
children: {self buildColumnHeaderTitleSpecWith: aBuilder and: anSPBColumn.
self buildColumnHeaderAddCardButtonSpecWith: aBuilder and: anSPBColumn.
self buildColumnHeaderMoveColumnButtonSpecWith: aBuilder and: anSPBColumn};
yourself.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
toolbuilder
buildLaneHeaderTitleSpecWith: aBuilder and: anSPBLane
buildColumnHeaderTitleSpecWith: aBuilder and: anSPBColumn

^ aBuilder pluggableTextSpec new
frame: (0@0 corner: 1@0.6);
model: anSPBLane;
model: anSPBColumn;
getText: #title;
setText: #updateTitle:;
yourself.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
toolbuilder
buildColumnSpecWith: aBuilder and: anSPBColumn

^ aBuilder pluggablePanelSpec new
minimumExtent: (300@600);
children: {self buildColumnHeaderSpecWith: aBuilder and: anSPBColumn.
self buildColumnBodySpecWith: aBuilder and: anSPBColumn};
name: ('column', anSPBColumn id asString) asSymbol;
yourself.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
toolbuilder
buildColumnsSpecWith: aBuilder

^ self columns collect: [:each | self buildColumnSpecWith: aBuilder and: each].

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

4 changes: 2 additions & 2 deletions Squello-Core.package/SPBBoard.class/instance/buildWith..st
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ buildWith: aBuilder
model: self;
label: 'Squello Project Board';
minimumExtent: 1040@400;
children: {self buildLaneAreaSpecWith: aBuilder.
children: {self buildColumnAreaSpecWith: aBuilder.
self buildSidebarSpecWith: aBuilder};
yourself.

self window: (aBuilder build: spec).

self updateLanes.
self updateColumns.

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

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

^ columns.
6 changes: 6 additions & 0 deletions Squello-Core.package/SPBBoard.class/instance/createColumns.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
toolbuilder
createColumns

self columns: self boardProvider queryColumns.
(self columns)
do: [:column | column changeProvider: self changeProvider].
6 changes: 0 additions & 6 deletions Squello-Core.package/SPBBoard.class/instance/createLanes.st

This file was deleted.

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

This file was deleted.

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

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
drag and drop
rerenderColumns

self columns
do: [:column | column pasteup: (self usedBuilder widgetAt: column id).
column rerenderCards.
column board: self].
7 changes: 0 additions & 7 deletions Squello-Core.package/SPBBoard.class/instance/rerenderLanes.st

This file was deleted.

13 changes: 13 additions & 0 deletions Squello-Core.package/SPBBoard.class/instance/resizeColumnArea.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
update sidebar
resizeColumnArea

| widgetName columnArea newMinHeight |
columnArea := self usedBuilder widgetAt: #columnArea.
newMinHeight := columnArea height - columnArea scrollBarThickness - 1.

self columns
do: [:column | widgetName := ('column', column id asString) asSymbol.
(self usedBuilder widgetAt: widgetName) minimumHeight: newMinHeight.
column minimumHeight: newMinHeight * 0.85.
column resizeBottomDetection.
column resizeToFitCards].
13 changes: 0 additions & 13 deletions Squello-Core.package/SPBBoard.class/instance/resizeLaneArea.st

This file was deleted.

7 changes: 7 additions & 0 deletions Squello-Core.package/SPBBoard.class/instance/showColumns.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
drag and drop
showColumns

self columns
do: [:column| column pasteup: (self usedBuilder widgetAt: column id).
column buildCards.
column board: self].
7 changes: 0 additions & 7 deletions Squello-Core.package/SPBBoard.class/instance/showLanes.st

This file was deleted.

Loading

0 comments on commit 2f4556e

Please sign in to comment.