-
Notifications
You must be signed in to change notification settings - Fork 5
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] Text view #532
Conversation
✅ Deploy Preview for documentcloud-frontend ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Awesome start. Initial thoughts:
Do we need to render notes, redactions, or other edits onto the text? |
Coverage Report
File Coverage
|
Text has to be fetched on its own, after we fetch the document data (because we need We have four document modes:
Those could all be at the same URL with query params to switch. Text is the only resource that needs to be fetched on its own. |
Co-authored-by: Allan Lasser <[email protected]>
Co-authored-by: Allan Lasser <[email protected]>
Co-authored-by: Allan Lasser <[email protected]>
Co-authored-by: Allan Lasser <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These styling changes should fix the width/layout of the pages inside the viewer. Everything else looks great!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All code looks great. I caught one bug while testing—I will leave it up to you whether you want to fix it here, or create an issue targeting it.
When trying to load a specific page by target (i.e. refreshing a URL ending in #p10
), the element is not brought into view. I believe the issue is that the element being targeted is not present when the page loads—it's loaded in after. There's a small flash where the mode is "Document" and the view is empty, before switching to "Text" and displaying the text pages. Either the page should be scrolled into view after streaming finishes (example) or we should change how we're server-rendering the page.
Let's merge this and then deal with the page hash when we do pagination, which I think will end up addressing that. I'm not sure what's happening with |
https://deploy-preview-532.muckcloud.com/documents/20006357-reportersguide/?mode=text