-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Added back the pencil icon for editable text component #35855
Conversation
WalkthroughThe recent changes to the Changes
Assessment against linked issues
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
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 as PR comments)
Additionally, you can add Documentation and Community
|
/build-deploy-preview skip-test=true |
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/10520715879. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Outside diff range, codebase verification and nitpick comments (1)
app/client/packages/design-system/ads-old/src/EditableTextSubComponent/index.tsx (1)
220-230
: Add comments to explain icon display logic.The logic for determining
iconName
is well-structured, but adding comments to explain the conditions for each icon would enhance readability and maintainability.Consider adding comments like this:
const iconName = // Show pencil icon when not editing and saving has not started !isEditing && savingState === SavingState.NOT_STARTED && !props.hideEditIcon ? "pencil-line" // Show success icon when saving is successful : !isEditing && savingState === SavingState.SUCCESS ? "success" // Show error icon when there is an error or invalid input while editing : savingState === SavingState.ERROR || (isEditing && !!isInvalid) ? "error" // No icon otherwise : undefined;
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (1)
- app/client/packages/design-system/ads-old/src/EditableTextSubComponent/index.tsx (3 hunks)
Additional comments not posted (1)
app/client/packages/design-system/ads-old/src/EditableTextSubComponent/index.tsx (1)
254-258
: LGTM! Verify theIcon
component usage.The rendering logic for displaying the spinner and icons is clear and aligns with the intended functionality.
Ensure that the
Icon
component is correctly imported and used throughout the codebase.Run the following script to verify the
Icon
component usage:Verification successful
Let's correct the approach and verify the usage of the
Icon
component by searching within.tsx
files. We'll usefd
to locate these files and then search for theIcon
component within them.
The
Icon
component is correctly used throughout the codebase.The extensive and consistent usage of the
Icon
component across various files confirms that it is properly integrated and utilized. There are no issues with its implementation.
- The
Icon
component is used with variousname
andsize
attributes, indicating flexibility and correct usage.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of the `Icon` component in the codebase. # Test: Search for the `Icon` component usage. Expect: Correct usage of the `Icon` component. rg --type tsx -A 5 $'<Icon name='Length of output: 62
Script:
#!/bin/bash # Description: Verify the usage of the `Icon` component in the codebase. # Find all .tsx files and search for the usage of the `Icon` component. fd --extension tsx --exec rg '<Icon name='Length of output: 9647
Deploy-Preview-URL: https://ce-35855.dp.appsmith.com |
…o blocker/pencil-icon-editable-content
## Description Editable text in application name and workspace name was removed by some of recent ads migrations. This PR adds those icons back. Fixes #35853 ## Automation /ok-to-test tags="@tag.All" ### 🔍 Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!CAUTION] > 🔴 🔴 🔴 Some tests have failed. > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/10553233212> > Commit: 8a2adfe > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10553233212&attempt=1&selectiontype=test&testsstatus=failed&specsstatus=fail" target="_blank">Cypress dashboard</a>. > Tags: @tag.All > Spec: > The following are new failures, please fix them before merging the PR: <ol> > <li>cypress/e2e/Regression/ClientSide/Git/GitDiscardChange/DiscardChanges_spec.js > <li>cypress/e2e/Regression/ClientSide/Git/GitSync/SwitchBranches_spec.js > <li>cypress/e2e/Regression/ClientSide/Git/GitWithAutoLayout/conversion_of_git_connected_apps_spec.js > <li>cypress/e2e/Regression/ClientSide/Git/GitWithJSLibrary/GitwithCustomJSLibrary_spec.js > <li>cypress/e2e/Regression/ClientSide/MobileResponsiveTests/ConversionFlow_Corner_Cases_spec.ts</ol> > <a href="https://internal.appsmith.com/app/cypress-dashboard/identified-flaky-tests-65890b3c81d7400d08fa9ee3?branch=master" target="_blank">List of identified flaky tests</a>. > <hr>Mon, 26 Aug 2024 04:55:56 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [x] No <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Enhanced the Editable Text component with dynamic icon display reflecting editing and saving states. - Introduced visual feedback through icons like "pencil-line," "success," and "error," improving user interaction. - **Bug Fixes** - Resolved issues with visual feedback during the editing process when saving states were displayed. <!-- end of auto-generated comment: release notes by coderabbit.ai --> (cherry picked from commit 2af307f)
Description
Editable text in application name and workspace name was removed by some of recent ads migrations. This PR adds those icons back.
Fixes #35853
Automation
/ok-to-test tags="@tag.All"
🔍 Cypress test results
Caution
🔴 🔴 🔴 Some tests have failed.
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/10553233212
Commit: 8a2adfe
Cypress dashboard.
Tags: @tag.All
Spec:
The following are new failures, please fix them before merging the PR:
Mon, 26 Aug 2024 04:55:56 UTC
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit