🧹 [code health] Refactor ProjectCard complex union type#41
🧹 [code health] Refactor ProjectCard complex union type#41sachasayan wants to merge 1 commit intomainfrom
Conversation
- Introduced `AddProjectCard` for the "Add Project" state. - Simplified `ProjectCard` to strictly accept `ProjectFragment`. - Extracted `ProjectCardContainer` for shared card styling. - Addressed code review feedback by adding explicit return types and matching interface props. - Fixed code smell of using string literal 'add' in a complex union type. Co-authored-by: sachasayan <1666034+sachasayan@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
The
ProjectCardPropsinterface used a complex union typeProjectFragment | null | 'add', which is a code smell. I refactored this by:AddProjectCardcomponent for the "Add Project" functionality.ProjectCardto strictly useProjectFragment, improving type safety and readability.ProjectCardContainerto share the common visual structure and animations between both card types.ProjectLibraryto use these specialized components.pnpm-lock.yaml) were included in the submission.PR created automatically by Jules for task 11050407997298946587 started by @sachasayan