dioxus icon indicating copy to clipboard operation
dioxus copied to clipboard

Partially Fix Hotreload

Open DogeDark opened this issue 1 year ago • 4 comments

  • Normalizes all template names to follow foo/bar/baz.rs
  • Fixes a caching issue on Web with re-sending the templates that occurred before a full reload.

This gets hot reloading working on Web for the Tailwind example. Desktop requires more work as it's affected by #1586 and #2486.

I noticed that there were two separate socket systems between Web & Desktop. I think these should be merged into the Web's socket system with the communication models being standardized between them. This would also allow hot reload to a mobile device from the host machine in the future.

Half-Fixes #2180 but should fix any tailwind/hotreload in cases where \n or \t aren't used in RSX.

Testing: To test if the template path name standardization logic works correctly between platforms.

  • [x] Windows
  • [x] Linux (I'll test this)
  • [ ] Mac

DogeDark avatar Jun 27 '24 20:06 DogeDark

Looks like these issues might already be fixed in #2258.

DogeDark avatar Jun 27 '24 20:06 DogeDark

I'm not normalizing path names so that's still a useful change. If this is something we can backport then I'd still like to accept this PR so we can get it out to Dioxus 0.5 users!

jkelleyrtp avatar Jun 27 '24 20:06 jkelleyrtp

Oh, I think I did #1586 in my PR. We were to_string the wrong thing and it wasn't escaping stuff correctly. Need to check,

jkelleyrtp avatar Jun 27 '24 22:06 jkelleyrtp

Maybe we could backport a fix for that too?

DogeDark avatar Jun 27 '24 22:06 DogeDark