Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jul 20, 2025

The create-publisher modal was displaying with a white background instead of the expected dark gray (rgb(31 41 55) / bg-gray-800), creating a visual inconsistency in the dark theme.

Original issue showing white background

Root Cause

The issue was in utils/comfyTheme.tsx where the customThemeTModal theme configuration had:

  • inner class using bg-white bg-gray-200 instead of dark background
  • body.base class using bg-gray-100 instead of dark background

Changes Made

  • Changed modal inner class from bg-white bg-gray-200 to bg-gray-800
  • Changed modal body.base class from bg-gray-100 to bg-gray-800
  • Added Storybook story for the CreatePublisherModal component for testing

Impact

This fix affects 20 modal components throughout the application that use the customThemeTModal theme, ensuring consistent dark theme styling across:

  • CreatePublisherModal
  • EditPublisherModal
  • CreateSecretKeyModal
  • NodeEditModal
  • NodeDeleteModal
  • And 15+ other modal components

The background now properly uses the dark gray color (rgb(31 41 55)) that matches the overall application theme.

Fixes #147.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@vercel
Copy link

vercel bot commented Jul 20, 2025

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

Project Deployment Preview Comments Updated (UTC)
registry-web Ready Ready Preview Comment Oct 25, 2025 1:12pm

Copilot AI changed the title [WIP] fix create-publisehr modal background Fix create-publisher modal background to use dark theme Jul 20, 2025
Copilot AI requested a review from snomiao July 20, 2025 05:51
Copilot finished work on behalf of snomiao July 20, 2025 05:51
@github-actions
Copy link

🎨 Chromatic Visual Testing Results

Resource URL
🔍 Build Results Chromatic Build
📚 Storybook View Storybook

Check the visual changes and approve or request changes as needed.

@github-actions
Copy link

🎨 Chromatic Visual Testing Results

Resource URL
🔍 Build Results Chromatic Build
📚 Storybook View Storybook

Check the visual changes and approve or request changes as needed.

@github-actions
Copy link

🎨 Chromatic Visual Testing Results

Resource URL
🔍 Build Results Chromatic Build
📚 Storybook View Storybook

Check the visual changes and approve or request changes as needed.

@github-actions
Copy link

🎨 Chromatic Visual Testing Results

Resource URL
🔍 Build Results Chromatic Build
📚 Storybook View Storybook

Check the visual changes and approve or request changes as needed.

- Change import from @storybook/react to @storybook/nextjs-vite
- Resolves linting error about direct renderer package imports
- Change openModal to open to match component props
- Fixes TypeScript build error
- Set HUSKY=0 environment variable to prevent pre-commit hooks
- Fixes lint-staged empty commit error in CI
- Create new reusable CreatePublisherFormContent component
- Contains form logic and UI for creating a publisher
- Accepts onSuccess and onCancel callbacks for flexibility
- Remove duplicate form logic and state management
- Use extracted CreatePublisherFormContent component
- Simplify modal to only handle modal-specific concerns
- Fixes duplicate title issue
- Remove duplicate form logic and state management
- Use extracted CreatePublisherFormContent component
- Simplify page to only handle page-specific concerns (breadcrumb, routing)
Resolved conflicts:
- .github/workflows/react-ci.yml: Keep both condition check and HUSKY env var
- .storybook/main.ts: Adopt new organized stories structure from main
- Migrate CreatePublisherModal.stories.tsx to new components/ directory structure
Update import to use relative path since story file is now co-located
with the component in components/publisher/ directory after Storybook
restructure.
- Create CreatePublisherPageLayout component for Storybook
- Demonstrates the full create publisher page UI
- Located at components/pages/create.stories.tsx as requested
- Includes breadcrumb navigation and form content

Addresses review comment on PR #178
@snomiao
Copy link
Member

snomiao commented Oct 25, 2025

Done! Added Storybook story at components/pages/create.stories.tsx as requested in the review. All CI/CD checks are passing. ✅

- Add showTitle prop to CreatePublisherFormContent component
- Display "Create Publisher" heading when showTitle is enabled
- Enable title display on the create publisher page
- Update Storybook story to show title

Addresses review comment requesting addition of page title.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@snomiao
Copy link
Member

snomiao commented Oct 25, 2025

Review comments addressed!

Added the "Create Publisher" title heading to the create publisher page as requested:

  • Added optional showTitle prop to CreatePublisherFormContent component
  • Enabled title display on the standalone page at pages/publishers/create.tsx
  • Updated the Storybook story to show the title as well

The title is now displayed prominently at the top of the form on the create publisher page, while the modal version continues to use its own modal header.

All CI/CD checks are passing! ✅

@snomiao snomiao marked this pull request as ready for review October 25, 2025 13:17
@Copilot Copilot AI review requested due to automatic review settings October 25, 2025 13:17
@snomiao snomiao enabled auto-merge (squash) October 25, 2025 13:17
@snomiao snomiao merged commit fffaa22 into main Oct 25, 2025
8 checks passed
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 PR fixes the create-publisher modal background to use the dark theme (bg-gray-800 / rgb(31 41 55)) instead of the white background that was previously displayed. The fix also refactors the form logic into a shared component for better reusability.

Key changes:

  • Updated customThemeTModal theme configuration to use bg-gray-800 for modal inner and body.base classes
  • Extracted form logic into a new CreatePublisherFormContent component to be shared between modal and page views
  • Added Storybook stories for visual testing of the modal and page components

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
utils/comfyTheme.tsx Fixed modal theme configuration to use dark background colors
components/publisher/CreatePublisherModal.tsx Refactored to use the new shared form component
pages/publishers/create.tsx Refactored to use the new shared form component
components/publisher/CreatePublisherFormContent.tsx New shared component containing the publisher creation form logic
components/publisher/CreatePublisherModal.stories.tsx Storybook story for testing the modal component
components/pages/create.stories.tsx Storybook story for testing the page layout

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

/>
</div>

<div className="flex center gap-4">
Copy link

Copilot AI Oct 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The className 'center' is not a valid Tailwind CSS utility class. This should be 'justify-center' or 'items-center' depending on the intended alignment. Based on the context and similar patterns in the codebase, this should likely be 'justify-center'.

Suggested change
<div className="flex center gap-4">
<div className="flex justify-center gap-4">

Copilot uses AI. Check for mistakes.
{!isLoadingValidation &&
publisherValidationError && (
<>
<span className="font-medium"></span>{' '}
Copy link

Copilot AI Oct 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This empty span with only a className serves no purpose and should be removed. The space character following it can be achieved through other means if needed.

Suggested change
<span className="font-medium"></span>{' '}
{' '}

Copilot uses AI. Check for mistakes.
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.

fix create-publisehr modal background

2 participants