You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With htmx it'd be nice to be able to toggle recent layout wrapping features based on the header 'hx-request', but these values seem to be statically exported with routeConfig and not when handling the request. Opening issue here to start any discussion on being able to handle this.
Also can mention that I'm not actually using htmx in my project like this just yet, and i suppose i could render separate route with similar render function but different routeConfig.
The text was updated successfully, but these errors were encountered:
bendik
changed the title
Toggle layout wrappers based on '
Toggle layout wrappers based on request headers
Aug 17, 2023
Thanks for opening this issue. This is something @lucacasonato and I were chatting about earlier today. There a couple of stepping stones to make it work. The first step is to get full page navigation working, including island hydration through fetch(). This is needed for #1532 anyway. Once that's done we can explore optimizing that setup by only requesting partial bits.
The thing I'm unclear on whether there is a good heuristic to apply these things out of the box. Layouts could be one, but not sure how it feels in practice. Not everything is a layout too and there may be instances where you want even more granularity in pieces you want to render. I don't know it's early stages and definitely something I want to explore this cycle.
Closing as Fresh 1.5 comes with Partials which allow htmx-style updates to send any layouts to the client. We explored some heuristics to enable/disable layouts, but ultimately always ran into the problem that it's confusing and requires a bit of machinery to make overrides and all that to work. Often there is a scenario, where you only want a particular layout to be applied and that complicates this even further.
Instead with Partials you can just import the Layout component and render that in the partial response. That seems like the best middleground of both worlds.
With htmx it'd be nice to be able to toggle recent layout wrapping features based on the header 'hx-request', but these values seem to be statically exported with routeConfig and not when handling the request. Opening issue here to start any discussion on being able to handle this.
Also can mention that I'm not actually using htmx in my project like this just yet, and i suppose i could render separate route with similar render function but different routeConfig.
The text was updated successfully, but these errors were encountered: