Skip to content

Commit

Permalink
Add colorful label icons
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke committed Jun 6, 2022
1 parent 1752d4e commit 7479bfc
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ dropOnLabels: anSPBLabel at: index
ifFalse: [^ self inform: 'Can only drop labels'].
(self activeCard labels anySatisfy: [:each | each = anSPBLabel]) ifTrue: [^ self].
self activeCard labels add: anSPBLabel.
self activeCard updateLabelIcons.
self changed: #potentialLabelsList.
self changed: #activeCardLabelList.
self provider addLabels: {anSPBLabel} toCard: self activeCard.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ dropOnPotentialLabels: anSPBLabel at: index
(anSPBLabel isKindOf: SPBLabel)
ifFalse: [^ self inform: 'Can only drop labels'].
self activeCard labels remove: anSPBLabel ifAbsent: [].
self activeCard updateLabelIcons.
self changed: #potentialLabelsList.
self changed: #activeCardLabelList.
self provider deleteLabel: anSPBLabel fromCard: self activeCard.
4 changes: 2 additions & 2 deletions Squello-Core.package/SPBBoard.class/methodProperties.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
"dragFromPotentialAssignees:" : "mcr 5/27/2022 19:37",
"dragFromPotentialLabels:" : "lo 6/5/2022 15:11",
"dropOnAssignees:at:" : "mcr 5/30/2022 21:46",
"dropOnLabels:at:" : "lo 6/5/2022 14:47",
"dropOnLabels:at:" : "lo 6/6/2022 12:59",
"dropOnPotentialAssignees:at:" : "mcr 5/30/2022 21:47",
"dropOnPotentialLabels:at:" : "lo 6/5/2022 14:48",
"dropOnPotentialLabels:at:" : "lo 6/6/2022 13:00",
"initialize" : "NTK 6/1/2022 16:39",
"labelIcon:" : "lo 6/6/2022 12:23",
"labelSelected" : "lo 6/5/2022 14:56",
Expand Down
5 changes: 5 additions & 0 deletions Squello-Core.package/SPBCard.class/instance/extent.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
initialize-release
extent

^ 280 @ 100.

2 changes: 1 addition & 1 deletion Squello-Core.package/SPBCard.class/instance/initialize.st
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ initialize

super initialize.
self
extent: 280 @ 100;
extent: self extent;
color: Color lightGray.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
updating
updateLabelIcons

| newLabel |
self labels withIndexDo: [:label :i |
newLabel := label asForm asMorph.
self addMorph: newLabel.
newLabel position: ((newLabel extent x + 1 * i) + 5 @ self extent y - newLabel extent y - 5) + self position].
11 changes: 2 additions & 9 deletions Squello-Core.package/SPBCard.class/instance/walkToPosition..st
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
accessing
walkToPosition: aPoint

(AnimPropertyAnimation
on: self
property: #position
start: self position
end: aPoint
duration: 200)
(AnimPropertyAnimation on: self property: #position start: self position end: aPoint duration: 200)
register;
start: #deleteWhenFinished.

Transcript show: 'moved!' , Character cr.
start: #deleteWhenFinished.
6 changes: 4 additions & 2 deletions Squello-Core.package/SPBCard.class/methodProperties.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@
"currentLane" : "tkv 5/21/2022 01:55",
"description" : "mcr 5/22/2022 01:34",
"description:" : "mcr 5/21/2022 20:49",
"extent" : "lo 6/6/2022 13:08",
"frontCardId" : "LW 5/24/2022 21:51",
"frontCardId:" : "LW 5/24/2022 21:51",
"handlesMouseDown:" : "lo 5/27/2022 00:03",
"id" : "mcr 5/27/2022 18:41",
"id:" : "mcr 5/27/2022 18:41",
"initialize" : "mcr 5/27/2022 12:32",
"initialize" : "lo 6/6/2022 13:08",
"issueId" : "LW 5/24/2022 21:51",
"issueId:" : "mcr 5/27/2022 18:45",
"labels" : "lo 6/5/2022 14:39",
Expand All @@ -32,8 +33,9 @@
"updateAssigneeCount" : "mcr 5/30/2022 23:39",
"updateBalloonText" : "mcr 5/30/2022 23:42",
"updateDescription:" : "mcr 5/21/2022 19:53",
"updateLabelIcons" : "lo 6/6/2022 13:11",
"updateTitle:" : "mcr 5/30/2022 21:43",
"user" : "mcr 5/21/2022 20:52",
"user:" : "mcr 5/21/2022 20:52",
"walkToPosition:" : "mcr 6/4/2022 00:00",
"walkToPosition:" : "lo 6/6/2022 13:07",
"yellowButtonActivity:" : "lo 5/27/2022 00:33" } }
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ buildUI
assigneeMorph: assignees;
addMorph: title;
addMorph: assignees;
updateAssigneeCount.
updateAssigneeCount;
updateLabelIcons.

self card titleMorph extent: 280 @ 21.
self card assigneeMorph position: self card position x + (self card extent x - 180) @ self card position y + (self card extent y - assignees extent y)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"buildFromRemote:into:" : "mcr 5/28/2022 02:54",
"buildLabels:" : "lo 6/5/2022 14:51",
"buildNew:into:" : "mcr 5/28/2022 03:02",
"buildUI" : "mcr 5/30/2022 23:36",
"buildUI" : "lo 6/6/2022 13:13",
"card" : "mcr 5/19/2022 09:30",
"card:" : "mcr 5/19/2022 09:30",
"provider" : "mcr 5/20/2022 12:06",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ deleteLabel: aString fromIssue: aNumber user: anOtherString repo: aThirdString

| stream url |
url := ('https://api.github.com/repos/' , anOtherString , '/' , aThirdString, '/issues/' , aNumber , '/labels/' , aString) urlEncoded.

self halt.


stream := WriteStream with: OrderedCollection new.

^ self deleteRequestToURL: url withData: stream.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"createPostRequestTo:" : "mcr 5/27/2022 23:08",
"deleteAssignees:fromIssue:user:repo:" : "mcr 5/28/2022 00:45",
"deleteColumn:" : "mcr 5/28/2022 00:45",
"deleteLabel:fromIssue:user:repo:" : "lo 6/6/2022 12:40",
"deleteLabel:fromIssue:user:repo:" : "lo 6/6/2022 13:12",
"deleteRequestToURL:" : "mcr 5/28/2022 00:31",
"deleteRequestToURL:withData:" : "mcr 5/28/2022 00:28",
"getRequestToURL:" : "mcr 5/27/2022 23:08",
Expand Down

0 comments on commit 7479bfc

Please sign in to comment.