Skip to content

Comments

Query all eager loading turbo frames and patch their innerHTML#164

Merged
leastbad merged 4 commits intostimulusreflex:masterfrom
julianrubisch:ssr-turbo-frames
Nov 22, 2021
Merged

Query all eager loading turbo frames and patch their innerHTML#164
leastbad merged 4 commits intostimulusreflex:masterfrom
julianrubisch:ssr-turbo-frames

Conversation

@julianrubisch
Copy link
Contributor

Allows to fetch and patch lazy loaded turbo frames present in the response eagerly.

Copy link
Contributor

@leastbad leastbad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So far as I understand the functionality of lazy-loaded Turbo Frames, this looks sound to me. I guess they use DOM ids to identify frames? For some reason, I thought they gave them arbitrary identifiers.

Depending on your reaction to one of my questions, you might need to make the lazy fetch into a recursive function.

@julianrubisch julianrubisch changed the title Query all lazy loading turbo frames and patch their innerHTML Query all eager loading turbo frames and patch their innerHTML Nov 20, 2021
@julianrubisch
Copy link
Contributor Author

Yep, frames all use IDs right now.

@julianrubisch julianrubisch force-pushed the ssr-turbo-frames branch 2 times, most recently from 8685c71 to 6ffc111 Compare November 21, 2021 18:35
@leastbad
Copy link
Contributor

Excited to see this coming together.

@julianrubisch julianrubisch marked this pull request as ready for review November 22, 2021 07:50
@julianrubisch
Copy link
Contributor Author

So I can declare success! I threw together a couple of test cases including nested eager loaded frames, and it worked.

Thanks to @ParamagicDev for your support and reviewing it en passent 🙌

Copy link
Contributor

@leastbad leastbad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with comments re: naming and a request for clarification.

@leastbad leastbad merged commit 2a77704 into stimulusreflex:master Nov 22, 2021
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.

3 participants