Skip to content

Commit

Permalink
Add constants accessing support
Browse files Browse the repository at this point in the history
  • Loading branch information
gcotelli committed Sep 26, 2017
1 parent e6cee75 commit bf4b9ae
Show file tree
Hide file tree
Showing 16 changed files with 82 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
A WillowConstantsProviderTest is a test class for testing the behavior of WillowConstantsProvider
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
tests
testBlockExtension

| html |

html := self
apply:
[ :command :constants | command script js: [ :canvas | canvas jQuery this onClick: (canvas jQuery id: constants willow dialogSectionName) clone ] ]
asWebComponentCommand
toComponentDefinedBy: [ :canvas | canvas anchor ].

self
assert: html
equals: '<a id="id1"></a><script type="text/javascript">$("#id1").click(function(){$("#willow-dialog-section").clone()});</script>'
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
tests
testCssConstants

[ :command :constants |
self
assert: constants css inherit equals: CssConstants inherit;
assert: constants cssFonts allPetiteCaps equals: CssFontConstants allPetiteCaps;
assert: constants cssMediaQuery landscape equals: CssMediaQueryConstants landscape ] asWebComponentCommand
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"instance" : {
"testCssConstants" : "GabrielOmarCotelli 9/26/2017 10:26",
"testBlockExtension" : "GabrielOmarCotelli 9/26/2017 10:20"
},
"class" : { }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"commentStamp" : "<historical>",
"super" : "WillowTestCase",
"category" : "Willow-Tests-Frontend",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"instvars" : [ ],
"name" : "WillowConstantsProviderTest",
"type" : "normal"
}
2 changes: 1 addition & 1 deletion source/Willow-Tests.package/monticello.meta/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
(name 'Willow-Tests-GabrielOmarCotelli.107' message 'Changed empty command block' id 'bd5cb66f-2c16-0d00-91c1-138005bc4e10' date '22 September 2017' time '2:40:05.83307 pm' author 'GabrielOmarCotelli' ancestors ((name 'Willow-Tests-GabrielOmarCotelli.106' message 'Implemented Command Builder DSL' id '407f5a81-1b16-0d00-b350-88150130e744' date '21 September 2017' time '6:28:07.358453 pm' author 'GabrielOmarCotelli' ancestors ((name 'Willow-Tests-GabrielOmarCotelli.105' message 'Removed JQuery 2 Libraries' id 'c4127d19-1816-0d00-841d-2f170f0982f2' date '21 September 2017' time '2:24:19.892125 pm' author 'GabrielOmarCotelli' ancestors ((name 'Willow-Tests-GabrielOmarCotelli.104' message 'Added support for conditional component commands' id 'a23bc16e-1616-0d00-b584-116d0609c8d9' date '21 September 2017' time '12:25:00.487797 pm' author 'GabrielOmarCotelli' ancestors ((name 'Willow-Tests-GabrielOmarCotelli.103' message 'Add support to periodically rendered view to stop on a condition' id '370d0509-1415-0d00-8265-cbe903f667f9' date '8 September 2017' time '4:08:12.093938 pm' author 'GabrielOmarCotelli' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())
(name 'Willow-Tests-GabrielOmarCotelli.108' message 'Add constants accessing support' id '63ae1d75-7916-0d00-8e9e-b820022b218c' date '26 September 2017' time '10:33:28.97211 am' author 'GabrielOmarCotelli' ancestors ((name 'Willow-Tests-GabrielOmarCotelli.107' message 'Changed empty command block' id 'bd5cb66f-2c16-0d00-91c1-138005bc4e10' date '22 September 2017' time '2:40:05.83307 pm' author 'GabrielOmarCotelli' ancestors ((name 'Willow-Tests-GabrielOmarCotelli.106' message 'Implemented Command Builder DSL' id '407f5a81-1b16-0d00-b350-88150130e744' date '21 September 2017' time '6:28:07.358453 pm' author 'GabrielOmarCotelli' ancestors ((name 'Willow-Tests-GabrielOmarCotelli.105' message 'Removed JQuery 2 Libraries' id 'c4127d19-1816-0d00-841d-2f170f0982f2' date '21 September 2017' time '2:24:19.892125 pm' author 'GabrielOmarCotelli' ancestors ((name 'Willow-Tests-GabrielOmarCotelli.104' message 'Added support for conditional component commands' id 'a23bc16e-1616-0d00-b584-116d0609c8d9' date '21 September 2017' time '12:25:00.487797 pm' author 'GabrielOmarCotelli' ancestors ((name 'Willow-Tests-GabrielOmarCotelli.103' message 'Add support to periodically rendered view to stop on a condition' id '370d0509-1415-0d00-8265-cbe903f667f9' date '8 September 2017' time '4:08:12.093938 pm' author 'GabrielOmarCotelli' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*Willow
asWebComponentCommand

^ (self cull: WebComponentCommandBuilder new) ifNil: [ CompositeComponentCommand empty ]
^ (self cull: WebComponentCommandBuilder new cull: WillowConstantsProvider new) ifNil: [ CompositeComponentCommand empty ]
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"instance" : {
"asWebComponentCommand" : "GabrielOmarCotelli 9/22/2017 14:02"
"asWebComponentCommand" : "GabrielOmarCotelli 9/26/2017 09:56"
},
"class" : { }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
I'm an entry point providing access to several constants
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Accessing
css

^ CssConstants
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Accessing
cssFonts

^ CssFontConstants
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Accessing
cssMediaQuery

^ CssMediaQueryConstants
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Accessing
willow

^ WillowConstants
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"instance" : {
"cssMediaQuery" : "GabrielOmarCotelli 9/26/2017 10:26",
"cssFonts" : "GabrielOmarCotelli 9/26/2017 10:26",
"willow" : "GabrielOmarCotelli 9/26/2017 10:05",
"css" : "GabrielOmarCotelli 9/26/2017 10:25"
},
"class" : { }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"commentStamp" : "GabrielOmarCotelli 9/26/2017 09:56",
"super" : "GRObject",
"category" : "Willow-Frontend",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"instvars" : [ ],
"name" : "WillowConstantsProvider",
"type" : "normal"
}
2 changes: 1 addition & 1 deletion source/Willow.package/monticello.meta/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
(name 'Willow-GabrielOmarCotelli.191' message 'Changed asWebComponentCommand to accept empty blocks with arguments' id 'b9afc068-2c16-0d00-91c0-6d6905bc4e10' date '22 September 2017' time '2:38:09.069136 pm' author 'GabrielOmarCotelli' ancestors ((name 'Willow-GabrielOmarCotelli.190' message 'Implemented Command Builder DSL' id '8d0a4f80-1b16-0d00-b34f-9cd90130e744' date '21 September 2017' time '6:27:49.830485 pm' author 'GabrielOmarCotelli' ancestors ((name 'Willow-GabrielOmarCotelli.189' message 'Removed JQuery 2 Libraries' id 'ecb08218-1816-0d00-841c-f8050f0982f2' date '21 September 2017' time '2:24:03.483056 pm' author 'GabrielOmarCotelli' ancestors ((name 'Willow-GabrielOmarCotelli.188' message 'Added support for conditional component commands' id '2a050e6e-1616-0d00-b583-47600609c8d9' date '21 September 2017' time '12:24:48.742851 pm' author 'GabrielOmarCotelli' ancestors ((name 'Willow-GabrielOmarCotelli.187' message 'Add support to periodically rendered view to stop on a condition' id '9772ba01-1415-0d00-8264-d9ea03f667f9' date '8 September 2017' time '4:06:09.764158 pm' author 'GabrielOmarCotelli' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())
(name 'Willow-GabrielOmarCotelli.192' message 'Add constants accessing support' id 'e1ba9a73-7916-0d00-8e9d-d730022b218c' date '26 September 2017' time '10:33:03.612849 am' author 'GabrielOmarCotelli' ancestors ((name 'Willow-GabrielOmarCotelli.191' message 'Changed asWebComponentCommand to accept empty blocks with arguments' id 'b9afc068-2c16-0d00-91c0-6d6905bc4e10' date '22 September 2017' time '2:38:09.069136 pm' author 'GabrielOmarCotelli' ancestors ((name 'Willow-GabrielOmarCotelli.190' message 'Implemented Command Builder DSL' id '8d0a4f80-1b16-0d00-b34f-9cd90130e744' date '21 September 2017' time '6:27:49.830485 pm' author 'GabrielOmarCotelli' ancestors ((name 'Willow-GabrielOmarCotelli.189' message 'Removed JQuery 2 Libraries' id 'ecb08218-1816-0d00-841c-f8050f0982f2' date '21 September 2017' time '2:24:03.483056 pm' author 'GabrielOmarCotelli' ancestors ((name 'Willow-GabrielOmarCotelli.188' message 'Added support for conditional component commands' id '2a050e6e-1616-0d00-b583-47600609c8d9' date '21 September 2017' time '12:24:48.742851 pm' author 'GabrielOmarCotelli' ancestors ((name 'Willow-GabrielOmarCotelli.187' message 'Add support to periodically rendered view to stop on a condition' id '9772ba01-1415-0d00-8264-d9ea03f667f9' date '8 September 2017' time '4:06:09.764158 pm' author 'GabrielOmarCotelli' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())

0 comments on commit bf4b9ae

Please sign in to comment.