You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@magpie.apache.org by "potiuk (via GitHub)" <gi...@apache.org> on 2026/09/28 21:50:52 UTC

[PR] Put the review overlay on the published site, with one button [magpie-site]

potiuk opened a new pull request, #214:
URL: https://github.com/apache/magpie-site/pull/214

   ## What
   
   - **Review overlay on the published site, optional.** `MAIN_REVIEW_OVERLAY` in `build.yml` (on for this site). When on, the main build is annotated (`MAGPIE_PREVIEW_ANNOTATE=1`) and `scripts/preview/inject-main.mjs` injects the overlay in `mode: "main"`:
     - **no** "Preview of #N · sha · not the published site" banner — it is the published site;
     - a marked region's result offers only **Open an issue** — a new issue prefilled with the page URL, the build's commit and the source line on main (`blob/main/<file>#L<line>`); the screenshot is on the clipboard to paste in. Lines under `src/content/docs/` (synced from apache/magpie) are not linked.
     - With it off, main publishes the plain build exactly as today. The "no `data-magpie-src` in production" assertion still runs on the plain build first.
   - **One button instead of two.** Wherever the overlay runs (PR previews and main), the site's "Suggest a change" pencil is hidden and replaced by **Comment / Suggest a change**, a menu with:
     - *Comment on a region of this page* — the screenshot flow;
     - *Suggest a change* — the page's own edit link, unchanged.
     Where the overlay does not run, the pencil stays.
   - PR previews keep their banner and "Open PR #N at this line".
   - `overlay-files.mjs` now generates the overlay for both the PR publisher and the main build.
   
   ## Testing
   
   - `npm test` — 172 pass (new: `sourceUrl`, `issueUrl`, `inject-main`).
   - `npx astro check` — 0 errors/warnings/hints (`review.js` is checked against `globals.d.ts`).
   - Browser check (Playwright, annotated build served locally):
     - main mode, `/tools/` and `/`: pencil hidden, one button, no banner; menu = "Comment on a region of this page" + "Suggest a change ↗" (the page's `edit/main/...` link); marking a region → "Screenshot copied — paste it into the issue" + only **Open an issue ↗**; on `/` the issue links `blob/main/src/components/landing/ImmersiveGradientHero.tsx#L698`; no page errors.
     - PR mode: banner present, same menu, result **Open PR #206 at this line ↗**, no page errors.
   - zizmor, prek clean.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@magpie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Put the review overlay on the published site, with one button [magpie-site]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk merged PR #214:
URL: https://github.com/apache/magpie-site/pull/214


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@magpie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Put the review overlay on the published site, with one button [magpie-site]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #214:
URL: https://github.com/apache/magpie-site/pull/214#issuecomment-5879405558

   ### Preview this pull request
   
   A committer can publish a live preview of this PR by adding the `preview` label, or by commenting `/show-preview` on its own line, which adds the label. The preview's link is posted here once it is published, and it then tracks this PR's head commit until the PR closes or the label is removed.
   
   <!-- magpie-preview-howto -->


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@magpie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org