-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement 'add' functionality for template #56
Conversation
@itowlson I don't have the ability to add you as a reviewer but appreciate eyes whenever you get a chance 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of comments, probably not blocking but wanting to understand / agree in my own mind.
6aa9380
to
f920742
Compare
Signed-off-by: Darwin Boersma <darwin@sadlark.com>
f920742
to
587d697
Compare
@itowlson thanks for the review! I responded to comments and updated the PR to address, let me know if the approach makes sense 🤞😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This all looks reasonable to me - thanks!
I guess I do have one more foundational question which is whether non-root paths are something that Leptos users care about. My admittedly limited impression from the existing integrations was that Leptos would typically handle the whole site, rather than a subpath of it. Even if you had something like an API handled by a non-Leptos framework, you'd still likely have Leptos handling the root because that's where browsers come in.
So I am a bit curious about the motivation. Is this something you or other users have run into, or is it more a sense of "rounding out" the Spin template?
(And I apologise for not asking this earlier before putting you through all this work!)
I agree with the idea that Leptos should generally be handling the whole site and there isn't much use for hosting it on subpaths, but one case where this is helpful is in federating micro-frontends in large organizations. cough cough Am cough cough azon You're correct that another goal was "rounding out" the template -- I want the add command to work as flexibly as possible gosh darn it! This setup is not super elegant -- ideally we could strip out the prefix in top level server handlers with dynamic Spin-provided information about the path and have each Leptos component be deployable on any subpath without code changes. But that will take some changes in leptos_wasi (and potentially leptos itself) I suspect, still mulling over the specifics of how that might be best accomplished. Open to thoughts and ideas! |
That totally makes sense. Thanks for taking the time to write it up. Happy to |
What Is This?
Testing