Skip to content

feat(renderer): button title changes#1589

Merged
johbaxter merged 7 commits intodevfrom
1568_cloning_app_model
Jul 29, 2025
Merged

feat(renderer): button title changes#1589
johbaxter merged 7 commits intodevfrom
1568_cloning_app_model

Conversation

@KirthikaKumar-K
Copy link
Copy Markdown
Contributor

Description

Changes Made

How to Test

  1. Steps to reproduce/test the behavior
  2. Expected outcomes

Notes

@KirthikaKumar-K KirthikaKumar-K requested a review from a team as a code owner July 24, 2025 13:38
@KirthikaKumar-K KirthikaKumar-K linked an issue Jul 24, 2025 that may be closed by this pull request
2 tasks
@github-actions
Copy link
Copy Markdown

@CodiumAI-Agent /describe

@QodoAI-Agent
Copy link
Copy Markdown

Title

feat(renderer): button title changes


User description

Description

Changes Made

How to Test

  1. Steps to reproduce/test the behavior
  2. Expected outcomes

Notes


PR Type

Enhancement


Description

  • Add buttonTitle prop to SaveAppModal

  • Use buttonTitle for last-step button label

  • Pass "Clone" in AddAppCloneModal

  • Pass "Upload" in AddAppModal


Diagram Walkthrough

flowchart LR
  A["AddAppCloneModal"] -->|buttonTitle: \"Clone\"| C["SaveAppModal"]
  B["AddAppModal"] -->|buttonTitle: \"Upload\"| C
  C["SaveAppModal"] -->|uses buttonTitle on last step| D["Next Button Label"]
Loading

File Walkthrough

Relevant files
Enhancement
SaveAppModal.tsx
Add `buttonTitle` prop and use in label                                   

packages/client/src/components/app/save-app/SaveAppModal.tsx

  • Define buttonTitle in SaveAppProps interface
  • Destructure buttonTitle from props
  • Update nextStepLabel to use buttonTitle on last step
+4/-1     
AddAppCloneModal.tsx
Set clone modal button title                                                         

packages/client/src/components/app/save-app/AddAppCloneModal.tsx

  • Pass buttonTitle="Clone" to SaveAppModal
+1/-0     
AddAppModal.tsx
Set upload modal button title                                                       

packages/client/src/components/app/save-app/AddAppModal.tsx

  • Pass buttonTitle="Upload" to SaveAppModal
+1/-0     

@github-actions
Copy link
Copy Markdown

@CodiumAI-Agent /review

@QodoAI-Agent
Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Missing default for buttonTitle

The new buttonTitle prop is required, but there's no default value. If SaveAppModal is used elsewhere without passing this prop, nextStepLabel may render undefined on the final step. Consider providing a default value in the prop destructuring or defining a defaultProp.

    buttonTitle: string;
}

export const SaveAppModal = (props: SaveAppProps) => {
    const {
        errorMessage,
        defaultFormValues,
        handleFormSubmit,
        handleClose,
        open,
        steps,
        title,
        buttonTitle,

@github-actions
Copy link
Copy Markdown

@CodiumAI-Agent /improve

@QodoAI-Agent
Copy link
Copy Markdown

PR Code Suggestions ✨

CategorySuggestion                                                                                                                                    Impact
General
Guard against missing button title

Add a fallback in the ternary to guard against an empty or undefined buttonTitle at
runtime. This protects against missing or empty strings and keeps the button label
meaningful.

packages/client/src/components/app/save-app/SaveAppModal.tsx [98-99]

 const nextStepLabel =
-    currentStepIndex === steps.length - 1 ? buttonTitle : 'Next';
+    currentStepIndex === steps.length - 1
+      ? (buttonTitle || 'Upload')
+      : 'Next';
Suggestion importance[1-10]: 4

__

Why: Introducing a fallback for buttonTitle improves runtime safety, but the prop is mandatory by type and always passed in this PR, so the benefit is marginal and the 'Upload' default may not always be appropriate.

Low
Add default button title

Provide a default for buttonTitle in the destructuring so it never ends up undefined
if a consumer forgets to pass it. This ensures that nextStepLabel always has a valid
string fallback.

packages/client/src/components/app/save-app/SaveAppModal.tsx [46-55]

 const {
     errorMessage,
     defaultFormValues,
     handleFormSubmit,
     handleClose,
     open,
     steps,
     title,
-    buttonTitle,
+    buttonTitle = 'Upload',
 } = props;
Suggestion importance[1-10]: 3

__

Why: Providing a default buttonTitle is redundant since the prop is already required and explicitly passed in both call sites, and the hardcoded 'Upload' fallback could be misleading for other uses.

Low

@KirthikaKumar-K KirthikaKumar-K marked this pull request as draft July 25, 2025 05:51
@KirthikaKumar-K KirthikaKumar-K marked this pull request as ready for review July 25, 2025 11:02
@johbaxter johbaxter merged commit 8574f76 into dev Jul 29, 2025
3 checks passed
@johbaxter johbaxter deleted the 1568_cloning_app_model branch July 29, 2025 17:19
@github-actions
Copy link
Copy Markdown

@CodiumAI-Agent /update_changelog

@QodoAI-Agent
Copy link
Copy Markdown

Changelog updates: 🔄

2025-07-29 *

Changed

  • Support custom submitBtnText prop in SaveAppModal and apply to clone/upload modals
  • Update default action button titles to “Clone” and “Upload”
  • Refactor button title props and related renderer components

to commit the new content to the CHANGELOG.md file, please type:
'/update_changelog --pr_update_changelog.push_changelog_changes=true'

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.

Change "Upload" to "Clone" in cloning app modal

3 participants