-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve UnorderedListWebView so it can be used with the ListLabelingC…
…ommand.
- Loading branch information
Showing
27 changed files
with
83 additions
and
46 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
...package/Html5ComponentSupplierTest.class/instance/testAsynchronicButtonLabeledApplying.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,4 @@ | ||
tests-Accessing | ||
tests-Supplying | ||
testAsynchronicButtonLabeledApplying | ||
|
||
| supplier button html | | ||
|
2 changes: 1 addition & 1 deletion
2
...e/Willow-Tests.package/Html5ComponentSupplierTest.class/instance/testDateFieldApplying.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,4 @@ | ||
tests-Accessing | ||
tests-Supplying | ||
testDateFieldApplying | ||
|
||
| supplier field html | | ||
|
2 changes: 1 addition & 1 deletion
2
...illow-Tests.package/Html5ComponentSupplierTest.class/instance/testDropdownListApplying.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,4 @@ | ||
tests-Accessing | ||
tests-Supplying | ||
testDropdownListApplying | ||
|
||
| supplier dropdownList html | | ||
|
2 changes: 1 addition & 1 deletion
2
...ests.package/Html5ComponentSupplierTest.class/instance/testSingleLineTextFieldApplying.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,4 @@ | ||
tests-Accessing | ||
tests-Supplying | ||
testSingleLineTextFieldApplying | ||
|
||
| supplier textField html | | ||
|
2 changes: 1 addition & 1 deletion
2
...tml5ComponentSupplierTest.class/instance/testSynchronicButtonLabeledApplyingEvaluating.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,4 @@ | ||
tests-Accessing | ||
tests-Supplying | ||
testSynchronicButtonLabeledApplyingEvaluating | ||
|
||
| supplier button html | | ||
|
15 changes: 15 additions & 0 deletions
15
...ml5ComponentSupplierTest.class/instance/testUnorderedListApplyingListingApplyingToEach.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,15 @@ | ||
tests-Supplying | ||
testUnorderedListApplyingListingApplyingToEach | ||
|
||
| supplier list html | | ||
|
||
supplier := Html5ComponentSupplier new. | ||
|
||
list := supplier | ||
unorderedListApplying: (ListLabelingCommand with: [ :item | 'N.<1p>' expandMacrosWith: item ]) | ||
listing: #(1 2 3) | ||
applyingToEach: (ComponentClassificationCommand toStyleWith: 'item'). | ||
|
||
html := self render: list. | ||
|
||
self assert: html equals: '<ul><li class="item">N.1</li><li class="item">N.2</li><li class="item">N.3</li></ul>' |
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
12 changes: 8 additions & 4 deletions
12
source/Willow-Tests.package/ListItemWebViewTest.class/instance/testRenderContentOn.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,9 +1,13 @@ | ||
tests-rendering | ||
testRenderContentOn | ||
|
||
| container html | | ||
| html | | ||
|
||
container := ListItemWebView itemizing: 'Item' applying: CompositeComponentCommand empty. | ||
html := self render: container. | ||
html := self | ||
renderUsing: [ :canvas | | ||
| list | | ||
|
||
self assert: html equals: '<li>Item</li>' | ||
list := canvas unorderedList. | ||
list with: [ canvas render: (ListItemWebView itemizing: 'Item' containedIn: list applying: CompositeComponentCommand empty) ] ]. | ||
|
||
self assert: html equals: '<ul><li>Item</li></ul>' |
13 changes: 9 additions & 4 deletions
13
...illow-Tests.package/ListItemWebViewTest.class/instance/testRenderContentOnWithCommands.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,9 +1,14 @@ | ||
tests-rendering | ||
testRenderContentOnWithCommands | ||
|
||
| container html | | ||
| html | | ||
|
||
container := ListItemWebView itemizing: 'Item' applying: (ComponentClassificationCommand toStyleWith: 'item'). | ||
html := self render: container. | ||
html := self | ||
renderUsing: [ :canvas | | ||
| list | | ||
|
||
self assert: html equals: '<li class="item">Item</li>' | ||
list := canvas unorderedList. | ||
list | ||
with: [ canvas render: (ListItemWebView itemizing: 'Item' containedIn: list applying: (ComponentClassificationCommand toStyleWith: 'item')) ] ]. | ||
|
||
self assert: html equals: '<ul><li class="item">Item</li></ul>' |
4 changes: 2 additions & 2 deletions
4
source/Willow-Tests.package/ListItemWebViewTest.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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"instance" : { | ||
"testRenderContentOn" : "GabrielOmarCotelli 1/31/2017 14:21", | ||
"testRenderContentOnWithCommands" : "GabrielOmarCotelli 1/31/2017 14:22" | ||
"testRenderContentOn" : "GabrielOmarCotelli 5/2/2017 17:50", | ||
"testRenderContentOnWithCommands" : "GabrielOmarCotelli 5/2/2017 17:50" | ||
}, | ||
"class" : { } | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
4 changes: 4 additions & 0 deletions
4
...FrontendComponentSupplier.class/instance/unorderedListApplying.listing.applyingToEach..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 @@ | ||
Supplying | ||
unorderedListApplying: aCommandToList listing: aCollection applyingToEach: aCommandToItem | ||
|
||
^ self subclassResponsibility |
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
4 changes: 4 additions & 0 deletions
4
...ge/Html5ComponentSupplier.class/instance/unorderedListApplying.listing.applyingToEach..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 @@ | ||
Supplying | ||
unorderedListApplying: aCommandToList listing: aCollection applyingToEach: aCommandToItem | ||
|
||
^ UnorderedListWebView applying: aCommandToList listing: aCollection applyingToEach: aCommandToItem |
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
4 changes: 0 additions & 4 deletions
4
source/Willow.package/ListItemWebView.class/class/itemizing.applying..st
This file was deleted.
Oops, something went wrong.
4 changes: 4 additions & 0 deletions
4
source/Willow.package/ListItemWebView.class/class/itemizing.containedIn.applying..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 @@ | ||
instance creation | ||
itemizing: anObject containedIn: aList applying: aComponentCommand | ||
|
||
^ self new initializeItemizing: anObject containedIn: aList applying: aComponentCommand |
5 changes: 0 additions & 5 deletions
5
source/Willow.package/ListItemWebView.class/instance/initializeItemizing.applying..st
This file was deleted.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
...illow.package/ListItemWebView.class/instance/initializeItemizing.containedIn.applying..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 @@ | ||
initialize-release | ||
initializeItemizing: anObject containedIn: aList applying: aComponentCommand | ||
|
||
item := anObject. | ||
list := aList. | ||
commandToComponent := aComponentCommand |
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
6 changes: 3 additions & 3 deletions
6
source/Willow.package/ListItemWebView.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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
{ | ||
"instance" : { | ||
"initializeItemizing:applying:" : "MaximilianoTabacman 1/31/2017 00:33", | ||
"renderContentOn:" : "MaximilianoTabacman 1/31/2017 00:32" | ||
"initializeItemizing:containedIn:applying:" : "GabrielOmarCotelli 5/2/2017 17:38", | ||
"renderContentOn:" : "GabrielOmarCotelli 5/2/2017 17:38" | ||
}, | ||
"class" : { | ||
"itemizing:applying:" : "MaximilianoTabacman 1/31/2017 00:33" | ||
"itemizing:containedIn:applying:" : "GabrielOmarCotelli 5/2/2017 17:39" | ||
} | ||
} |
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
6 changes: 3 additions & 3 deletions
6
...package/UnorderedListWebView.class/instance/initializeApplying.listing.applyingToEach..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,6 +1,6 @@ | ||
initialize-release | ||
initializeApplying: aComponentCommand listing: anElementCollection applyingToEach: anElementCommand | ||
|
||
listItemViews := anElementCollection | ||
collect: [ :anElement | ListItemWebView itemizing: anElement applying: anElementCommand ]. | ||
commandToComponent := aComponentCommand | ||
elements := anElementCollection. | ||
commandToItem := anElementCommand. | ||
commandToList := aComponentCommand |
11 changes: 5 additions & 6 deletions
11
source/Willow.package/UnorderedListWebView.class/instance/renderContentOn..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,10 +1,9 @@ | ||
rendering | ||
renderContentOn: aCanvas | ||
|
||
"The order is relevant" | ||
|
||
| component | | ||
| list | | ||
|
||
component := aCanvas unorderedList. | ||
commandToComponent applyTo: component on: aCanvas. | ||
component with: listItemViews | ||
list := aCanvas unorderedList. | ||
"The order is relevant" | ||
commandToList applyTo: list on: aCanvas. | ||
list with: [ elements do: [ :anElement | aCanvas render: (ListItemWebView itemizing: anElement containedIn: list applying: commandToItem) ] ] |
4 changes: 2 additions & 2 deletions
4
source/Willow.package/UnorderedListWebView.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
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
Binary file not shown.