Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sveltekit viewer notes #552

Merged
merged 27 commits into from
May 31, 2024
Merged

sveltekit viewer notes #552

merged 27 commits into from
May 31, 2024

Conversation

eyeseast
Copy link
Collaborator

@eyeseast eyeseast commented May 21, 2024

Closes #535 #549

Rendering notes in the document and on their own. Notes can render the document excerpt in two ways:

  • using an image
  • rendering a fragment of a PDF

The idea is that if we're already loading a PDF on the page, as in the viewer, we can use that same resource and produce a sharper image. If we're not, as in embeds, we can use a static image and skip loading PDF.js and the entire PDF file.

This departs a bit from what's in Figma and probably still needs some styling help. I'd like to line up the excerpt in the document view with its exact spot on the page, but I'm not totally sure how best to do that.

Screenshot 2024-05-28 at 9 52 43 AM

Screenshot 2024-05-28 at 9 52 52 AM

Screenshot 2024-05-28 at 9 53 16 AM

Copy link

netlify bot commented May 21, 2024

Deploy Preview for documentcloud-frontend ready!

Name Link
🔨 Latest commit 4468773
🔍 Latest deploy log https://app.netlify.com/sites/documentcloud-frontend/deploys/665a24e4591a120008bdde35
😎 Deploy Preview https://deploy-preview-552.muckcloud.com
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

github-actions bot commented May 21, 2024

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 32.5% 3100 / 9538
🔵 Statements 32.5% 3100 / 9538
🔵 Functions 29.71% 52 / 175
🔵 Branches 48.38% 120 / 248
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
src/lib/api/documents.ts 82.15% 79.41% 85% 82.15% 28-56, 62-91, 113-114, 131-137, 141-142, 176-177, 238
src/lib/api/notes.ts 65.71% 75% 75% 65.71% 12-27, 33-52
src/lib/components/common/Action.svelte 0% 0% 0% 0% 1-48
src/lib/components/common/KV.svelte 100% 100% 100% 100%
src/lib/components/documents/Note.svelte 0% 0% 0% 0% 1-345
src/lib/components/documents/NoteLink.svelte 0% 0% 0% 0% 1-60
src/lib/components/documents/Notes.svelte 0% 0% 0% 0% 1-107
src/lib/components/documents/PDF.svelte 0% 0% 0% 0% 1-83
src/lib/components/documents/PDFPage.svelte 0% 0% 0% 0% 1-360
src/lib/utils/search.ts 95.23% 100% 80% 95.23% 13-14
src/routes/+layout.svelte 0% 0% 0% 0% 1-23
src/routes/documents/[id]-[slug]/+layout.svelte 0% 0% 0% 0% 1-89
src/routes/documents/[id]-[slug]/+page.svelte 0% 0% 0% 0% 1-300
src/routes/documents/[id]-[slug]/sidebar/Actions.svelte 0% 0% 0% 0% 1-94
src/routes/documents/[id]-[slug]/sidebar/Data.svelte 0% 0% 0% 0% 1-57
src/routes/documents/[id]-[slug]/sidebar/Notes.svelte 0% 0% 0% 0% 1-67
src/routes/documents/[id]-[slug]/sidebar/Sections.svelte 0% 0% 0% 0% 1-56
Generated in workflow #139

@eyeseast eyeseast marked this pull request as ready for review May 28, 2024 13:57
@eyeseast eyeseast requested a review from allanlasser May 28, 2024 13:57
src/lib/components/documents/PDFPage.svelte Outdated Show resolved Hide resolved
src/lib/components/documents/Notes.svelte Outdated Show resolved Hide resolved
src/lib/components/documents/Note.svelte Show resolved Hide resolved
src/lib/components/documents/Note.svelte Outdated Show resolved Hide resolved
src/lib/components/documents/PDF.svelte Outdated Show resolved Hide resolved
@eyeseast eyeseast requested a review from allanlasser May 30, 2024 21:29
@eyeseast
Copy link
Collaborator Author

I think I got everything I can. Please check.

Copy link
Member

@allanlasser allanlasser left a comment

Choose a reason for hiding this comment

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

Just a few more small fixes I caught on second pass. I don't think this needs another review after they're made!

src/langs/json/en.json Outdated Show resolved Hide resolved
src/routes/documents/[id]-[slug]/sidebar/Notes.svelte Outdated Show resolved Hide resolved
src/routes/documents/[id]-[slug]/sidebar/Sections.svelte Outdated Show resolved Hide resolved
src/lib/components/documents/PDFPage.svelte Outdated Show resolved Hide resolved
@eyeseast eyeseast merged commit 1fab939 into sveltekit May 31, 2024
10 checks passed
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