-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Add preview page #21
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
Conversation
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.
Pull request overview
This PR adds a new preview page route and refactors the edit routing system to use file paths instead of content IDs. The changes enable direct navigation to a preview-only view and improve the mapping between files and their editor routes.
Key Changes:
- Added
/previewroute for accessing preview without an editor - Refactored edit routes from
/edit/$contentIdto/edit/$using file paths - Updated project setup logic to handle
entryContextconfiguration and properly map entry files
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/viola/src/stores/sandbox.ts | Added defaultDraftDir constant and config parsing on project load |
| packages/viola/src/stores/content.ts | Added getFileByFilename method to lookup content by filename |
| packages/viola/src/stores/actions/setup-project.ts | Refactored to use entryContext and file paths for content mapping |
| packages/viola/src/stores/actions/content-file.ts | Updated to use entryPath and defaultDraftDir for new content files |
| packages/viola/src/routes/(main)/_layout/preview.tsx | New preview-only route with tab setup |
| packages/viola/src/routes/(main)/_layout/edit/$contentId.tsx | Removed old content ID-based route |
| packages/viola/src/routes/(main)/_layout/edit/$.tsx | New file path-based edit route |
| packages/viola/src/routeTree.gen.ts | Generated routing tree updates for new route structure |
| packages/viola/src/components/side-menu.tsx | Added "Open Print Preview" menu item and updated file navigation links |
| packages/viola/src/components/panes/preview.tsx | Added await for setupPromise before rendering |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[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.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.