Skip to content

Reset webpack path for Mermaid iFrames

Dheeraj Joshi requested to merge djadmin-fix-mermaid-relative-path into master

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
image image

How to set up and validate locally

  1. Spin up a GDK with a relative URL.
  2. Create an issue and adds a mermaid diagram to its description or comments.
  3. 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.

Edited by Dheeraj Joshi

Merge request reports

Loading