Skip to content

fix: frontend templates#211

Merged
dermatz merged 5 commits into
mainfrom
fix/frontend-views-by-code-reviews
Jun 27, 2026
Merged

fix: frontend templates#211
dermatz merged 5 commits into
mainfrom
fix/frontend-views-by-code-reviews

Conversation

@dermatz

@dermatz dermatz commented Jun 27, 2026

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings June 27, 2026 22:03
@dermatz dermatz changed the title fix: Correct opacity check in images without ALT audit fix: frontend templates Jun 27, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes the visibility detection in the “Images without ALT” toolbar audit by correctly treating any computed opacity value of 0 (including "0.0", "0.00", etc.) as hidden.

Changes:

  • Replace a string comparison against "0" with a numeric parseFloat(...) !== 0 check for computed opacity.

Copilot AI review requested due to automatic review settings June 27, 2026 22:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comment thread src/view/frontend/web/js/toolbar/ui/build.js
Copilot AI review requested due to automatic review settings June 27, 2026 22:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Comment on lines +86 to +88
menu.setAttribute("role", "dialog");
menu.setAttribute("aria-modal", "true");
menu.setAttribute("aria-label", "MageForge Toolbar");
Comment on lines 141 to 150
function createOverlay(el, severity = "error") {
const overlay = document.createElement("span");
overlay.className = AUDIT_OVERLAY_CLASS;
if (severity === "warning")
overlay.classList.add("mageforge-audit-overlay--warning");
document.body.appendChild(overlay);

function update() {
if (!el.isConnected) {
cleanup();

return;
}
// Set initial position synchronously so the overlay appears immediately.
if (el.isConnected) {
const rect = el.getBoundingClientRect();
Comment on lines +192 to 216
function repositionOverlay() {
if (!overlayState || !document.getElementById(OVERLAY_ID)) return;

const { sorted, badges, lines } = overlayState;

// --- Batched read phase ---
const rects = sorted.map((el) => el.getBoundingClientRect());

// --- Batched write phase: badge positions ---
badges.forEach((badge, i) => {
badge.style.left = Math.round(rects[i].left + rects[i].width / 2) + "px";
badge.style.top = Math.round(rects[i].top) + "px";
});

// --- Batched write phase: SVG line endpoints ---
lines.forEach((line, i) => {
line.setAttribute("x1", Math.round(rects[i].left + rects[i].width / 2));
line.setAttribute("y1", Math.round(rects[i].top));
line.setAttribute(
"x2",
Math.round(rects[i + 1].left + rects[i + 1].width / 2),
);
line.setAttribute("y2", Math.round(rects[i + 1].top));
});
}
Comment on lines 462 to 467
* Set the inline counter badge of an audit menu item.
*
* @param {string} key
* @param {string} message
* @param {'success'|'error'} type
*/
@dermatz dermatz merged commit a0f598f into main Jun 27, 2026
16 checks passed
@dermatz dermatz deleted the fix/frontend-views-by-code-reviews branch June 27, 2026 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants