Skip to content

enhance(pdf): simplify annotation asset blocks#12720

Open
xyhp915 wants to merge 24 commits into
masterfrom
enhance/pdf-annotation-asset-blocks
Open

enhance(pdf): simplify annotation asset blocks#12720
xyhp915 wants to merge 24 commits into
masterfrom
enhance/pdf-annotation-asset-blocks

Conversation

@xyhp915
Copy link
Copy Markdown
Collaborator

@xyhp915 xyhp915 commented May 25, 2026

CleanShot 2026-05-25 at 17 09 41@2x CleanShot 2026-05-25 at 17 10 01@2x

@xyhp915 xyhp915 requested a review from Copilot May 25, 2026 08:05
@github-actions github-actions Bot added the :type/enhancement Enhancement to product. Does not affect the overall basic use. label May 25, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 adjusts how PDF annotation “area highlight” assets are represented and rendered, aiming to simplify annotation asset blocks and centralize PDF playground mounting in the app root.

Changes:

  • Moves the PDF embed playground and #app-single-container mounting point into frontend.page/current-page.
  • Updates asset creation to optionally reuse a PDF highlight UUID for the created asset block, and tags PDF-related assets appropriately.
  • Refactors PDF annotation rendering/styling by expanding annotation selectors to include .block-title-wrap and by using data-type/data-hl-* attributes more consistently.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
src/test/frontend/extensions/pdf/assets_test.cljs Adds trailing newline to satisfy formatting conventions.
src/main/frontend/page.cljs Mounts #app-single-container and PDF embed playground at the page root.
src/main/frontend/handler/editor.cljs Allows asset blocks to reuse PDF highlight UUIDs and adds PDF annotation tagging; updates save-assets options.
src/main/frontend/handler/assets.cljs Updates get-area-block-asset-url doc and behavior to support old/new PDF area assets.
src/main/frontend/extensions/pdf/pdf.css Adjusts annotation styling to apply to both title and content, and moves color marker styling to .prefix-link.
src/main/frontend/extensions/pdf/assets.cljs Refactors ref-block creation/update and highlight-area persistence logic.
src/main/frontend/date.cljs Adds a new date-time string helper.
src/main/frontend/components/theme.cljs Avoids resetting current PDF state redundantly on graph changes; removes PDF playground from theme container.
src/main/frontend/components/container.cljs Removes #app-single-container from the main container layout.
src/main/frontend/components/block/asset.cljs Tweaks asset title slot classes for read mode rendering.
src/main/frontend/components/block.cljs Updates PDF annotation rendering (data attrs, prefix link behavior) and introduces customizable block content inner rendering.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/main/frontend/extensions/pdf/assets.cljs
Comment thread src/main/frontend/extensions/pdf/assets.cljs Outdated
Comment thread src/main/frontend/extensions/pdf/assets.cljs
Comment thread src/main/frontend/date.cljs
Comment thread src/main/frontend/components/block.cljs
Comment thread src/main/frontend/components/block.cljs
Comment thread src/main/frontend/components/block.cljs Outdated
Comment thread src/main/frontend/components/block.cljs
Comment thread src/main/frontend/handler/assets.cljs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:type/enhancement Enhancement to product. Does not affect the overall basic use.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants