Conversation
… custom domains, AI editor, and customization.
…nel padding for responsiveness.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This pull request refactors the document management system to use a template-based approach instead of simple document types, along with significant UI/UX improvements. The changes replace "other" with "blank" as the default document type, centralize document metadata in a new documentTemplates structure, and introduce a full-screen template selection dialog. Additionally, the PR updates branding on the homepage and README, improves E2E test stability, and adds a new "blue" button variant for primary actions.
- Migrated from document "types" to "templates" with centralized metadata (icon, label, description, and content)
- Changed default document type from "other"/"privacy" to "blank" across the application
- Introduced a new full-screen template selection dialog for document creation with search and preview functionality
- Updated button styling with a new "blue" variant for primary actions and improved save/cancel workflows
Reviewed changes
Copilot reviewed 26 out of 27 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| types/documents.tsx | Changed document type from "other" to "blank" |
| proxy.ts | Simplified subdomain routing logic by removing pathname check |
| package.json, pnpm-lock.yaml | Added @radix-ui/react-scroll-area dependency |
| lib/constants.ts | Removed legacy document type constants (moved to document-templates.tsx) |
| components/ui/scroll-area.tsx | New scroll area component for template dialog |
| components/ui/input-group.tsx | Enhanced input styling with additional ring override |
| components/ui/button.tsx | Added "blue" button variant for primary actions |
| components/ui/block-context-menu.tsx | Added disableAI prop to conditionally hide AI features |
| components/document-templates.tsx | Refactored from simple content map to comprehensive template objects with metadata |
| components/document-template-dialog.tsx | New full-screen dialog for template selection with search and preview |
| components/recent-documents-table.tsx | Updated to use new documentTemplates structure |
| components/documents-table.tsx | Updated type maps to use "blank" instead of "other" |
| components/nav-documents.tsx | Updated icon map to use File icon for "blank" type |
| components/features.tsx | Added three new feature cards (Custom domains, AI-powered editor, Customization) |
| components/editor/plugins/block-menu-kit.tsx | Refactored to factory function supporting disableAI option |
| components/editor/editor-kit.tsx | Updated to use createBlockMenuKit factory |
| app/page.tsx | Updated homepage messaging from "Policies" to "Documents", reorganized CTA buttons, and linked announcement to changelog |
| app/layout.tsx | Added suppressHydrationWarning to body tag |
| app/dashboard/documents/new/new-document-shell.tsx | Replaced type selector with template dialog, changed default to "blank", removed status field |
| app/dashboard/documents/documents-shell.tsx | Updated to use documentTemplates for icons and labels |
| app/dashboard/d/[slug]/document-shell.tsx | Improved save button styling with "blue" variant, updated loading text, adjusted layout |
| app/api/documents/route.ts | Changed default type from "other" to "blank" |
| app/[workspace]/[slug]/page.tsx | Adjusted padding for better mobile responsiveness |
| README.md | Updated logo rendering with picture element for dark/light mode support |
| e2e/workspace.spec.ts | Improved test stability by waiting for API responses and removing redundant checks |
| e2e/document.spec.ts | Enhanced tests to cover template selection flow and improved timing with promise-based waits |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…d `suppressHydrationWarning` to body tag.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
This pull request introduces several improvements to the document creation and management experience, refactors the handling of document templates, and updates various UI elements for consistency and clarity. The most significant changes include a switch from document "types" to "templates", UI enhancements for document actions, and updates to the homepage and branding.
Document Template Refactor and UI Improvements
documentTemplatesand removing legacy constants and type arrays. The document creation flow now uses a dialog for template selection, and the default type is set to"blank"instead of"privacy"(app/dashboard/documents/new/new-document-shell.tsx). [1] [2] [3] [4] [5]documentTemplatesfor icons and labels, ensuring consistent display of document information and removing reliance on legacy constant maps (app/dashboard/documents/documents-shell.tsx). [1] [2] [3] [4]UI/UX Enhancements for Document Actions
app/dashboard/d/[slug]/document-shell.tsx). (app/dashboard/d/[slug]/document-shell.tsxL700-R702, app/dashboard/d/[slug]/document-shell.tsxR716, app/dashboard/d/[slug]/document-shell.tsxL722-R725, app/dashboard/d/[slug]/document-shell.tsxL838-L868, app/dashboard/d/[slug]/document-shell.tsxR863)Homepage and Branding Updates
app/page.tsx). [1] [2]README.mdto use a<picture>element for automatic dark/light mode switching, improving branding consistency.Technical and Minor Improvements
"other"to"blank"in the API route for document creation, aligning backend defaults with frontend changes (app/api/documents/route.ts).suppressHydrationWarningto the<body>tag in the root layout for improved hydration handling in Next.js (app/layout.tsx).