The sidebar (Netlify Icon) for Collaborative Deploy Previews is not showing on most pages of our site (e.g. https://deploy-preview-1--stelvioforlife.netlify.app/). The site is a NextJS app, using the Essential NextJS Plugin. Because most pages are rendered from Netlify Functions, I believe the sidebar is not injected there. On a static page, such as the 404, the bar does appear (https://deploy-preview-1--stelvioforlife.netlify.app/does-not-exist).
Am I correct in assuming that HTML output from Netlify Functions is not taken into account for injecting the sidebar functionality?
Happy to help in any way to further debug this issue.
Hey there, @rmhartog
Sorry for the slow response here, we appreciate your patience! I followed the links you shared and do indeed see the Collaborative Deploy Preview drawer on the lefthand side.
Is this issue still occurring for you on your local machine? If so, please let me know and I will touch base with the team that works on Collaborative Deploy Previews.
Hey Hillary,
appreciate the response, and apologies for any confusion caused. I decided to temporarily get the Collaborative Deploy Preview working by manually adding a script (in this case in NextJS, I added the script in _document). I gleaned the code from looking at a ‘normal’ CDP page.
<div
data-netlify-deploy-id={deployId}
data-netlify-site-id={siteId}
style={{ position: "fixed", left: 0, bottom: 0, zIndex: 2147483647 }}
>
<script async="" src="https://netlify-cdp-loader.netlify.app/netlify.js"></script>
</div>
This causes the drawer to work properly, but I’m forced to include this manually. It would be nice (although I understand there might be a fair share of edge-cases) if this was injected in HTML returned from Netlify Functions automatically.
Hello all, it has been a while, is there any feedback on this issue? Whether or not there are any intentions to provide this functionality in some way?
Looking forward to your reply,
Reinier
Hi @rmhartog,
Apologies for missing this thread - it got slipped through the cracks.
While I personally believe this might not be supported, I’ve asked this to the developers of CDP. We’ll update the thread once we have more info from them.
Hi @rmhartog,
We heard back from the team and here’s what they have to say:
The short answer is that we can’t support it yet until we get some infrastructure changes in place which might take a bit to complete. So yes, we are aware and want to support it but we have work to do and don’t have an estimate yet for when we can support it.
Basically, this might get implemented in the future, but for the time being, there’s no way other than manually adding the snippet that you shared wherever possible.