generated from hpi-swa-teaching/SWT-Demo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #54 from hpi-swa-teaching/feature/move-lane
Feature/move lane
- Loading branch information
Showing
97 changed files
with
632 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
Squello-Core.package/SPBBoard.class/instance/buildLaneHeaderMoveLaneButtonSpecWith.And..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
toolbuilder | ||
buildLaneHeaderMoveLaneButtonSpecWith: aBuilder And: aSPBLane | ||
|
||
^ aBuilder pluggableActionButtonSpec new | ||
frame: (0.85@0.6 corner: 1@1); | ||
model: aSPBLane; | ||
action: #moveLane; | ||
label: '<->'; | ||
help: 'move the lane to another place'; | ||
yourself. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,4 @@ | ||
accessing | ||
createLanes | ||
|
||
| lane lanesJson| | ||
lanesJson := self provider queryColumns. | ||
self lanes: (lanesJson collect: | ||
[:each | lane := SPBLane newFrom: each. | ||
lane provider: self provider]) asOrderedCollection. | ||
self lanes: self provider queryColumns. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
drag and drop | ||
showLanes | ||
|
||
self lanes do: [:each | each pasteup: (self usedBuilder widgetAt: each id). | ||
self lanes do: [:each | | ||
each pasteup: (self usedBuilder widgetAt: each id). | ||
each lane: (self usedBuilder widgetAt: ('lane' , each id asString) asSymbol). | ||
each buildCards. | ||
each board: self]. |
8 changes: 8 additions & 0 deletions
8
Squello-Core.package/SPBBoard.class/instance/showLanesButDontRebuildCards.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
drag and drop | ||
showLanesButDontRebuildCards | ||
|
||
self lanes do: [:each | | ||
each pasteup: (self usedBuilder widgetAt: each id). | ||
each lane: (self usedBuilder widgetAt: ('lane' , each id asString) asSymbol). | ||
each rerenderCards. | ||
each board: self]. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
drag and drop | ||
accessing | ||
updateLanes | ||
|
||
self lanes do: [:each | each pasteup: (self usedBuilder widgetAt: each id). | ||
self lanes do: [:each | | ||
each pasteup: (self usedBuilder widgetAt: each id). | ||
each lane: (self usedBuilder widgetAt: ('lane' , each id asString) asSymbol). | ||
each fetchCards. | ||
each buildCards. | ||
each board: self]. |
5 changes: 5 additions & 0 deletions
5
Squello-Core.package/SPBBoard.class/instance/updateLanesWithCards.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
accessing | ||
updateLanesWithCards | ||
|
||
self changed: #buildLaneAreaChildren. | ||
self showLanesButDontRebuildCards. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
5 changes: 5 additions & 0 deletions
5
Squello-Core.package/SPBGhostLane.class/instance/initialize.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
initialization | ||
initialize | ||
|
||
super initialize. | ||
self color: (Color darkGray alpha: 0.5). |
4 changes: 4 additions & 0 deletions
4
Squello-Core.package/SPBGhostLane.class/instance/sourceLane..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
sourceLane: aSPBLane | ||
|
||
sourceLane := aSPBLane. |
4 changes: 4 additions & 0 deletions
4
Squello-Core.package/SPBGhostLane.class/instance/sourceLane.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
sourceLane | ||
|
||
^ sourceLane. |
16 changes: 16 additions & 0 deletions
16
Squello-Core.package/SPBGhostLane.class/instance/wantsToBeDroppedInto..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
dropping/grabbing | ||
wantsToBeDroppedInto: aMorph | ||
|
||
| laneIndex center | | ||
(aMorph class = SPBPluggablePasteUpMorph or: [aMorph class = SPBMockLane]) ifFalse: [^ false]. | ||
|
||
laneIndex := aMorph actionModel board lanes indexOf: aMorph actionModel. | ||
center := aMorph positionInWorld x + (aMorph width // 2). | ||
self position x > center | ||
ifTrue: [ | ||
self sourceLane changeIndexOfLane: laneIndex + 1 | ||
] ifFalse: [ | ||
self sourceLane changeIndexOfLane: laneIndex | ||
]. | ||
|
||
^ false. |
8 changes: 8 additions & 0 deletions
8
Squello-Core.package/SPBGhostLane.class/methodProperties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"class" : { | ||
}, | ||
"instance" : { | ||
"initialize" : "lo 6/11/2022 14:30", | ||
"sourceLane" : "lo 6/10/2022 21:12", | ||
"sourceLane:" : "lo 6/10/2022 21:12", | ||
"wantsToBeDroppedInto:" : "lo 6/18/2022 12:47" } } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"category" : "Squello-Core", | ||
"classinstvars" : [ | ||
], | ||
"classvars" : [ | ||
], | ||
"commentStamp" : "", | ||
"instvars" : [ | ||
"sourceLane" ], | ||
"name" : "SPBGhostLane", | ||
"pools" : [ | ||
], | ||
"super" : "Morph", | ||
"type" : "normal" } |
13 changes: 13 additions & 0 deletions
13
Squello-Core.package/SPBGithubAPI.class/instance/moveLane.withPostData..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
api call post request | ||
moveLane: aNumber withPostData: aDictionary | ||
|
||
"aNumber -> columnID" | ||
"aDictionary Parameter: | ||
position -> string (first / last / after: <column_id>)" | ||
|
||
| stream url | | ||
url := 'https://api.github.com/projects/columns/' , aNumber , '/moves'. | ||
stream := WriteStream with: OrderedCollection new. | ||
aDictionary jsonWriteOn: stream. | ||
|
||
^ self postRequestToURL: url withData: stream. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
Squello-Core.package/SPBGithubBoardProvider.class/instance/moveLane.after..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
cards | ||
moveLane: aSPBLane after: aNumber | ||
|
||
"move aSPBLane after lane with ID = aNumber" | ||
| payload | | ||
payload := Dictionary newFrom: {'position' -> ('after:', aNumber)}. | ||
^ self api moveLane: aSPBLane id withPostData: payload. |
6 changes: 6 additions & 0 deletions
6
Squello-Core.package/SPBGithubBoardProvider.class/instance/moveLaneToFront..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
cards | ||
moveLaneToFront: aSPBLane | ||
|
||
| payload | | ||
payload := Dictionary newFrom: {'position' -> 'first'}. | ||
^ self api moveLane: aSPBLane id withPostData: payload. |
7 changes: 6 additions & 1 deletion
7
Squello-Core.package/SPBGithubBoardProvider.class/instance/queryColumns.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
columns | ||
queryColumns | ||
|
||
^ self api queryColumns: self projectID. | ||
| lane lanesJson | | ||
lanesJson := self api queryColumns: self projectID. | ||
|
||
^ (lanesJson collect: | ||
[:each | lane := SPBLane newFrom: each. | ||
lane provider: self]) asOrderedCollection. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
comparing | ||
= anObject | ||
"Answer whether the receiver and anObject represent the same object." | ||
|
||
self == anObject | ||
ifTrue: [ ^ true ]. | ||
self class = anObject class | ||
ifFalse: [ ^ false ]. | ||
^ self id = anObject id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.