Skip to content

Bug fixes + UI changes v.0.1.0#4

Merged
zakafz merged 13 commits intomainfrom
bug-fixes-v.0.1.0
Dec 6, 2025
Merged

Bug fixes + UI changes v.0.1.0#4
zakafz merged 13 commits intomainfrom
bug-fixes-v.0.1.0

Conversation

@zakafz
Copy link
Owner

@zakafz zakafz commented Dec 6, 2025

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

  • Replaced the previous document type selection logic with a new document template system, centralizing template data in documentTemplates and 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]
  • Updated document listing and table components to use documentTemplates for 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

Homepage and Branding Updates

  • Revised the homepage announcement section to link to the changelog, updated button order and text, and changed the main headline from "Host Your Policies" to "Host Your Documents" for broader clarity (app/page.tsx). [1] [2]
  • Updated the logo rendering in README.md to use a <picture> element for automatic dark/light mode switching, improving branding consistency.

Technical and Minor Improvements

  • Changed the default document type from "other" to "blank" in the API route for document creation, aligning backend defaults with frontend changes (app/api/documents/route.ts).
  • Added suppressHydrationWarning to the <body> tag in the root layout for improved hydration handling in Next.js (app/layout.tsx).

@vercel
Copy link
Contributor

vercel bot commented Dec 6, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
openpolicy Canceled Canceled Dec 6, 2025 7:40am

Copy link
Contributor

Copilot AI left a 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 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.

@zakafz zakafz merged commit f5f299f into main Dec 6, 2025
9 of 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.

1 participant