Reset webpack path for Mermaid iFrames
Fixes #413596 (closed)
What does this MR do and why?
This MR sets correct webpack path for Mermaid iFrames to render it correctly. This was broken after this upgrade: !115885 (merged) possibly because it tries to load more chunks.
The sandbox iFrame loads on a separate origin which doesn't have access to gon.relative_url_root
to load the webpack chunk properly.
Screenshots or screen recordings
Before | After |
---|---|
How to set up and validate locally
- Spin up a GDK with a relative URL.
- Create an issue and adds a mermaid diagram to its description or comments.
- The diagram should now be generated correctly.
Example:
graph LR
A(GitLab Rails) -- Writes new pages deployment --> B[(NFS)]
C(GitLab Pages) -. Reads static content .-> B
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Dheeraj Joshi