enhance(pdf): simplify annotation asset blocks#12720
Open
xyhp915 wants to merge 24 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
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-containermounting point intofrontend.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-wrapand by usingdata-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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.