Skip to content

Commit

Permalink
new ui working correctly without visualization
Browse files Browse the repository at this point in the history
  • Loading branch information
Ingmar Vogel committed Jun 19, 2024
1 parent b2f15b2 commit d2053d6
Show file tree
Hide file tree
Showing 52 changed files with 267 additions and 232 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
accessing
at: key ifPresent: do ifAbsentPut: anObject

self items at: key ifPresent: [:arg | do value] ifAbsentPut: (STON fromString: (STON toString: anObject)).
at: key ifPresent: do ifAbsentPut: anObject
self items
at: key
ifPresent: [:arg | do value]
ifAbsentPut: (STON
fromString: (STON toString: anObject)).
self changed: #pollList
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
initialize-release
removeKey: key

self items removeKey: key ifAbsent: [self error].
removeKey: key
self items
removeKey: key
ifAbsent: [self error].
self changed: #pollList
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
"addAnswerSet:ToPoll:" : "JT 8/2/2022 18:06",
"at:" : "kge 8/1/2022 18:55",
"at:ifAbsent:" : "kge 8/1/2022 18:55",
"at:ifPresent:ifAbsentPut:" : "Ingmar Vogel 6/18/2024 10:14",
"at:ifPresent:ifAbsentPut:" : "Ingmar Vogel 6/18/2024 16:41",
"groupAt:" : "ms 8/4/2022 21:56",
"includesKey:" : "kge 8/1/2022 18:56",
"initialize" : "kge 8/1/2022 18:56",
"items" : "JT 8/2/2022 18:06",
"items:" : "JT 8/2/2022 18:06",
"removeKey:" : "Ingmar Vogel 6/18/2024 10:14",
"removeKey:" : "Ingmar Vogel 6/18/2024 16:41",
"values" : "kge 8/1/2022 18:56" } }
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
accessing
addVisualization: aVisualization

self visualizations add: aVisualization
addVisualization: aVisualization
self visualizations add: aVisualization

Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
toolbuilder
buildClosePollButtonWith: aBuilder

^ aBuilder pluggableButtonSpec new
model: self;
label: 'Close Poll';
help: 'Close poll to prevent participants from handing in answers';
action: #closePoll;
yourself
buildClosePollButtonWith: aBuilder
^ aBuilder pluggableButtonSpec new model: self;
label: 'Close Poll';
help: 'Close poll to prevent participants from handing in answers';
action: #closePoll;
yourself

Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
toolbuilder
buildCreateAnotherPollButton: aBuilder

^ aBuilder pluggableButtonSpec new
model: self;
label: 'Create Another Poll';
help: 'Creates another poll and opens the draft builder for it in a new window.';
action: #createPoll;
yourself
buildCreateAnotherPollButton: aBuilder
^ aBuilder pluggableButtonSpec new model: self;
label: 'Create Another Poll';
help: 'Creates another poll and opens the draft builder for it in a new window.';
action: #createPoll;
yourself

Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
toolbuilder
buildCreatePollFromSavedDraftsButton: aBuilder

^ aBuilder pluggableButtonSpec new
model: self;
label: 'Create Poll From Saved Drafts';
help: 'Opens a window with saved drafts you can then edit and run.';
action: #createPoll;
yourself
buildCreatePollFromSavedDraftsButton: aBuilder
^ aBuilder pluggableButtonSpec new model: self;
label: 'Create Poll From Saved Drafts';
help: 'Opens a window with saved drafts you can then edit and run.';
action: #createPoll;
yourself

Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
toolbuilder
buildDeletePollButtonWith: aBuilder

^ aBuilder pluggableButtonSpec new
model: self;
label: 'Delete Poll';
help: 'Delete Poll to clear space for new polls.';
action: #deletePoll;
yourself
buildDeletePollButtonWith: aBuilder
^ aBuilder pluggableButtonSpec new model: self;
label: 'Delete Poll';
help: 'Delete Poll to clear space for new polls.';
action: #deletePoll;
yourself

Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ buildExportResultsButtonWith: aBuilder
label: 'Export Results';
help: 'Export the results of the currently selected poll to ressources/DataExports as a .csv file named after the poll id.';
action: #exportResults;
yourself
yourself

Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
toolbuilder
buildIDTextBoxWith: aBuilder

^ aBuilder pluggableTextSpec new
model: self;
readOnly: true;
indicateUnacceptedChanges: false;
getText: #pollId;
yourself
buildIDTextBoxWith: aBuilder
^ aBuilder pluggableTextSpec new model: self;
readOnly: true;
indicateUnacceptedChanges: false;
getText: #pollIDString;
yourself

Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
toolbuilder
buildIdCopyButtonWith: aBuilder

^ aBuilder pluggableButtonSpec new
model: self;
label: 'Copy Poll-ID to Clipboard';
action: #copyPollId;
yourself
buildIdCopyButtonWith: aBuilder
^ aBuilder pluggableButtonSpec new model: self;
label: 'Copy Poll-ID to Clipboard';
action: #copyPollId;
yourself

Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
toolbuilder
buildPollListWith: aBuilder

buildPollListWith: aBuilder
| listSpec |

listSpec := aBuilder pluggableListSpec new.
listSpec
model: self;
list: #pollList;
getIndex: #getIndex;
setIndex: #setIndex:.
^ listSpec
listSpec model: self;
list: #pollList;
getIndex: #getIndex;
setIndex: #setIndex:.
^ listSpec

Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
toolbuilder
buildQuestionBuilder

^ {(self questionBuilderAt: self currentQuestion) buildWith: ToolBuilder default}


^ {(self questionBuilderAt: self currentQuestion)
buildWith: ToolBuilder default}

Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
toolbuilder
buildStopServerButtonWith: aBuilder

^ aBuilder pluggableButtonSpec new
model: self;
label: 'Stop Server';
help: 'Stops the liquid server which allows access to your local polls.';
action: #stopServer;
yourself
buildStopServerButtonWith: aBuilder
^ aBuilder pluggableButtonSpec new model: self;
label: 'Stop Server';
help: 'Stops the liquid server which allows access to your local polls.';
action: #stopServer;
yourself

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
toolbuilder
buildVisualization
^ {(self visualizationAt: self currentQuestion)
buildWith: ToolBuilder default}

Original file line number Diff line number Diff line change
@@ -1,26 +1,30 @@
toolbuilder
buildWith: builder

buildWith: builder
| windowSpec |

windowSpec := self buildWindowWith: builder specs: {
(self pollListFrame) -> [self buildPollListWith: builder].
"(self questionBuilderFrame) ->
[builder pluggablePanelSpec new
model: self;
layout: #vertical;
children: #buildQuestionBuilder;
yourself]."
(self idTextBoxFrameFrame) -> [self buildIDTextBoxWith: builder].
(self deletePollButtonFrame) -> [self buildDeletePollButtonWith: builder].
(self createPollFromSavedPollsButtonFrame) -> [self buildCreatePollFromSavedDraftsButton: builder].
(self idCopyButtonFrame) -> [self buildIdCopyButtonWith: builder].
(self stopServerButtonFrame) -> [self buildStopServerButtonWith: builder].
(self closePollButtonFrame) -> [self buildClosePollButtonWith: builder].
(self createAnotherPollButtonFrame) -> [self buildCreateAnotherPollButton: builder].
(self exportResultsButtonFrame) -> [self buildExportResultsButtonWith: builder].
}.
windowSpec := self buildWindowWith: builder specs: {self pollListFrame
-> [self buildPollListWith: builder]. self idTextBoxFrameFrame
-> ["(self
questionBuilderFrame)
->
[builder
pluggablePanelSpec
new
model:
self;
layout:
#vertical;
children:
#buildQuestionBuilder;
yourself]. "
self buildIDTextBoxWith: builder]. self deletePollButtonFrame
-> [self buildDeletePollButtonWith: builder]. self createPollFromSavedPollsButtonFrame
-> [self buildCreatePollFromSavedDraftsButton: builder]. self idCopyButtonFrame
-> [self buildIdCopyButtonWith: builder]. self stopServerButtonFrame
-> [self buildStopServerButtonWith: builder]. self closePollButtonFrame
-> [self buildClosePollButtonWith: builder]. self createAnotherPollButtonFrame
-> [self buildCreateAnotherPollButton: builder]. self exportResultsButtonFrame
-> [self buildExportResultsButtonWith: builder]}.
windowSpec label: 'Liquid - Host'.
^ builder build: windowSpec



Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
accessing
clipboardDelay

^ 0.1
^ 0.1

Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
modifying
closePoll

self currentPoll == 0 ifFalse: [
(LQRemotePollRepoServer pollRepo at: self currentPollID
ifAbsent:
[^ 'This poll does not exist.'])
closeWithPassword: (LQPasswordManager default
findPasswordFor: self currentPollID
ifAbsent: [^ UIManager default inform: 'You don''t have access to this poll.']).
self changed: #pollId
]
"self dependents first label: 'closed Poll with ID:'."
self currentPoll == 0
ifFalse: [(LQRemotePollRepoServer pollRepo
at: self currentPollID
ifAbsent: [^ 'This poll does not exist.'])
closeWithPassword: (LQPasswordManager default
findPasswordFor: self currentPollID
ifAbsent: [^ UIManager default inform: 'You don''t have access to this poll.']).
self changed: #pollIDString]
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
toolbuilder
closePollButtonFrame

^ self
frame: 0.9
fromTop: 0.825
fromLeft: 0.25
width: 0.50
width: 0.5

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
toolbuilder
createAnotherPollButtonFrame

^ self
frame: 0.9
fromTop: 0.75
fromLeft: 0
width: 0.25
width: 0.25

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
toolbuilder
createPollFromSavedPollsButtonFrame

^ self
frame: 1
fromTop: 0.9
fromLeft: 0
width: 0.25
width: 0.25

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
accessing
currentPoll: aNumber

currentPoll := aNumber
currentPoll: aNumber
currentPoll := aNumber

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
accessing
currentPoll

^ currentPoll
^ currentPoll

Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
accessing
currentPollID
self pollList size == 0
ifFalse: [^ (self pollList at: self getIndex) id].

^ 'No polls in your repo.'
self currentPoll = 0
ifFalse: [^ (self pollList at: self getIndex) id]
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ deletePoll
at: self currentPollID
ifAbsent: [^ 'This poll does not exist.'].
LQRemotePollRepoServer pollRepo removeKey: self currentPollID.
self setIndex: self pollList size.
self changed: #pollList]
self setIndex: self pollList size]

Loading

0 comments on commit d2053d6

Please sign in to comment.