Seaside icon indicating copy to clipboard operation
Seaside copied to clipboard

Improvements for Web Components

Open marschall opened this issue 1 year ago • 4 comments

Improvements that allow applications with Web Components to run with a lower overhead.

  • Save only a single action continuation. Since the back button does not work with Web Components in general we only need to save a single action continuation. This should keep sessions smaller.
  • Dedicated action continuation. Since the back button does not work with Web Components in general we can make use of an optimized action continuation that:
    • does not redirect.
    • does not capture state.
    • does not restore state.

In theory these classes could be used in general for "back button less" Seaside applications. However this is quite an advanced topic so I think it's ok to "burry" these in the WebComponents package. Let me know what you think.

marschall avatar Oct 13 '24 15:10 marschall

Codecov Report

Attention: Patch coverage is 75.70093% with 26 lines in your changes missing coverage. Please review.

Project coverage is 50.03%. Comparing base (0f7d6f7) to head (f6be4f2). Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
...age/WASingleElementCache.class/instance/remove..st 0.00% 5 Missing :warning:
...nContinuation.class/instance/basicPerformAction.st 0.00% 4 Missing :warning:
...onentActionContinuation.class/instance/continue.st 0.00% 4 Missing :warning:
...nSession.class/instance/createContinuationCache.st 0.00% 3 Missing :warning:
...ActionContinuation.class/instance/jumpToAnchor..st 0.00% 3 Missing :warning:
...tActionContinuation.class/instance/restoreState.st 0.00% 3 Missing :warning:
...ctionContinuation.class/instance/shouldRedirect.st 0.00% 3 Missing :warning:
...tsLibrary.class/instance/seasideWebComponentsJs.st 0.00% 1 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1444      +/-   ##
==========================================
+ Coverage   49.42%   50.03%   +0.61%     
==========================================
  Files        9073     8946     -127     
  Lines       80086    79229     -857     
==========================================
+ Hits        39582    39645      +63     
+ Misses      40504    39584     -920     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Oct 13 '24 15:10 codecov[bot]

Is there a typo or two in https://github.com/marschall/Seaside/blob/master/repository/Seaside-WebComponents-Core.package/WAHeadlessComponent.class/README.md ?

Also, I wouldn't mind if the classes that are useful for SPA's are not buried, but more generally available. Perhaps in a SPA package?

adriaon avatar Oct 17 '24 14:10 adriaon

Is there a typo or two in https://github.com/marschall/Seaside/blob/master/repository/Seaside-WebComponents-Core.package/WAHeadlessComponent.class/README.md ?

Probably a rendering issue by GitHub. Check out the raw content

https://raw.githubusercontent.com/marschall/Seaside/refs/heads/master/repository/Seaside-WebComponents-Core.package/WAHeadlessComponent.class/README.md

Also, I wouldn't mind if the classes that are useful for SPA's are not buried, but more generally available. Perhaps in a SPA package?

What classes would you be interested in? WAWebComponentActionContinuation? Do you have a suggestion for a name?

Perhaps in a SPA package?

Maybe, but only if we have more than one class to go there.

marschall avatar Oct 18 '24 15:10 marschall

https://raw.githubusercontent.com/marschall/Seaside/refs/heads/master/repository/Seaside-WebComponents-Core.package/WAHeadlessComponent.class/README.md

Got it. Thanks

What classes would you be interested in? WAWebComponentActionContinuation? Do you have a suggestion for a name?

Perhaps in a SPA package?

Maybe, but only if we have more than one class to go there.

If I understand things correctly, i see

  • WAWebComponentActionContinuation
  • WASingleElementCache
  • WASingleContinuationSession

as candidates.

Maybe something like Seaside-SingleContinuation-Core as a name? Or maybe rename Seaside-WebComponents-Core as such?

Cheers, Adriaan.

adriaon avatar Oct 18 '24 16:10 adriaon