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

Fix viewer search and consolidate search routing, too #862

Merged
merged 5 commits into from
Nov 21, 2024

Conversation

eyeseast
Copy link
Collaborator

Closes #846 and consolidates routing logic around search.

For PDF pages, we're now getting the search query directly from the URL, instead of props, and reacting to URL changes.

@eyeseast eyeseast requested a review from allanlasser November 20, 2024 21:16
Copy link

github-actions bot commented Nov 20, 2024

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 30.81% 6699 / 21738
🔵 Statements 30.81% 6699 / 21738
🔵 Functions 49.63% 273 / 550
🔵 Branches 75.56% 1008 / 1334
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/lib/components/forms/Search.svelte 0% 0% 0% 0% 1-74
src/lib/components/viewer/PDFPage.svelte 0% 0% 0% 0% 1-253
src/lib/components/viewer/ReadingToolbar.svelte 0% 0% 0% 0% 1-140
src/lib/components/viewer/Text.svelte 0% 0% 0% 0% 1-40
src/lib/components/viewer/ViewerContext.svelte 0% 0% 0% 0% 1-193
src/lib/utils/search.ts 82.92% 75% 75% 82.92% 14-15, 76-80
src/routes/(app)/documents/[id]-[slug]/+page.svelte 0% 0% 0% 0% 1-66
src/routes/(app)/projects/+page.svelte 0% 0% 0% 0% 1-118
src/routes/embed/documents/[id]-[slug]/+page.ts 0% 0% 0% 0% 1
Generated in workflow #767 for commit 014fa79 by the Vitest Coverage Report Action

Copy link

netlify bot commented Nov 20, 2024

Deploy Preview for documentcloud-frontend ready!

Name Link
🔨 Latest commit 014fa79
🔍 Latest deploy log https://app.netlify.com/sites/documentcloud-frontend/deploys/673f5cf4c77dfe000834e885
😎 Deploy Preview https://deploy-preview-862.muckcloud.com
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 57
Accessibility: 85
Best Practices: 92
SEO: 91
PWA: -
View the detailed breakdown and full score reports

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

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.

Do we still need query and getQuery in ViewerContext? Right now they're only used by Text and ReaderToolbar and seem like they could be replaced by the utility.

@eyeseast
Copy link
Collaborator Author

Do we still need query and getQuery in ViewerContext? Right now they're only used by Text and ReaderToolbar and seem like they could be replaced by the utility.

We probably don't. I'll take them out.

@eyeseast eyeseast merged commit e303b02 into sveltekit Nov 21, 2024
10 of 11 checks passed
@allanlasser allanlasser deleted the 846-viewer-search branch November 26, 2024 13:53
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