Skip to content

Commit

Permalink
add turbo tags to forms
Browse files Browse the repository at this point in the history
  • Loading branch information
Johan Brichau committed Oct 30, 2024
1 parent cdac64c commit 02a2236
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*Seaside-HotwireTurbo-Core
turbo: aBoolean

"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."

self dataAttributeAt: 'turbo' put: aBoolean

Check warning on line 6 in repository/Seaside-HotwireTurbo-Core.package/WABasicFormTag.extension/instance/turbo..st

View check run for this annotation

Codecov / codecov/patch

repository/Seaside-HotwireTurbo-Core.package/WABasicFormTag.extension/instance/turbo..st#L1-L6

Added lines #L1 - L6 were not covered by tests
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*Seaside-HotwireTurbo-Core
turboAction: aString

(#('replace' 'advance') includes: aString) ifFalse: [
self error: 'Argument for turboAction must be either ''replace'' or ''advance''.' ].
self dataAttributeAt: 'turbo-action' put: aString

Check warning on line 6 in repository/Seaside-HotwireTurbo-Core.package/WABasicFormTag.extension/instance/turboAction..st

View check run for this annotation

Codecov / codecov/patch

repository/Seaside-HotwireTurbo-Core.package/WABasicFormTag.extension/instance/turboAction..st#L1-L6

Added lines #L1 - L6 were not covered by tests
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*Seaside-HotwireTurbo-Core
turboTarget: aString

"data-turbo-frame identifies the Turbo Frame to navigate. Refer to the Frames documentation for further details."

self dataAttributeAt: 'turbo-frame' put: aString

Check warning on line 6 in repository/Seaside-HotwireTurbo-Core.package/WABasicFormTag.extension/instance/turboTarget..st

View check run for this annotation

Codecov / codecov/patch

repository/Seaside-HotwireTurbo-Core.package/WABasicFormTag.extension/instance/turboTarget..st#L1-L6

Added lines #L1 - L6 were not covered by tests
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ processTurboFrameRendering: aResponse
visitor: ((WATurboFramePresenterGuide client: (WARenderVisitor context: renderContext)) id: turboframeId)
during: [
self presenter renderWithContext: renderContext ]
"self presenter allPresentersDo: [ :p | ((p isKindOf: WATurboFrame) and: [ turboframeId = p id ]) ifTrue:[ self halt. p renderWithContext: renderContext ] ]" ].
"self presenter allPresentersDo: [ :p | ((p isKindOf: WATurboFrame) and: [ turboframeId = p id ]) ifTrue:[ self halt. p renderWithContext: renderContext ] ] ]" ].

Check warning on line 19 in repository/Seaside-HotwireTurbo-Core.package/WATurboRenderPhaseContinuation.class/instance/processTurboFrameRendering..st

View check run for this annotation

Codecov / codecov/patch

repository/Seaside-HotwireTurbo-Core.package/WATurboRenderPhaseContinuation.class/instance/processTurboFrameRendering..st#L19

Added line #L19 was not covered by tests
document scriptGenerator closeOn: document

0 comments on commit 02a2236

Please sign in to comment.