-
-
Notifications
You must be signed in to change notification settings - Fork 462
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
New feature: Frames #1565
Closed
Closed
New feature: Frames #1565
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I would be interested in seeing how this concept works inside the |
<dialog open>
<Frame src="/stuff/2/edit">Loading</Frame>
</dialog> |
[Draft] React Adapter
include component CSS in head, fixes inertiajs#1760
@buhrmi if you want a review please make sure to mark the PR as ready. |
This is just an experimental proof of concept. Sorry I didn't have any expectations of it actually getting considered. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
My hope for this PR is to serve as a proof-of-concept to implement modals via a new feature I'd like to call Inertia Frames. An Inertia Frame is similar to standard browser
<iframe>
: By default, all user navigation and form submissions are encapsulated within a frame.An example usage looks like this:
When a
Frame
component is mounted into the page, it makes an Inertia Visit to the path specified in thesrc
attribute. The Visit is made with a new attribute introduced in this PR:router.visit(src, {frameId: "login"}
. When the router makes a visit with a specified frameId, it does not update the "global" page component, but the component within the Frame. Theid
attribute on the is optional. If not specified, a random frameId is used.I just started work on the implementation for the Svelte adapter and would like to keep working on this until an "official" or better implementation/concept for modals emerges. I don't really expect this PR to get merged any time soon, but I do hope to ignite some discussion about modals again.