Skip to content

fix: making import messaging artifact agnostic#39869

Merged
brayn003 merged 9 commits intoreleasefrom
chore/git-fixes-1
Mar 24, 2025
Merged

fix: making import messaging artifact agnostic#39869
brayn003 merged 9 commits intoreleasefrom
chore/git-fixes-1

Conversation

@brayn003
Copy link
Contributor

@brayn003 brayn003 commented Mar 23, 2025

Description

Fixes #39868
Fixes #39875

Automation

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

🔍 Cypress test results

Tip

🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/14030327995
Commit: 910d99b
Cypress dashboard.
Tags: @tag.Git
Spec:


Mon, 24 Mar 2025 09:14:17 UTC

Communication

Should the DevRel and Marketing teams inform users about this change?

  • Yes
  • No

Summary by CodeRabbit

  • New Features

    • Introduced updated user interface prompts for Git import and connection workflows, providing clearer instructions and call-to-action texts.
  • Bug Fixes

    • Corrected capitalization in tooltips for consistency, changing "git repo" to "Git repo."
  • Refactor

    • Streamlined messaging across Git integration steps to ensure a consistent and intuitive user experience.
    • Simplified text output for Git import messaging.
    • Added a new variable to track modified modules in status change calculations.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 23, 2025

Walkthrough

This pull request introduces new constants for Git-related messaging in the client application. Two new constant objects, IMPORT_GIT and CONNECT_GIT, are added with multiple text properties used across the UI. The ConnectInitialize component has been refactored to remove obsolete message constants and replace them with direct references to these new objects. This streamlines how Git messaging is handled for modal headings, action prompts, and status messages, ensuring that the messaging remains artifact agnostic.

Changes

File Path Change Summary
app/.../git/ce/constants/messages.tsx Added new constants IMPORT_GIT and CONNECT_GIT with various text properties for Git messaging, including modal titles, call-to-actions, and wait texts.
app/.../git/components/ConnectModal/ConnectInitialize/index.tsx Removed several obsolete message constants and the createMessage function; updated message references to use properties from the new IMPORT_GIT and CONNECT_GIT objects.
app/.../git/components/QuickActions/hooks/useStatusChangeCount.ts Added a new variable modifiedModules initialized to 0 in the calcStatusChangeCount function, contributing to the count of modified items.
app/.../ce/constants/messages.ts Modified the message returned by IMPORT_APP_FROM_GIT_MESSAGE to simplify the text output.
app/.../git/components/QuickActions/ConnectButton.test.tsx Updated tooltip text in the ConnectButton test to reflect capitalization changes from "git repo" to "Git repo."

Assessment against linked issues

Objective (Linked Issues) Addressed Explanation
Git messaging artifact agnostic (#39868)

Possibly related PRs

  • chore: remove anvil flag for git #39785: The changes in the main PR are related to the modifications in the app/client/src/ce/constants/messages.ts file, as both PRs involve updates to message constants, although they focus on different constants.
  • chore: client side changes for git api contracts #38970: The changes in the main PR are related to the new constants IMPORT_GIT and CONNECT_GIT, which are directly referenced in the ConnectInitialize component of the retrieved PR, indicating a strong connection at the code level.
  • fix: added fix for commit messages #39134: The changes in the main PR are related to the modifications in the retrieved PR as both involve updates to constants and their usage in the code, specifically in the context of Git-related functionalities.

Suggested labels

Integrations Product, Integrations Pod General, skip-changelog

Suggested reviewers

  • ashit-rath
  • ApekshaBhosale
  • nidhi-nair

Poem

In a world of code where constants gleam,
Git messages now flow like a dream.
Old calls replaced with clarity and light,
Step by step, everything’s streamlined just right.
Cheers to cleaner code and a smoother scene!
🚀✨


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro (Legacy)

📥 Commits

Reviewing files that changed from the base of the PR and between 8357321 and 910d99b.

📒 Files selected for processing (1)
  • app/client/src/ce/constants/messages.ts (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • app/client/src/ce/constants/messages.ts
⏰ Context from checks skipped due to timeout of 90000ms (8)
  • GitHub Check: perform-test / client-build / client-build
  • GitHub Check: perform-test / rts-build / build
  • GitHub Check: perform-test / server-build / server-unit-tests
  • GitHub Check: client-unit-tests / client-unit-tests
  • GitHub Check: client-prettier / prettier-check
  • GitHub Check: client-lint / client-lint
  • GitHub Check: client-build / client-build
  • GitHub Check: client-check-cyclic-deps / check-cyclic-dependencies

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@brayn003 brayn003 self-assigned this Mar 23, 2025
@github-actions github-actions bot added Git Product Issues related to version control product Packages & Git Pod All issues belonging to Packages and Git Task A simple Todo labels Mar 23, 2025
@brayn003 brayn003 added ok-to-test Required label for CI and removed Git Product Issues related to version control product Task A simple Todo Packages & Git Pod All issues belonging to Packages and Git labels Mar 23, 2025
@github-actions github-actions bot added Git Product Issues related to version control product Packages & Git Pod All issues belonging to Packages and Git Task A simple Todo Bug Something isn't working labels Mar 23, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
app/client/src/git/ce/constants/messages.tsx (1)

4-4: Inconsistent ellipsis usage.

The wait text here uses two dots, while CONNECT_GIT.WAIT_TEXT on line 15 uses three dots. For consistency, the standard ellipsis should have three dots.

-  WAIT_TEXT: "Please wait while we import via Git..",
+  WAIT_TEXT: "Please wait while we import via Git...",
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 37b4aca and 1d19b8f.

📒 Files selected for processing (2)
  • app/client/src/git/ce/constants/messages.tsx (1 hunks)
  • app/client/src/git/components/ConnectModal/ConnectInitialize/index.tsx (6 hunks)
🧰 Additional context used
🧬 Code Definitions (1)
app/client/src/git/components/ConnectModal/ConnectInitialize/index.tsx (1)
app/client/src/git/ce/constants/messages.tsx (2)
  • CONNECT_GIT (7-17)
  • IMPORT_GIT (1-5)
⏰ Context from checks skipped due to timeout of 90000ms (8)
  • GitHub Check: perform-test / rts-build / build
  • GitHub Check: perform-test / client-build / client-build
  • GitHub Check: perform-test / server-build / server-unit-tests
  • GitHub Check: client-unit-tests / client-unit-tests
  • GitHub Check: client-prettier / prettier-check
  • GitHub Check: client-lint / client-lint
  • GitHub Check: client-check-cyclic-deps / check-cyclic-dependencies
  • GitHub Check: client-build / client-build
🔇 Additional comments (7)
app/client/src/git/ce/constants/messages.tsx (2)

1-5: New Git import constants look good.

The IMPORT_GIT constant object with text properties for Git import functionality provides clear, reusable messages.


7-17: New Git connection constants are well-structured.

The CONNECT_GIT constant object provides comprehensive text properties for various stages of the Git connection process.

app/client/src/git/components/ConnectModal/ConnectInitialize/index.tsx (5)

44-44: Step texts updated to use constants.

Step text definitions now reference the new constants, which improves maintainability.

Also applies to: 48-49, 52-53


88-93: Next step button texts updated appropriately.

The nextStepText object now references the constants with proper conditional logic for import vs. connect scenarios.


201-202: Modal header now uses contextual constants.

The modal header now dynamically displays either the import or connect title based on the isImport flag.


240-241: Status message updated to use constants.

The loading status message now uses the appropriate constant based on the operation type.


267-268: Previous step button text updated.

Button text now uses the CONNECT_GIT.PREV_STEP constant, improving consistency.

ankitakinger
ankitakinger previously approved these changes Mar 24, 2025
@github-actions github-actions bot added Low An issue that is neither critical nor breaks a user flow Needs Triaging Needs attention from maintainers to triage Packages Product Issues related to packages Release labels Mar 24, 2025
@brayn003 brayn003 merged commit 0c7c05d into release Mar 24, 2025
47 checks passed
@brayn003 brayn003 deleted the chore/git-fixes-1 branch March 24, 2025 09:15
github-actions bot pushed a commit to Zeral-Zhang/appsmith that referenced this pull request Apr 12, 2025
## Description

Fixes appsmithorg#39868
Fixes appsmithorg#39875

## 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/14030327995>
> Commit: 910d99b
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=14030327995&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Git`
> Spec:
> <hr>Mon, 24 Mar 2025 09:14:17 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 updated user interface prompts for Git import and
connection workflows, providing clearer instructions and call-to-action
texts.

- **Bug Fixes**
- Corrected capitalization in tooltips for consistency, changing "git
repo" to "Git repo."

- **Refactor**
- Streamlined messaging across Git integration steps to ensure a
consistent and intuitive user experience.
  - Simplified text output for Git import messaging.
- Added a new variable to track modified modules in status change
calculations.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working Git Product Issues related to version control product Low An issue that is neither critical nor breaks a user flow Needs Triaging Needs attention from maintainers to triage ok-to-test Required label for CI Packages & Git Pod All issues belonging to Packages and Git Packages Product Issues related to packages Release Task A simple Todo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: [Git With Packages ] Update text in import modal from app to app/packages [Task]: Make git messaging artifact agnostic

2 participants