Skip to content

Commit

Permalink
fix: fixing cta for git import modal (#36364)
Browse files Browse the repository at this point in the history
## Description
Fixes CTA for git import modal to "Import App"

Fixes #32388

## Automation

/ok-to-test tags="@tag.Git"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/10958198926>
> Commit: 3a4468f
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10958198926&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Git`
> Spec:
> <hr>Fri, 20 Sep 2024 11:44:10 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Introduced a new call-to-action message for importing an app,
enhancing user guidance.
- Improved the Git connection process by providing context-sensitive
messages based on the import state.

- **Bug Fixes**
- Adjusted the text displayed during the Git connection steps to reflect
the import status dynamically.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
brayn003 authored Sep 20, 2024
1 parent 0ad0989 commit e798ec6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
1 change: 1 addition & 0 deletions app/client/src/ce/constants/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,7 @@ export const GIT_DISCONNECT_POPUP_MAIN_HEADING = () => `Are you sure?`;
export const CONFIGURE_GIT = () => "Configure Git";
export const IMPORT_APP = () => "Import app via Git";
export const SETTINGS_GIT = () => "Settings";
export const IMPORT_APP_CTA = () => "Import app";

export const GIT_CONNECTION = () => "Git connection";
export const GIT_IMPORT = () => "Git import";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
GENERATE_SSH_KEY_STEP,
GIT_CONNECT_WAITING,
GIT_IMPORT_WAITING,
IMPORT_APP_CTA,
PREVIOUS_STEP,
createMessage,
} from "ee/constants/messages";
Expand Down Expand Up @@ -83,12 +84,6 @@ const steps = [

const possibleSteps = steps.map((s) => s.key);

const nextStepText = {
[GIT_CONNECT_STEPS.CHOOSE_PROVIDER]: createMessage(CONFIGURE_GIT),
[GIT_CONNECT_STEPS.GENERATE_SSH_KEY]: createMessage(GENERATE_SSH_KEY_STEP),
[GIT_CONNECT_STEPS.ADD_DEPLOY_KEY]: createMessage(CONNECT_GIT_TEXT),
};

interface FormDataState {
gitProvider?: GitProvider;
gitEmptyRepoExists?: string;
Expand All @@ -109,6 +104,14 @@ function GitConnectionV2({ isImport = false }: GitConnectionV2Props) {
const isImportingViaGit = useSelector(getIsImportingApplicationViaGit);
const dispatch = useDispatch();

const nextStepText = {
[GIT_CONNECT_STEPS.CHOOSE_PROVIDER]: createMessage(CONFIGURE_GIT),
[GIT_CONNECT_STEPS.GENERATE_SSH_KEY]: createMessage(GENERATE_SSH_KEY_STEP),
[GIT_CONNECT_STEPS.ADD_DEPLOY_KEY]: createMessage(
isImport ? IMPORT_APP_CTA : CONNECT_GIT_TEXT,
),
};

const [formData, setFormData] = useState<FormDataState>({
gitProvider: undefined,
gitEmptyRepoExists: undefined,
Expand Down

0 comments on commit e798ec6

Please sign in to comment.