From f13daaaf3950d09ddd1e9c30cefbb5c8d34d49c6 Mon Sep 17 00:00:00 2001 From: Maximiliano Tabacman Date: Sun, 29 Dec 2024 00:16:52 -0300 Subject: [PATCH 1/3] Simplified event dispatcher protocol --- ...ombinedEventInterpreterDispatcher.class.st | 24 ------------------- .../EventInterpreterDispatcher.class.st | 24 ------------------- ...ventInterpreterDispatcherBehavior.class.st | 8 +++---- 3 files changed, 4 insertions(+), 52 deletions(-) diff --git a/source/Willow-Core/CombinedEventInterpreterDispatcher.class.st b/source/Willow-Core/CombinedEventInterpreterDispatcher.class.st index 1b09461c..2647fa2f 100644 --- a/source/Willow-Core/CombinedEventInterpreterDispatcher.class.st +++ b/source/Willow-Core/CombinedEventInterpreterDispatcher.class.st @@ -21,18 +21,6 @@ CombinedEventInterpreterDispatcher class >> combiningInterpretersOfAll: aWebView ^ self combiningAll: ( aWebViewCollection collect: #on ) ] -{ #category : 'configuring' } -CombinedEventInterpreterDispatcher >> change [ - - ^ CombinedWebInteractionInterpreter combining: ( eventInterpreterDispatchers collect: #change ) -] - -{ #category : 'configuring' } -CombinedEventInterpreterDispatcher >> click [ - - ^ CombinedWebInteractionInterpreter combining: ( eventInterpreterDispatchers collect: #click ) -] - { #category : 'configuring' } CombinedEventInterpreterDispatcher >> eventNamed: anEventName [ @@ -46,18 +34,6 @@ CombinedEventInterpreterDispatcher >> initializeCombiningAll: anEventInterpreter eventInterpreterDispatchers := anEventInterpreterDispatcherCollection ] -{ #category : 'configuring' } -CombinedEventInterpreterDispatcher >> keyUp [ - - ^ CombinedWebInteractionInterpreter combining: ( eventInterpreterDispatchers collect: #keyUp ) -] - -{ #category : 'configuring' } -CombinedEventInterpreterDispatcher >> mouseOver [ - - ^ CombinedWebInteractionInterpreter combining: ( eventInterpreterDispatchers collect: #mouseOver ) -] - { #category : 'configuring' } CombinedEventInterpreterDispatcher >> trigger [ diff --git a/source/Willow-Core/EventInterpreterDispatcher.class.st b/source/Willow-Core/EventInterpreterDispatcher.class.st index 93defa39..aa46b20c 100644 --- a/source/Willow-Core/EventInterpreterDispatcher.class.st +++ b/source/Willow-Core/EventInterpreterDispatcher.class.st @@ -70,18 +70,6 @@ EventInterpreterDispatcher >> applyTo: aComponent on: aCanvas [ keysAndValuesDo: [ :event :interpreter | interpreter applyTo: aComponent on: aCanvas ] ] -{ #category : 'configuring' } -EventInterpreterDispatcher >> change [ - - ^ self eventNamed: #change -] - -{ #category : 'configuring' } -EventInterpreterDispatcher >> click [ - - ^ self eventNamed: #click -] - { #category : 'configuring' } EventInterpreterDispatcher >> eventNamed: anEventName [ @@ -96,18 +84,6 @@ EventInterpreterDispatcher >> initializeInterpretingByDefault: anEventName confi interpretersByEvent at: anEventName put: aWebInteractionInterpreter ] -{ #category : 'configuring' } -EventInterpreterDispatcher >> keyUp [ - - ^ self eventNamed: #keyup -] - -{ #category : 'configuring' } -EventInterpreterDispatcher >> mouseOver [ - - ^ self eventNamed: #mouseover -] - { #category : 'configuring' } EventInterpreterDispatcher >> trigger [ diff --git a/source/Willow-Core/EventInterpreterDispatcherBehavior.class.st b/source/Willow-Core/EventInterpreterDispatcherBehavior.class.st index 3d009057..4aa76c69 100644 --- a/source/Willow-Core/EventInterpreterDispatcherBehavior.class.st +++ b/source/Willow-Core/EventInterpreterDispatcherBehavior.class.st @@ -9,13 +9,13 @@ Class { { #category : 'configuring' } EventInterpreterDispatcherBehavior >> change [ - ^ self subclassResponsibility + ^ self eventNamed: #change ] { #category : 'configuring' } EventInterpreterDispatcherBehavior >> click [ - ^ self subclassResponsibility + ^ self eventNamed: #click ] { #category : 'configuring' } @@ -27,13 +27,13 @@ EventInterpreterDispatcherBehavior >> eventNamed: anEventName [ { #category : 'configuring' } EventInterpreterDispatcherBehavior >> keyUp [ - ^ self subclassResponsibility + ^ self eventNamed: #keyup ] { #category : 'configuring' } EventInterpreterDispatcherBehavior >> mouseOver [ - ^ self subclassResponsibility + ^ self eventNamed: #mouseover ] { #category : 'configuring' } From 0cdf73748058dfabe2d1ec311f5330ea0a665d17 Mon Sep 17 00:00:00 2001 From: Maximiliano Tabacman Date: Sun, 29 Dec 2024 00:19:06 -0300 Subject: [PATCH 2/3] Added tag to project --- .project | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.project b/.project index 6b6d3d70..c120d339 100644 --- a/.project +++ b/.project @@ -1,3 +1,4 @@ { - 'srcDirectory' : 'source' + 'srcDirectory' : 'source', + 'tags': [ 'Buenos Aires Smalltalk' ] } \ No newline at end of file From 4a6ff2abe4bf4a8c1bcc8b762f891ac84aa3df05 Mon Sep 17 00:00:00 2001 From: Maximiliano Tabacman Date: Wed, 1 Jan 2025 09:09:41 -0300 Subject: [PATCH 3/3] Adapted tests to new encoding used in Seaside for embedded scripts. --- .../CombinedWebInteractionInterpreterTest.class.st | 4 ++-- source/Willow-Core-Tests/DialogOpeningCommandTest.class.st | 2 +- .../Willow-Core-Tests/LoadingNotificationCommandTest.class.st | 4 ++-- .../PeriodicallyRenderedWebViewTest.class.st | 2 +- source/Willow-Core-Tests/RenderingCommandTest.class.st | 2 +- .../TemporarilyDisablingCommandTest.class.st | 2 +- .../Willow-Core-Tests/WebInteractionInterpreterTest.class.st | 4 ++-- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/source/Willow-Core-Tests/CombinedWebInteractionInterpreterTest.class.st b/source/Willow-Core-Tests/CombinedWebInteractionInterpreterTest.class.st index a26ece19..06cb72ea 100644 --- a/source/Willow-Core-Tests/CombinedWebInteractionInterpreterTest.class.st +++ b/source/Willow-Core-Tests/CombinedWebInteractionInterpreterTest.class.st @@ -704,7 +704,7 @@ CombinedWebInteractionInterpreterTest >> testShowLoadingNotificationDisplayingAp self assert: html equals: - '' + '' ] { #category : 'tests - Configuring - DOM' } @@ -723,7 +723,7 @@ CombinedWebInteractionInterpreterTest >> testShowLoadingNotificationStyledAsAll self assert: html equals: - '' + '' ] { #category : 'tests - Configuring - DOM' } diff --git a/source/Willow-Core-Tests/DialogOpeningCommandTest.class.st b/source/Willow-Core-Tests/DialogOpeningCommandTest.class.st index 8e5ff585..e74df1aa 100644 --- a/source/Willow-Core-Tests/DialogOpeningCommandTest.class.st +++ b/source/Willow-Core-Tests/DialogOpeningCommandTest.class.st @@ -37,7 +37,7 @@ DialogOpeningCommandTest >> testModelLoadingInstructions [ self assert: html equals: - '' + '' ] { #category : 'tests-accessing' } diff --git a/source/Willow-Core-Tests/LoadingNotificationCommandTest.class.st b/source/Willow-Core-Tests/LoadingNotificationCommandTest.class.st index c224ffef..b8061143 100644 --- a/source/Willow-Core-Tests/LoadingNotificationCommandTest.class.st +++ b/source/Willow-Core-Tests/LoadingNotificationCommandTest.class.st @@ -57,7 +57,7 @@ LoadingNotificationCommandTest >> testPriorityActions [ self assert: html equals: - '' + '' ] { #category : 'tests-accessing' } @@ -74,7 +74,7 @@ LoadingNotificationCommandTest >> testPriorityActionsWithCustomView [ self assert: html equals: - '' + '' ] { #category : 'tests-testing' } diff --git a/source/Willow-Core-Tests/PeriodicallyRenderedWebViewTest.class.st b/source/Willow-Core-Tests/PeriodicallyRenderedWebViewTest.class.st index 20cbab16..f854cb26 100644 --- a/source/Willow-Core-Tests/PeriodicallyRenderedWebViewTest.class.st +++ b/source/Willow-Core-Tests/PeriodicallyRenderedWebViewTest.class.st @@ -96,5 +96,5 @@ PeriodicallyRenderedWebViewTest >> testScriptToRefreshAndRenderContentOn [ self assert: html equals: - '
' + '
' ] diff --git a/source/Willow-Core-Tests/RenderingCommandTest.class.st b/source/Willow-Core-Tests/RenderingCommandTest.class.st index e49421bc..ad700af4 100644 --- a/source/Willow-Core-Tests/RenderingCommandTest.class.st +++ b/source/Willow-Core-Tests/RenderingCommandTest.class.st @@ -41,7 +41,7 @@ RenderingCommandTest >> testModelLoadingInstructions [ self assert: html equals: - '' + '' ] { #category : 'tests-accessing' } diff --git a/source/Willow-Core-Tests/TemporarilyDisablingCommandTest.class.st b/source/Willow-Core-Tests/TemporarilyDisablingCommandTest.class.st index 839b7077..34bd13ca 100644 --- a/source/Willow-Core-Tests/TemporarilyDisablingCommandTest.class.st +++ b/source/Willow-Core-Tests/TemporarilyDisablingCommandTest.class.st @@ -35,7 +35,7 @@ TemporarilyDisablingCommandTest >> testPriorityActions [ self assert: html equals: - '' + '' ] { #category : 'tests-testing' } diff --git a/source/Willow-Core-Tests/WebInteractionInterpreterTest.class.st b/source/Willow-Core-Tests/WebInteractionInterpreterTest.class.st index 62dffe13..7f95a37a 100644 --- a/source/Willow-Core-Tests/WebInteractionInterpreterTest.class.st +++ b/source/Willow-Core-Tests/WebInteractionInterpreterTest.class.st @@ -753,7 +753,7 @@ WebInteractionInterpreterTest >> testShowLoadingNotificationDisplayingApplying [ self assert: html equals: - '' + '' ] { #category : 'tests - Configuring - DOM' } @@ -769,7 +769,7 @@ WebInteractionInterpreterTest >> testShowLoadingNotificationStyledAsAll [ self assert: html equals: - '' + '' ] { #category : 'tests - Configuring - DOM' }