Skip to content

Commit d13725a

Browse files
authored
Merge pull request #1449 from SeasideSt/hotwired-dev
Hotwired improvements
2 parents 8642094 + fb1f675 commit d13725a

File tree

43 files changed

+198
-10
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+198
-10
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ jobs:
2121
experimental: true
2222
- smalltalk: Squeak64-6.0
2323
experimental: true
24-
- smalltalk: Squeak64-5.3
25-
experimental: true
2624
continue-on-error: ${{ matrix.experimental }}
2725
name: ${{ matrix.smalltalk }}
2826
steps:

repository/BaselineOfSeaside3.package/BaselineOfSeaside3.class/instance/baselinecommon..st

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,18 @@ baselinecommon: spec
100100
package: 'Seaside-Tests-WebComponents' with: [
101101
spec requires: #('Seaside-WebComponents-Core' 'Seaside-Tests-Core' 'Seaside-Session' 'Seaside-Examples'). ];
102102
package: 'Seaside-Tests-Parasol' with: [
103-
spec requires: #('Parasol' 'Seaside-Tests-Functional' 'Seaside-Tools-Core') ].
103+
spec requires: #('Parasol' 'Seaside-Tests-Functional' 'Seaside-Tools-Core') ];
104+
package: 'Seaside-Tests-HotwireTurbo' with: [
105+
spec requires: #('Seaside-Tests-Functional' 'Seaside-HotwireTurbo-Core') ].
106+
104107
spec
105108
group: 'default' with: #('Core' 'JSON' 'Email' 'Javascript' 'JQuery' 'JQueryUI' 'Seaside-Examples' 'Seaside-Welcome');
106109
group: 'Base' with: #('Core');
107110
group: 'CI' with: #('Tests' 'Development Tests' 'Hotwired');
108111
group: 'All' with: #('Tests' 'Development Tests');
109112

110113
group: 'Core' with: #('Seaside-Core' 'Seaside-Continuation' 'Seaside-Canvas' 'Seaside-Session' 'Seaside-Component' 'Seaside-RenderLoop' 'Seaside-Tools-Core' 'Seaside-Flow' 'Seaside-Environment' 'Seaside-Widgets' );
111-
group: 'Tests' with: #('Core' 'Seaside-Tests-Core' 'Seaside-Tests-Canvas' 'Seaside-Tests-Session' 'Seaside-Tests-Component' 'Seaside-Tests-RenderLoop' 'Seaside-Tests-Environment' 'Seaside-Tests-Flow' 'Seaside-Tests-UTF8' 'Seaside-Tests-InternetExplorer' 'Seaside-Tests-Email' 'Seaside-Tests-Examples' 'Seaside-Tests-WebComponents' 'RSS Tests' 'Welcome Tests' 'REST Tests' 'Swagger Tests' 'Seaside-Tests-Parasol');
114+
group: 'Tests' with: #('Core' 'Seaside-Tests-Core' 'Seaside-Tests-Canvas' 'Seaside-Tests-Session' 'Seaside-Tests-Component' 'Seaside-Tests-RenderLoop' 'Seaside-Tests-Environment' 'Seaside-Tests-Flow' 'Seaside-Tests-UTF8' 'Seaside-Tests-InternetExplorer' 'Seaside-Tests-Email' 'Seaside-Tests-Examples' 'Seaside-Tests-WebComponents' 'RSS Tests' 'Welcome Tests' 'REST Tests' 'Swagger Tests' 'Seaside-Tests-Parasol' 'Seaside-Tests-HotwireTurbo');
112115
group: 'Hotwired' with: #('Seaside-HotwireTurbo-Core');
113116
group: 'Development' with: #('Core' 'Seaside-Development');
114117
group: 'Development Tests' with: #('Development' 'Core' 'Seaside-Tests-Development');

repository/JQuery-Examples.package/WATodoWithJQuery.class/instance/scriptToSerializeEditOn..st

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ scriptToSerializeEditOn: html
1212
passengers: ((html jQuery expression: (JSStream on:'event.target')) closest:'li');
1313
callback: [ :id | itemId := id ]
1414
value: (JSStream on:'$(event.target).closest("li").get(0).id');
15-
script: [ :s | s << (((s jQuery id: itemId) find: 'label') html: currentItem description) ];
16-
onComplete: ((((html jQuery expression: (JSStream on: 'event.target')) closest:'li') find: '.edit') hide, (((html jQuery expression: (JSStream on: 'event.target')) closest:'li') find: 'label') show))
15+
script: [ :s | s << (((s jQuery id: itemId) find: 'label') html: currentItem description) ];
16+
onComplete:
17+
((((html jQuery expression: (JSStream on: 'event.target')) closest:'li') find: '.edit') hide,
18+
(((html jQuery expression: (JSStream on: 'event.target')) closest:'li') find: 'label') show))
1719
asFunction: #(event))
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
SystemOrganization addCategory: #'JQuery-Examples'!
1+
self packageOrganizer ensurePackage: #'JQuery-Examples' withTags: #()!
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
attributes
2+
turboPrefetch: aString
3+
"Prefetching links is enabled by default since Turbo v8,
4+
but you can disable it by adding this meta tag to your page with value false."
5+
6+
self name: 'turbo-prefetch'.
7+
self content: aString
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
*Seaside-HotwireTurbo-Core
2+
turboStreamCallback: aValuable
3+
4+
self dataAttributeAt: 'turbo-stream' put: true.
5+
self url addField: (self storeCallback: ((WATurboStreamCallback on: aValuable) context: canvas context))
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
*Seaside-HotwireTurbo-Core
2+
turbo: aBoolean
3+
4+
"data-turbo=""false"" disables Turbo Drive on links and forms including descendants. To reenable when an ancestor has opted out, use data-turbo=""true"". Be careful: when Turbo Drive is disabled, browsers treat link clicks as normal, but native adapters may exit the app."
5+
6+
self dataAttributeAt: 'turbo' put: aBoolean
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
*Seaside-HotwireTurbo-Core
2+
turboAction: aString
3+
4+
(#('replace' 'advance') includes: aString) ifFalse: [
5+
self error: 'Argument for turboAction must be either ''replace'' or ''advance''.' ].
6+
self dataAttributeAt: 'turbo-action' put: aString
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
*Seaside-HotwireTurbo-Core
2+
turboTarget: aString
3+
4+
"data-turbo-frame identifies the Turbo Frame to navigate. Refer to the Frames documentation for further details."
5+
6+
self dataAttributeAt: 'turbo-frame' put: aString

repository/Seaside-HotwireTurbo-Core.package/WATurboCallbackProcessingActionContinuation.class/instance/continue.st

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ continue
66
ifTrue: [
77
"TODO: perhaps it's better to have a different rendercontinuation class for rendering a turboframe vs rendering a turbostream"
88
renderContinuation := self createTurboRenderContinuation.
9+
renderContinuation captureState.
910
self redirectToContinuation: renderContinuation.
1011
^ self ]
1112
ifFalse: [ super continue ]

0 commit comments

Comments
 (0)