Skip to content

[WIP] Asset reload#37

Open
y2kbugger wants to merge 3 commits intoflorimondmanca:masterfrom
y2kbugger:asset_reload
Open

[WIP] Asset reload#37
y2kbugger wants to merge 3 commits intoflorimondmanca:masterfrom
y2kbugger:asset_reload

Conversation

@y2kbugger
Copy link
Copy Markdown

This is currently a hacky proof of concept for hot-reloading only a specific asset.

Basically I've updated the Arel server to tell the client which file has changed.
Then I've also made the client be able to just patch in the specific change.

Right now I have hardcoded it to only patch reload css files, and only if no other file types have been changed.

This not only unlocks a much faster reload, but for more complex apps, it allow you to get into a certain state and then fiddle with the css without losing state.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 26, 2024

Codecov Report

Attention: Patch coverage is 70.58824% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 97.59%. Comparing base (d98aa72) to head (9136cb5).

Files Patch % Lines
src/arel/_app.py 70.00% 3 Missing ⚠️
src/arel/_notify.py 71.42% 2 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##            master      #37      +/-   ##
===========================================
- Coverage   100.00%   97.59%   -2.41%     
===========================================
  Files           10       10              
  Lines          196      208      +12     
===========================================
+ Hits           196      203       +7     
- Misses           0        5       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@y2kbugger
Copy link
Copy Markdown
Author

css_asset_reload
Quick demo recording of the near instant latency

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants