Skip to content

refactor(web): use css icons for PDF preview - #40364

Closed
lyzno1 wants to merge 1 commit into
codex/refactor-preview-dialog-containmentfrom
codex/refactor-pdf-preview-icons
Closed

refactor(web): use css icons for PDF preview#40364
lyzno1 wants to merge 1 commit into
codex/refactor-preview-dialog-containmentfrom
codex/refactor-pdf-preview-icons

Conversation

@lyzno1

@lyzno1 lyzno1 commented Aug 9, 2026

Copy link
Copy Markdown
Member

Summary

  • replace the PDF preview zoom-out, zoom-in, and close React SVGs with CSS icons
  • keep all three glyphs decorative with aria-hidden
  • remove the three exact icon lint warnings without changing control semantics

Boundary

  • one production component only
  • no dialog containment, zoom math, hotkeys, callbacks, positions, button labels, or tests changed

Validation

  • pnpm --dir web exec vp test run app/components/base/file-uploader/__tests__/pdf-preview.spec.tsx — 10/10 passed
  • ./node_modules/.bin/vp lint web/app/components/base/file-uploader/pdf-preview.tsx web/app/components/base/file-uploader/__tests__/pdf-preview.spec.tsx
  • pnpm --dir web lint:a11y app/components/base/file-uploader/pdf-preview.tsx
  • pnpm check — 0 errors, 2056 warnings, exactly 3 fewer than the parent
  • git diff --check

Visual regression review

  • compare the zoom-out, zoom-in, and close glyph shapes
  • verify every icon remains 16x16 and keeps the same gray color
  • verify the controls stay at right-24, right-16, and right-6 with the same 32px hit areas
  • verify tooltip labels and keyboard activation are unchanged

Stack

Rollback

Revert commit 00aba9a51ff7e123b9adc4802b4056f2dd646b7d; the parent containment cleanup remains intact.

@github-actions github-actions Bot added the web This relates to changes on the web. label Aug 9, 2026
@lyzno1
lyzno1 force-pushed the codex/refactor-pdf-preview-icons branch from c8956f3 to 00aba9a Compare August 9, 2026 11:25
@codecov

codecov Bot commented Aug 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.43%. Comparing base (d93c661) to head (00aba9a).

Additional details and impacted files
@@                            Coverage Diff                             @@
##           codex/refactor-preview-dialog-containment   #40364   +/-   ##
==========================================================================
  Coverage                                      86.43%   86.43%           
==========================================================================
  Files                                           5107     5107           
  Lines                                         290736   290736           
  Branches                                       57924    57924           
==========================================================================
  Hits                                          251289   251289           
  Misses                                         34506    34506           
  Partials                                        4941     4941           
Flag Coverage Δ
dify-ui 93.49% <ø> (ø)
web 86.11% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@lyzno1

lyzno1 commented Aug 9, 2026

Copy link
Copy Markdown
Member Author

Closing during the accessibility stack audit. This layer only changes component typing or icon implementation, adds no user-visible accessibility contract, and carries independent visual/review risk. It can be reconsidered later as a separate cleanup, not as an a11y dependency.

@lyzno1 lyzno1 closed this Aug 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

web This relates to changes on the web.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant