Replies: 2 comments 2 replies
-
It seems like this could be a fragile in authoring. If an author is to control this and it's not default behavior maybe it could be handled similar to the DNT hash? |
Beta Was this translation helpful? Give feedback.
-
Maybe I don't understand the request, but it sounds like you need to do more research on how Milo creates modals. As stated above, all modal/fragment loading is on-demand. Now, getting to your title: "lazy fragments" which is very different than the modals (I think) you're discussing above... We don't typically introduce complexity until we hit a limit in what we are trying to build. Meaning: if you haven't seen a performance issue with the current fragment solution, you probably shouldn't be exploring making it more complicated. It's great you have a hunch that there may be some problems in the future, but you should be able to make a page, see where the issues are with the current solution and iterate based on that feedback. Until you make that page and have the performance data, I wouldn't write any extra code or make your solution more complicated. On the flip side, I do think it's a worthwhile discussion that if we have 100+ fragments that are direct on page (not modals), we should be asking ourselves if we should be that cruel to the environment. |
Beta Was this translation helpful? Give feedback.
-
For Merch cards with a subscription panel modal, I would like to reference the modal content with a fragment as shown in the screenshot. However, I want the fragment not to be processed.
The processing of the fragment should be be initiated by the block code on user interaction.
The fragment (last link in the block) content should be processed with the regular Milo pipeline with placeholders, personalization, etc.
I'm planning to simply remove the link attribute and render it as a text and parse the link in the frontend.
Although for a single card in a page it doesn't make big difference in performance, with a lot of cards (e.g: plan or catalog pages) the goal is to keep number of fetch calls low.
Any recommendations on the approach? Thanks.
Beta Was this translation helpful? Give feedback.
All reactions