Conversation
|
Claude finished @fmontes's task in 2m 22s —— View job PR Review
SummaryThe PR extracts iframe height observation into a shared Issues1. No height deduplication — redundant messages on every resize/mutation
const measureAndNotify = () => {
const height = html.offsetHeight;
if (!height) { return; }
onHeightChange(height); // always fires, even when height === previous height
};
2. CSS injection via
const messages = JSON.parse(localStorage.getItem('dotMessagesKeys') ?? '{}');
emptyContainerLabel = messages['editpage.container.is.empty'] ?? emptyContainerLabel;Then at line 259: content: '${emptyContainerLabel}';The label is interpolated directly into a CSS 3. Inconsistent
iframeAccessMode: getIframeAccessMode(nextPageParams.clientHost)
// uses window.location.origin as default
iframeAccessMode: getIframeAccessMode(pageParams.clientHost, dotWindow.location.origin)If 4.
const mutationObserver = new MutationObserver(() => scheduleNotify());
mutationObserver.observe(documentRef.body ?? html, { childList: true, subtree: true });This fires 5. Minor: indentation in
const { destroy } = observeDocumentHeight({
onHeightChange: (height) => {
sendMessageToUVE({ // <-- not indented relative to arrow function body
action: DotCMSUVEAction.IFRAME_HEIGHT,
payload: { height }
});
}
});Misaligned indentation — Not flagged
|
Legal RiskThe following dependencies were released under a license that RecommendationWhile merging is not directly blocked, it's best to pause and consider what it means to use this license before continuing. If you are unsure, reach out to your security team or Semgrep admin to address this issue. GPL-2.0 MPL-2.0 |
Proposed Changes
Checklist
Additional Info
** any additional useful context or info **
Screenshots
This PR fixes: #2