Skip to content

Commit

Permalink
Merge origin/master into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Haruko Schmidt committed Jul 12, 2024
2 parents be57518 + f77702c commit fa7c4c1
Show file tree
Hide file tree
Showing 69 changed files with 227 additions and 180 deletions.
2 changes: 1 addition & 1 deletion Squello-Core.package/SPBAssignee.class/instance/hash.st
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
comparing
hash

"Answer an integer value that is related to the identity of the receiver."

^ self id hash.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"=" : "LW 7/14/2022 12:24",
"asJson" : "FP 6/25/2024 11:13",
"asString" : "lo 5/28/2022 12:17",
"hash" : "LW 7/14/2022 11:23",
"hash" : "AH 7/12/2024 15:44",
"id" : "lo 5/16/2022 22:43",
"id:" : "tk 8/2/2022 23:42",
"isAssignee" : "lo 8/1/2022 14:48",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ actionSubmit

| oldUsername areCredentialsNil |
areCredentialsNil := (self username isNil or: [self token isNil]).
areCredentialsNil ifTrue: [^ self errorEmptyField].
areCredentialsNil
ifTrue: [^ self errorEmptyField].

SPBAuthenticator token: self token.
oldUsername := SPBAuthenticator username.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ toolbuilder
buildWith: aBuilder

^ aBuilder build: (aBuilder pluggableDialogSpec new
model: self;
label: #labelString;
extent: 600@60;
exclusive: false;
message: 'Insert GitHub authentication data:';
children: {self buildInputPanel: aBuilder};
buttons: (self buildButtons: aBuilder);
yourself).
model: self;
label: #labelString;
extent: 600 @ 60;
exclusive: false;
message: 'Insert GitHub authentication data:';
children: {self buildInputPanel: aBuilder};
buttons: (self buildButtons: aBuilder);
yourself).
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
accessing
token

^ token ifNil: [token := SPBAuthenticator token].
^ token
ifNil: [token := SPBAuthenticator token].
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
accessing
username

^ username ifNil: [username := SPBAuthenticator username].
^ username
ifNil: [username := SPBAuthenticator username].
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
"open" : "jh 7/31/2022 13:05" },
"instance" : {
"actionCancel" : "mcr 7/4/2022 00:36",
"actionSubmit" : "FP 7/12/2024 12:58",
"actionSubmit" : "AH 7/12/2024 15:44",
"buildButtons:" : "FP 6/13/2024 11:10",
"buildInputFields:" : "mcr 8/4/2022 00:18",
"buildInputPanel:" : "tk 8/2/2022 23:42",
"buildWith:" : "tk 8/2/2022 23:43",
"buildWith:" : "AH 7/12/2024 15:45",
"checkUserValid" : "lo 7/13/2022 19:16",
"close" : "lo 8/1/2022 14:16",
"errorEmptyField" : "mcr 8/4/2022 00:36",
"errorUserNotFound" : "mcr 8/4/2022 00:36",
"labelString" : "lo 7/13/2022 19:29",
"resetCredentials" : "FP 7/12/2024 12:58",
"token" : "FP 7/12/2024 13:04",
"token" : "AH 7/12/2024 15:45",
"token:" : "lo 7/13/2022 19:26",
"updateToken:" : "mcr 8/4/2022 00:18",
"updateUsername:" : "mcr 8/4/2022 00:18",
"username" : "FP 7/12/2024 12:57",
"username" : "AH 7/12/2024 15:45",
"username:" : "lo 7/13/2022 19:27" } }
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,4 @@ authenticate
self checkIfCredentialsMissing
ifTrue: [SPBAuthenticationForm open].
self checkIfCredentialsMissing
ifTrue: [self errorAuthenticationCanceled. Error signal].

"this is now handled by the boardProvider"
"[self checkIfTokenValid]
on: Error do: [Error signal]."
ifTrue: [self errorAuthenticationCanceled. Error signal].
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"username" : "FP 7/12/2024 12:50",
"username:" : "FP 7/12/2024 12:50" },
"instance" : {
"authenticate" : "FP 7/12/2024 12:55",
"authenticate" : "AH 7/12/2024 15:46",
"boardProvider" : "mcr 8/2/2022 18:26",
"boardProvider:" : "mcr 8/2/2022 18:26",
"checkIfCredentialsMissing" : "FP 7/12/2024 12:56",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ initialize-release
applyUserInterfaceTheme

super applyUserInterfaceTheme.
addColumnColumn ifNotNil: [
addColumnColumn color: ((self userInterfaceTheme get: #color for: SystemWindow) ifNil: [Color lightGray]).
].
addColumnColumn
ifNotNil: [
addColumnColumn color: ((self userInterfaceTheme get: #color for: SystemWindow)
ifNil: [Color lightGray]).].
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
as yet unclassified
hasModelYellowButtonMenuItems
^ false

^ false.
3 changes: 1 addition & 2 deletions Squello-Core.package/SPBBoard.class/instance/saveBoard.st
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@ saveBoard
SPBLandingPage changeRecentGitHubBoards: {
#name -> self boardName.
#url -> self url.
#repo -> self boardProvider repo} asDictionary.
].
#repo -> self boardProvider repo} asDictionary.].
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
initialize-release
setUpChangeProvider

self changeProvider projectId: self boardProvider projectId.
"self changeProvider api getWebhookChanges: self changeProvider webhookId."
self changeProvider projectId: self boardProvider projectId.
8 changes: 4 additions & 4 deletions Squello-Core.package/SPBBoard.class/methodProperties.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"activeCard" : "mcr 8/1/2022 02:31",
"addColumn" : "mcr 8/4/2022 00:40",
"addColumnLocal:" : "lo 8/3/2022 12:34",
"applyUserInterfaceTheme" : "AH 6/20/2024 16:20",
"applyUserInterfaceTheme" : "AH 7/12/2024 15:55",
"asJson" : "FP 7/4/2024 15:46",
"boardName" : "FP 6/25/2024 12:13",
"boardName:" : "FP 6/25/2024 12:13",
Expand Down Expand Up @@ -62,7 +62,7 @@
"errorCannotAddColumn:" : "jh 7/31/2022 14:28",
"errorInvalidUrl" : "mcr 8/2/2022 22:17",
"errorNoProjects" : "mcr 8/2/2022 22:15",
"hasModelYellowButtonMenuItems" : "L.L. 6/7/2024 22:59",
"hasModelYellowButtonMenuItems" : "AH 7/12/2024 15:56",
"indexOfColumn:" : "lo 8/3/2022 12:57",
"initialize" : "FP 6/10/2024 14:43",
"isLocal" : "FP 6/10/2024 15:01",
Expand All @@ -75,8 +75,8 @@
"removeColumn:" : "lo 8/1/2022 14:09",
"rerenderColumns" : "lo 7/31/2022 16:42",
"resizeColumnArea" : "jh 8/3/2022 01:07",
"saveBoard" : "FP 6/25/2024 14:06",
"setUpChangeProvider" : "Haru 5/13/2024 14:46",
"saveBoard" : "AH 7/12/2024 15:56",
"setUpChangeProvider" : "AH 7/12/2024 15:57",
"setupColumns" : "FP 6/17/2024 17:13",
"sidebar" : "mcr 8/1/2022 00:44",
"sidebar:" : "mcr 8/1/2022 00:44",
Expand Down
3 changes: 2 additions & 1 deletion Squello-Core.package/SPBBoardSaver.class/instance/boards.st
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
accessing
boards

boards ifNil: [self boards: Dictionary new].
boards
ifNil: [self boards: Dictionary new].
^ boards.
3 changes: 2 additions & 1 deletion Squello-Core.package/SPBBoardSaver.class/instance/load..st
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
save/load
load: anObject

^ self boards at: anObject ifAbsent: nil.
^ self boards at: anObject
ifAbsent: nil.
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
"class" : {
"defaultSaver" : "FP 6/3/2024 11:17" },
"instance" : {
"boards" : "FP 6/3/2024 11:15",
"boards" : "AH 7/12/2024 15:58",
"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/25/2024 14:33",
"load:" : "AH 7/12/2024 15:58",
"save:as:" : "FP 6/3/2024 11:15" } }
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,26 @@ buildFromRemoteProject: aJsonObject intoColumns: aDictionairy
"TODO: refactor this into smaller methods!"
columnID := (aJsonObject at: 'fieldValueByName') at: 'optionId'.
column := aDictionairy at: columnID.
column ifNil: [self error: 'The Card has no matching Column'.].
column
ifNil: [self error: 'The Card has no matching Column'.].
contentType := aJsonObject at: 'type'.
content := aJsonObject at: 'content'.
title := content at: 'title'.
body := content at: 'body'.
cardId := aJsonObject at: 'id'.
instance := self newWithTitle: title body: body id: cardId into: column.
isDraftIssue := contentType = 'DRAFT_ISSUE'.
isDraftIssue ifTrue: [instance isNote: true.].
isDraftIssue
ifTrue: [instance isNote: true.].
isIssueOrPR := (contentType = 'ISSUE') or: [contentType = 'PULL_REQUEST'].
instance
issueId: (content at: 'id');
assignees: (((content at: 'assignees') at: 'nodes') collect: [:each| SPBAssignee newFrom: each.]) asOrderedCollection;
labels: OrderedCollection new;
isClosed: (isDraftIssue not and: [content at: 'closed']).
isIssueOrPR ifTrue: [
instance labels: (((content at: 'labels') at: 'nodes') collect: [:each| SPBLabel newFrom: each.]) asOrderedCollection].
isIssueOrPR
ifTrue: [
instance labels: (((content at: 'labels') at: 'nodes') collect: [:each| SPBLabel newFrom: each.]) asOrderedCollection].
instance buildUI.
instance openInWorld.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
accessing
defaultCardExtent

^ 270@100.
^ 270 @ 100.
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,25 @@ applyUserInterfaceTheme

| textColor font |
super applyUserInterfaceTheme.
self color: ((self userInterfaceTheme get: #color for: PluggableButtonMorph) ifNil: [Color red]);
borderWidth: self borderWidthMultiplier * ((self userInterfaceTheme get: #borderWidth for: PluggableButtonMorph) ifNil: [1]);
borderColor: ((self userInterfaceTheme get: #borderColor for: PluggableButtonMorph) ifNil: [Color red]).
textColor := (self userInterfaceTheme get: #textColor for: PluggableButtonMorph) ifNil: [Color white].
self isHighlighted ifTrue: [
"make color and borderColor darker or lighter depending on color"
"if color is dark, make it lighter, else darker"
"this is what color makeForegroundColor is taking care of - it returns white or black"
self color: (self color alphaMixed: 0.75 with: self color makeForegroundColor).
self borderColor: (self color alphaMixed: 0.75 with: self color makeForegroundColor).
textColor := self color makeForegroundColor.
].
self color: ((self userInterfaceTheme get: #color for: PluggableButtonMorph)
ifNil: [Color red]);
borderWidth: self borderWidthMultiplier * ((self userInterfaceTheme get: #borderWidth for: PluggableButtonMorph)
ifNil: [1]);
borderColor: ((self userInterfaceTheme get: #borderColor for: PluggableButtonMorph)
ifNil: [Color red]).
textColor := (self userInterfaceTheme get: #textColor for: PluggableButtonMorph)
ifNil: [Color white].
self isHighlighted
ifTrue: [
"make color and borderColor darker or lighter depending on color"
"if color is dark, make it lighter, else darker"
"this is what color makeForegroundColor is taking care of - it returns white or black"
self color: (self color alphaMixed: 0.75 with: self color makeForegroundColor).
self borderColor: (self color alphaMixed: 0.75 with: self color makeForegroundColor).
textColor := self color makeForegroundColor.].
font := (self userInterfaceTheme get: #font for: PluggableButtonMorph).
self assigneeModel textColor: textColor; font: font.
self statusModel textColor: textColor; font: font.
self assigneeModel textColor: textColor;
font: font.
self statusModel textColor: textColor;
font: font.
self titleModel textColor: textColor.
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
updating-local
calculateLabelPositionFor: aNumber

| label previousLabel firstAttempt |
| label previousLabel positionIfSameRow |
previousLabel := self labelModels at: aNumber - 1.
label := self labelModels at: aNumber.

firstAttempt := (previousLabel position x + previousLabel extent x + self labelBorderOffset) @ previousLabel position y.
firstAttempt x + label extent x <= (self extent x - self labelBorderOffset) ifTrue: [^ firstAttempt].
positionIfSameRow := (previousLabel position x + previousLabel extent x + self labelBorderOffset) @ previousLabel position y.
positionIfSameRow x + label extent x <= (self extent x - self labelBorderOffset)
ifTrue: [^ positionIfSameRow].

^ self labelBorderOffset @
(previousLabel position y + (previousLabel extent y + self inbetweenLabelOffset)).
3 changes: 2 additions & 1 deletion Squello-Core.package/SPBCard.class/instance/initialize.st
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ initialize
buildIndicatorDetection;
isHighlighted: false.

self isClosed ifNil: [self isClosed: false].
self isClosed
ifNil: [self isClosed: false].
6 changes: 4 additions & 2 deletions Squello-Core.package/SPBCard.class/instance/isClosed.st
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
accessing
isClosed

isClosed ifNil: [self isClosed: false].
^ isClosed
isClosed
ifNil: [self isClosed: false.
self updateStatus.].
^ isClosed.
3 changes: 2 additions & 1 deletion Squello-Core.package/SPBCard.class/instance/labels.st
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
accessing
labels

^ labels ifNil: [labels := OrderedCollection new].
^ labels
ifNil: [labels := OrderedCollection new].
12 changes: 6 additions & 6 deletions Squello-Core.package/SPBCard.class/instance/moveToTop.st
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
context menu
moveToTop

|index|
index := column cards indexOf: self.
column addCardToTop: self.
column cards removeAt: index+1.
column resizeToFitCards.
column alignCards.
| index |
index := column cards indexOf: self.
column addCardToTop: self.
column cards removeAt: index + 1.
column resizeToFitCards.
column alignCards.
15 changes: 7 additions & 8 deletions Squello-Core.package/SPBCard.class/instance/openContextMenu.st
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
context menu
openContextMenu

| menu |

menu := MenuMorph new defaultTarget: self.
menu add: 'remove all Labels' action: #removeAllLabels.
menu add: 'remove all Assignees' action: #removeAllAssignees.
menu add: 'move to top' action: #moveToTop.
menu add: 'toggle closed' action: #toggleClosed.
menu popUpInWorld.
| menu |
menu := MenuMorph new defaultTarget: self.
menu add: 'remove all Labels' action: #removeAllLabels.
menu add: 'remove all Assignees' action: #removeAllAssignees.
menu add: 'move to top' action: #moveToTop.
menu add: 'toggle closed' action: #toggleClosed.
menu popUpInWorld.
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
context menu
removeAllAssignees

|size|
size := assignees size.
1 to: size do:[:a|self removeAssignee: assignees first].
"labels do:[:label | self removeLabel: label]."
self column board sidebar
changed: #potentialAssigneesList;
changed: #activeCardAssigneeList.
| size |
size := assignees size.
1 to: size do:[:a | self removeAssignee: assignees first.].
self column board sidebar
changed: #potentialAssigneesList;
changed: #activeCardAssigneeList.
Loading

0 comments on commit fa7c4c1

Please sign in to comment.