Skip to content

fix: respect decorative markers for hide images and default to Google Translate adapter (#201) - #202

Merged
prabothcharith merged 3 commits into
developmentfrom
fix/hide-images-and-google-translate
Nov 18, 2026
Merged

prabothcharith merged 3 commits into
developmentfrom
fix/hide-images-and-google-translate

Conversation

@prabothcharith

Copy link
Copy Markdown
Owner

Closes #201 (sub-issue of #8).

Summary

  • Hide Images (src/core/effects.ts): Stop treating generic / [role='figure'] wrappers as protected charts/diagrams, and evaluate explicit decorative markers (\data-decorative, .decorative, .deco,
    ole='presentation'|'none', \�ria-hidden='true', including parent <picture>) before non-empty \�lt/\�ria-label/\ itle\ checks. Also include [data-video], .video-placeholder\ in \hideVideos.
  • Google Translate Adapter (src/core/translationAdapter.ts, src/features/TranslationController.tsx, src/index.ts): Export \createGoogleTranslateAdapter\ and \GoogleTranslateAdapterOptions, default \TranslationController\ to Google Translate with 14 target languages, eliminate broken [TR]\ partial-word output, preserve whitespace, deduplicate via \Map\ cache, and fall back cleanly to offline word translation (without [TR]) on network/HTTP errors unless \ allbackToOffline: false.
  • Docs & CSP: Updated \docs/TRANSLATION.md, \docs/API.md, \docs/CSP.md, and \�xamples/next-app/next.config.mjs\ for \https://translate.googleapis.com\.
  • Release 2.30.1: Bumped version and updated \CHANGELOG.md.

Verification


  • pm run format:check\ &
    pm run validate\ (tsc, eslint, 51 unit/integration files / 521 tests, tsup/css build): passed

  • pm run pack:check\ &
    pm run test:consumers\ (ESM+SSR, CJS, React 18 Vite, React 19 Tailwind, Next.js 16): passed
  • Playwright Chromium/WebKit/Mobile/Next.js (\212\ passed, \8\ skipped) & Firefox (\42\ passed, \2\ skipped): passed

release: v2.30.0 (bundled Manrope typography, UI/modal redesign, resizing, external reading aid nudges, translation, dictionary and media fixes)
Copilot AI balanced review requested due to automatic review settings November 18, 2026 02:55

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-18T02:56:37.549529Z ad1e96f PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@prabothcharith
prabothcharith merged commit e0c3b33 into development Nov 18, 2026
4 checks passed
@prabothcharith
prabothcharith deleted the fix/hide-images-and-google-translate branch November 18, 2026 02:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants