Skip to content

Restyle publishing flow#170

Merged
kapicic merged 5 commits intomainfrom
stevan/eng-1039
Sep 23, 2025
Merged

Restyle publishing flow#170
kapicic merged 5 commits intomainfrom
stevan/eng-1039

Conversation

@kapicic
Copy link
Copy Markdown
Contributor

@kapicic kapicic commented Sep 18, 2025

📋 Pull Request Summary

This PR aligns all the publishing flow components with the design in figma.

🔗 Related Issues

  • Fixes #
  • Relates to #

📝 Changes Made

🧪 Testing

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed
  • All existing tests pass

Testing Details:

📚 Documentation

  • Code is self-documenting with clear variable/function names
  • Added/updated JSDoc comments for public APIs
  • Updated README.md if needed
  • Updated other documentation files
  • No documentation changes needed

🔄 Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📝 Documentation update
  • 🔧 Refactoring (no functional changes)
  • ⚡ Performance improvement
  • 🧪 Test improvements

🚨 Breaking Changes

  • This PR introduces breaking changes
  • Migration guide provided
  • Deprecation warnings added

Breaking Change Details:

📸 Screenshots/Videos

📋 Additional Notes

@kapicic kapicic self-assigned this Sep 18, 2025
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Summary of Changes

Hello @kapicic, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a comprehensive refactoring and restyling of the application's publishing flow. The core intent is to align the user experience with a new Figma design, simplify the management of publishing methods by deriving their names from providers, and update the underlying API and database schema accordingly. These changes aim to make the publishing process more intuitive and visually consistent.

Highlights

  • Renaming Terminology: The term 'Deployment Methods' has been consistently renamed to 'Publishing Methods' across the user interface and backend logic to better reflect its purpose.
  • Simplified Publishing Method Naming: The explicit 'name' field for publishing methods has been removed. Instead, the name is now automatically derived from the selected provider (e.g., Vercel, Netlify, AWS), streamlining the creation and management process.
  • UI/UX Redesign for Publishing Flow: The user interface for managing publishing methods has been updated to align with a new Figma design. This includes new provider-specific icons, a more compact and informative progress modal, and streamlined forms for adding and editing methods.
  • Backend API and Database Updates: The backend API endpoints for creating and updating publishing methods (/api/deployment-methods) no longer require or accept a 'name' field. A new database migration has been added to drop the 'name' column from the deployment_method table and update its unique constraint.
  • Enhanced Deployment Progress Modal: The deployment progress modal has been transformed into a smaller, fixed-position popup that appears relative to the publish button. It now provides a more concise overview of the current publishing step without displaying detailed logs directly within the modal.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the "Deployment Methods" feature to "Publishing Methods", removing the user-defined name for these methods and instead deriving it from the provider. It also includes a major redesign of the publishing flow UI, changing the progress modal into a less intrusive popover. The changes are extensive, touching the database schema, backend services, API routes, and frontend components. The implementation appears consistent and correct according to the PR's goal. I've provided a few suggestions to improve code organization and maintainability in the React components.

Comment on lines +20 to +59
const getProviderIcon = (provider: string) => {
const iconContainerStyle = {
display: 'flex',
width: '60px',
height: '60px',
justifyContent: 'center',
alignItems: 'center',
gap: '10px',
flexShrink: 0,
borderRadius: '8px',
background: '#33373E',
};

switch (provider) {
case 'VERCEL':
return (
<div style={iconContainerStyle}>
<img src="/icons/vercel.svg" alt="Vercel" className="w-8 h-8" />
</div>
);
case 'NETLIFY':
return (
<div style={iconContainerStyle}>
<img src="/icons/netlify.svg" alt="Netlify" className="w-8 h-8" />
</div>
);
case 'AWS':
return (
<div style={iconContainerStyle}>
<img src="/icons/aws.svg" alt="AWS" className="w-8 h-8" />
</div>
);
default:
return (
<div style={iconContainerStyle}>
<Rocket className="w-8 h-8 text-accent-500" />
</div>
);
}
};
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The iconContainerStyle object uses inline styles. It's a best practice to use Tailwind CSS classes for styling to maintain consistency with the rest of the codebase and leverage the benefits of the framework. This also helps in centralizing styles and making them more reusable.

The background color #33373E is a magic value. Consider adding it to your Tailwind theme configuration if it's used in multiple places.

const getProviderIcon = (provider: string) => {
  const iconContainerClasses = 'flex w-[60px] h-[60px] justify-center items-center gap-[10px] flex-shrink-0 rounded-lg bg-[#33373E]';

  switch (provider) {
    case 'VERCEL':
      return (
        <div className={iconContainerClasses}>
          <img src="/icons/vercel.svg" alt="Vercel" className="w-8 h-8" />
        </div>
      );
    case 'NETLIFY':
      return (
        <div className={iconContainerClasses}>
          <img src="/icons/netlify.svg" alt="Netlify" className="w-8 h-8" />
        </div>
      );
    case 'AWS':
      return (
        <div className={iconContainerClasses}>
          <img src="/icons/aws.svg" alt="AWS" className="w-8 h-8" />
        </div>
      );
    default:
      return (
        <div className={iconContainerClasses}>
          <Rocket className="w-8 h-8 text-accent-500" />
        </div>
      );
  }
};

Comment on lines +61 to +73
// Helper function to get provider display name
const getProviderDisplayName = (provider: string) => {
switch (provider) {
case 'VERCEL':
return 'Vercel';
case 'NETLIFY':
return 'Netlify';
case 'AWS':
return 'AWS';
default:
return provider;
}
};
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The getProviderIcon and getProviderDisplayName functions use separate switch statements over the same set of provider keys. This can lead to maintenance issues, as adding a new provider requires updates in multiple places.

Consider refactoring this into a single configuration object that holds all provider-specific information (display name, icon component, etc.). This would improve maintainability and make the code cleaner. For example:

const providerDetails = {
  VERCEL: {
    displayName: 'Vercel',
    icon: <img src=\"/icons/vercel.svg\" alt=\"Vercel\" className=\"w-8 h-8\" />
  },
  // ... other providers
};

const getProviderDisplayName = (provider) => providerDetails[provider]?.displayName || provider;
// etc.

} from '~/types/deployment-methods';
import { useDeploymentMethodActions, useDeploymentMethodsStore } from '~/lib/stores/deploymentMethods';

export type CredentialType = 'API_KEY' | 'ACCESS_KEY' | 'SECRET_KEY' | 'REGION';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The CredentialType is defined and exported from this component, and then imported by EditDeploymentMethodForm.tsx. To avoid this direct dependency between two components and to improve code organization, it would be better to move this type definition to a more central, shared location, such as app/types/deployment-methods.ts.

@mlanlazc
Copy link
Copy Markdown
Contributor

Could you add some screenshots?

@kapicic
Copy link
Copy Markdown
Contributor Author

kapicic commented Sep 22, 2025

@mlanlazc
image
image
image
image

@kapicic kapicic merged commit a1c8738 into main Sep 23, 2025
10 checks passed
@kapicic kapicic deleted the stevan/eng-1039 branch September 23, 2025 09:02
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.

2 participants