Skip to content

Commit

Permalink
destroyed card builder
Browse files Browse the repository at this point in the history
  • Loading branch information
jannikhuschka committed Aug 2, 2022
1 parent f415dca commit 835efc1
Show file tree
Hide file tree
Showing 54 changed files with 89 additions and 265 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ resizeColumnArea
(self usedBuilder widgetAt: widgetName) minimumHeight: newMinHeight.
column
minimumHeight: newMinHeight * 0.85;
alignCards;
resizeBottomDetection;
resizeToFitCards].
3 changes: 1 addition & 2 deletions Squello-Core.package/SPBBoard.class/instance/setupColumns.st
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ setupColumns
do: [:column | column pasteup: (self usedBuilder widgetAt: column id).
column
initializeIndicator;
fetchCards;
buildCards;
fetchAndBuildCards;
board: self;
resizeToFitCards;
initializeBottomDetection].
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 @@ -52,8 +52,8 @@
"parseRepoFromUrl:" : "mcr 8/2/2022 21:15",
"removeColumn:" : "lo 8/1/2022 14:09",
"rerenderColumns" : "lo 7/31/2022 16:42",
"resizeColumnArea" : "lo 8/1/2022 11:12",
"setupColumns" : "mcr 8/1/2022 01:26",
"resizeColumnArea" : "jh 8/3/2022 01:07",
"setupColumns" : "jh 8/3/2022 00:48",
"sidebar" : "mcr 8/1/2022 00:44",
"sidebar:" : "mcr 8/1/2022 00:44",
"update:with:" : "mcr 8/1/2022 01:27",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
accessing
buildFromRemote: aJsonObject into: anSPBColumn

| instance |
instance := self newFrom: aJsonObject with: anSPBColumn.
instance setCardColumn: anSPBColumn.
^ instance.
9 changes: 9 additions & 0 deletions Squello-Core.package/SPBCard.class/class/buildNew.into..st
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
accessing
buildNew: aDictionary into: anSPBColumn

| instance cardJson boardProvider |
boardProvider := anSPBColumn boardProvider.
cardJson := boardProvider createCard: aDictionary into: anSPBColumn.
instance := self newFrom: cardJson with: anSPBColumn.
instance setCardColumnAtTop: anSPBColumn.
^ instance.
12 changes: 12 additions & 0 deletions Squello-Core.package/SPBCard.class/class/newFrom.with..st
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
accessing
newFrom: aJsonObject with: anSPBColumn

^ self new
id: (aJsonObject at: 'id');
boardProvider: anSPBColumn boardProvider;
changeProvider: anSPBColumn changeProvider;
setupMouseEvents;
buildContent: (aJsonObject at: 'content_url');
buildUI;
openInWorld;
yourself.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
building
accessing
buildContent: aString

| contentJson |
contentJson := self boardProvider queryCardContent: aString.
self card
self
title: (contentJson at: 'title');
description: (contentJson at: 'body');
issueId: (contentJson at: 'number');
assignees: ((contentJson at: 'assignees') collect:
[:assigne | SPBAssignee newFrom: assigne]) asOrderedCollection;
labels: (self buildLabels: (contentJson at: 'labels')).
[:assignee | SPBAssignee newFrom: assignee]) asOrderedCollection;
labels: ((contentJson at: 'labels') collect: [:label | SPBLabel newFrom: label]) asOrderedCollection.
10 changes: 10 additions & 0 deletions Squello-Core.package/SPBCard.class/instance/buildUI.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
accessing
buildUI

self titleModel contents: self title.
self
updateAssigneeCount;
updateLabelIcons;
setCardHeight.
self assigneeModel position: self position + self extent - self assigneeOffset.
self resizeIndicatorFields.
6 changes: 6 additions & 0 deletions Squello-Core.package/SPBCard.class/instance/setCardColumn..st
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
accessing
setCardColumn: anSPBColumn

self column: anSPBColumn.
anSPBColumn addCard: self.
anSPBColumn pasteup addMorph: self.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
accessing
setCardColumnAtTop: anSPBColumn

self column: anSPBColumn.
anSPBColumn addCardToTop: self.
anSPBColumn pasteup addMorph: self.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
accessing
setupMouseEvents

self on: #click send: #becomeActiveCard to: self.
self on: #startDrag send: #startDragging to: self.
10 changes: 9 additions & 1 deletion Squello-Core.package/SPBCard.class/methodProperties.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
"class" : {
"buildFromRemote:into:" : "jh 8/3/2022 00:35",
"buildNew:into:" : "jh 8/3/2022 00:33",
"defaultCardExtent" : "lo 8/1/2022 12:18",
"indicatorCardEdgeOffset" : "lo 8/1/2022 12:23" },
"indicatorCardEdgeOffset" : "lo 8/1/2022 12:23",
"newFrom:with:" : "jh 8/3/2022 00:53" },
"instance" : {
"=" : "lo 7/31/2022 18:14",
"addAssignee:" : "lo 7/31/2022 16:22",
Expand All @@ -18,9 +21,11 @@
"boardProvider" : "jh 7/29/2022 12:46",
"boardProvider:" : "lo 7/31/2022 16:30",
"buildAssignee" : "tk 8/2/2022 23:27",
"buildContent:" : "jh 8/3/2022 00:17",
"buildIndicatorDetection" : "tk 8/2/2022 23:23",
"buildIndicatorDetectionHalf" : "lo 8/1/2022 11:37",
"buildTitle" : "tk 8/2/2022 23:24",
"buildUI" : "jh 8/3/2022 00:19",
"cardIndicatorExtent" : "lo 8/1/2022 11:52",
"changeProvider" : "lo 7/8/2022 15:38",
"changeProvider:" : "jh 7/9/2022 10:18",
Expand Down Expand Up @@ -52,7 +57,10 @@
"removeLabelLocal:" : "lo 7/31/2022 16:40",
"resizeCard" : "tk 8/2/2022 23:27",
"resizeIndicatorFields" : "tk 8/2/2022 23:23",
"setCardColumn:" : "jh 8/3/2022 00:34",
"setCardColumnAtTop:" : "jh 8/3/2022 00:33",
"setCardHeight" : "tk 8/2/2022 23:28",
"setupMouseEvents" : "jh 8/3/2022 00:20",
"startDragging" : "tk 7/30/2022 21:53",
"title" : "lo 7/31/2022 16:09",
"title:" : "mcr 5/21/2022 20:52",
Expand Down
1 change: 0 additions & 1 deletion Squello-Core.package/SPBCardBuilder.class/README.md

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

10 changes: 0 additions & 10 deletions Squello-Core.package/SPBCardBuilder.class/instance/buildUI.st

This file was deleted.

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

This file was deleted.

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

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

22 changes: 0 additions & 22 deletions Squello-Core.package/SPBCardBuilder.class/methodProperties.json

This file was deleted.

16 changes: 0 additions & 16 deletions Squello-Core.package/SPBCardBuilder.class/properties.json

This file was deleted.

2 changes: 1 addition & 1 deletion Squello-Core.package/SPBColumn.class/instance/addCard.st
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ addCard
cardTitle = ''
ifTrue: [^ self].
content := Dictionary newFrom: {'title' -> cardTitle . 'body' -> ''}.
self cardBuilder buildNew: content atTop: self.
SPBCard buildNew: content into: self.
self alignCards.

Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
accessing
boardProvider: anSPBGithubBoardProvider

boardProvider := anSPBGithubBoardProvider.
self cardBuilder boardProvider: anSPBGithubBoardProvider.
boardProvider := anSPBGithubBoardProvider.
6 changes: 0 additions & 6 deletions Squello-Core.package/SPBColumn.class/instance/buildCards.st

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ creation
buildSingleCard: aJsonObject

| card |
card := self cardBuilder buildFromRemote: aJsonObject into: self.
card := SPBCard buildFromRemote: aJsonObject into: self.
self cards remove: card.
(aJsonObject at: 'card')
ifNil: [self cards addFirst: card. self alignCards. ^ self].
Expand Down
4 changes: 0 additions & 4 deletions Squello-Core.package/SPBColumn.class/instance/cardBuilder..st

This file was deleted.

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

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ accessing
changeProvider: anSPBGithubChangeProvider

changeProvider := anSPBGithubChangeProvider.
changeProvider addDependent: self.
self cardBuilder changeProvider: anSPBGithubChangeProvider.
changeProvider addDependent: self.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
creation
fetchAndBuildCards

(self boardProvider queryCardsForColumn: self) asOrderedCollection
do: [:cardJson | SPBCard buildFromRemote: cardJson into: self].
4 changes: 0 additions & 4 deletions Squello-Core.package/SPBColumn.class/instance/fetchCards.st

This file was deleted.

Loading

0 comments on commit 835efc1

Please sign in to comment.