Disable copy-code button for mermaid diagrams
Related issues - #349497 (closed), #349892 (closed)
What does this MR do and why?
It removes the copy-code
button for mermaid diagrams, fixing #349497 (closed), and potentially #349892 (closed) also.
It was added in !75433 (merged), and intended for only code blocks and not the mermaid diagrams I suppose.
Screenshots or screen recordings
- Copy clipboard button
before | after (renders only for code block) |
---|---|
- Mermaid diagram rendering issue
Intermittent issue (both diagrams are not rendered) | Intermittent issue (one diagram is not rendered) | After fix |
---|---|---|
How to set up and validate locally
- Create a new issue / MR with the following comment
- Enclose it with
mermaid ...
sequenceDiagram
User->>GitLab: GET /project/-/archive/master.zip
GitLab->>User: 302 Found
Note over User,GitLab: Location: https://cdn.com/project/-/archive/master.zip?token=secure-user-token
User->>CDN: GET /project/-/archive/master.zip?token=secure-user-token
alt object not in cache
CDN->>GitLab: GET /project/-/archive/master.zip
Note over CDN,GitLab: X-Gitlab-External-Storage-Token: secure-cdn-token<br/>X-Gitlab-Static-Object-Token: secure-user-token
GitLab->>CDN: 200 OK
CDN->>User: master.zip
else object in cache
CDN->>GitLab: GET /project/-/archive/master.zip
Note over CDN,GitLab: X-Gitlab-External-Storage-Token: secure-cdn-token<br/>X-Gitlab-Static-Object-Token: secure-user-token<br/>If-None-Match: etag-value
GitLab->>CDN: 304 Not Modified
CDN->>User: master.zip
end
graph LR; A-->C;
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