Skip to content

chore: AppIDE new Entity Explorer changes#39557

Merged
hetunandu merged 7 commits intoreleasefrom
chore/ads-app-ide-ee-changes
Mar 6, 2025
Merged

chore: AppIDE new Entity Explorer changes#39557
hetunandu merged 7 commits intoreleasefrom
chore/ads-app-ide-ee-changes

Conversation

@hetunandu
Copy link
Member

@hetunandu hetunandu commented Mar 5, 2025

Description

Just UI changes from #39093

Fixes #39556

Automation

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

🔍 Cypress test results

Tip

🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/13673781581
Commit: b78e21d
Cypress dashboard.
Tags: @tag.IDE
Spec:


Wed, 05 Mar 2025 10:57:58 UTC

Communication

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

  • Yes
  • No

Summary by CodeRabbit

  • New Features

    • Enhanced editable text components now support name normalization with dynamic ellipsis and improved tooltip handling.
    • Entity and widget list views now display names directly with updated expand/collapse icons and refined selection behavior.
    • Context menus reflect conditional interactivity by disabling options based on permissions and item types.
    • New identifiers for list items and context menus improve testing capabilities.
  • Refactor

    • Consolidated property handling and class name assignments across components for consistent behavior.
    • Streamlined data structures and conditional rendering in entity explorers and context menus to enhance clarity and maintainability.
    • Updated components to use direct property access for improved performance and readability.

@hetunandu hetunandu requested a review from a team as a code owner March 5, 2025 05:12
@hetunandu hetunandu requested review from ankitakinger and removed request for a team March 5, 2025 05:12
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 5, 2025

Walkthrough

This pull request implements several targeted updates across various components in the design system and IDE. Changes include enhancing class names for list items, introducing new optional props (such as normalizeName and showEllipsis) to improve tooltip and name normalization behavior, and refining test identifiers across components. Additional modifications update collapse toggle icons and adjust disabled states for menu triggers. Several components now utilize a more streamlined naming approach by removing intermediary mapping objects. Conditional rendering improvements are also introduced to prevent unintended UI behavior in specific contexts.

Changes

File(s) Change Summary
app/client/packages/design-system/ads/src/List/List.tsx Added "t--ide-list-item" to the className concatenation in StyledListItem.
app/client/packages/design-system/ads/src/Templates/EditableEntityName/EditableEntityName.tsx,
.../EditableEntityName/EditableEntityName.types.ts,
app/client/packages/design-system/ads/src/__hooks__/useEditableText/useEditableText.ts
Introduced new props (normalizeName, showEllipsis), added a utility function (isEllipsisActive), and implemented tooltip overflow logic via useEffect and conditional normalization in the hook.
app/client/packages/design-system/ads/src/Templates/EntityContextMenu/EntityContextMenu.tsx,
app/client/src/IDE/Components/EntityContextMenu.tsx
Renamed prop from dataTestid to dataTestId and added an optional dataTestId prop for dynamic test ID assignment.
app/client/packages/design-system/ads/src/Templates/EntityExplorer/EntityGroupsList/EntityGroupsList.tsx,
.../EntityExplorer/EntityItem/EntityItem.tsx,
.../EntityExplorer/EntityItem/EntityItem.types.ts,
.../EntityExplorer/EntityListTree/EntityListTree.tsx,
.../EntityExplorer/EntityListTree/EntityListTree.stories.tsx,
.../EntityExplorer/EntityListTree/EntityListTree.test.tsx,
.../EntityExplorer/EntityListTree/EntityListTree.types.ts
Added dynamic data-testid attributes, removed the intermediary names object in favor of direct name assignments, updated collapse toggle properties (including test ID and data-icon), and introduced a name property in the tree item interface.
app/client/src/pages/AppIDE/components/AppPluginActionEditor/components/ContextMenuItems/Copy.tsx,
app/client/src/pages/AppIDE/components/AppPluginActionEditor/components/ContextMenuItems/Move.tsx
Passed the disabled prop to MenuSubTrigger enabling it to conditionally render as disabled.
app/client/src/pages/AppIDE/components/JSEntityItem/JSEntityItem.tsx Refactored context menu rendering logic with a new canEdit variable and updated selection logic, ensuring the menu is not displayed for main JavaScript collections.
app/client/src/pages/AppIDE/components/UIEntityListTree/UIEntityListTree.tsx,
.../UIEntityListTree/WidgetContextMenu.tsx,
.../UIEntityListTree/WidgetTreeItem.tsx
Enhanced widget tree processing by adding a name property; refactored widget retrieval to use direct item properties and updated styling via clsx.
app/client/src/pages/Editor/JSEditor/AppJSEditorContextMenu.tsx,
app/client/src/pages/Editor/JSEditor/ContextMenuItems/Copy.tsx,
app/client/src/pages/Editor/JSEditor/ContextMenuItems/Move.tsx
Added a conditional early return in the context menu for main JS collections, incorporated a dataTestId attribute, and enabled the disabled prop on sub-trigger components.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant EditableEntityName
    participant DOM
    participant Tooltip
    User->>EditableEntityName: Enters text
    EditableEntityName->>DOM: Check overflow (isEllipsisActive)
    DOM-->>EditableEntityName: Returns overflow status
    EditableEntityName->>EditableEntityName: useEffect updates showTooltip
    EditableEntityName->>Tooltip: Conditionally render tooltip
Loading
sequenceDiagram
    participant Editor
    participant AppJSEditorContextMenu
    participant EntityContextMenu
    Editor->>AppJSEditorContextMenu: Request context menu
    AppJSEditorContextMenu->>AppJSEditorContextMenu: Check jsCollection.isMainJSCollection
    alt Is Main Collection
      AppJSEditorContextMenu-->>Editor: Return null (skip rendering)
    else
      AppJSEditorContextMenu->>EntityContextMenu: Render context menu with dataTestId
      EntityContextMenu-->>Editor: Display context menu
    end
Loading

Possibly related PRs

Suggested labels

Enhancement

Suggested reviewers

  • ankitakinger
  • alex-golovanov

Poem

Code refines with thoughtful art,
New props shine and set apart.
Tooltips bloom when text overflows,
Test IDs clear where logic flows.
Menus and trees now sing in sync,
A code melody more clear than you think!
🚀 Happy refactoring!

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 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 generate docstrings to generate docstrings for this 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.

@github-actions github-actions bot added IDE Navigation Issues/feature requests related to IDE navigation, and context switching IDE Pod Issues that new developers face while exploring the IDE IDE Product Issues related to the IDE Product Task A simple Todo labels Mar 5, 2025
@hetunandu hetunandu added ok-to-test Required label for CI and removed IDE Product Issues related to the IDE Product Task A simple Todo IDE Pod Issues that new developers face while exploring the IDE IDE Navigation Issues/feature requests related to IDE navigation, and context switching labels Mar 5, 2025
@github-actions github-actions bot added skip-changelog Adding this label to a PR prevents it from being listed in the changelog IDE Navigation Issues/feature requests related to IDE navigation, and context switching IDE Pod Issues that new developers face while exploring the IDE IDE Product Issues related to the IDE Product Task A simple Todo labels Mar 5, 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 (8)
app/client/src/IDE/Components/EntityContextMenu.tsx (1)

30-30: Properly implemented the dataTestId prop

The implementation correctly uses the provided dataTestId on the button element.

However, consider providing a default value to ensure this element always has a test identifier even when the prop is not provided.

-data-testid={props.dataTestId}
+data-testid={props.dataTestId || "t--entity-context-menu-trigger"}
app/client/src/pages/AppIDE/components/UIEntityListTree/WidgetContextMenu.tsx (1)

104-113: Improved MenuContent implementation with structured className

The use of clsx for combining classnames and the inclusion of EntityClassNames constants enhances maintainability and consistency across the codebase.

Consider extracting the width value to a constant if this width is used elsewhere in the application for similar context menus.

app/client/packages/design-system/ads/src/Templates/EntityExplorer/EntityGroupsList/EntityGroupsList.tsx (1)

72-72: Enhanced test identification with dynamic testid

Adding a dynamic data-testid based on the item title improves test stability and readability.

Consider handling the case where the title might contain special characters that could cause test selector issues:

-data-testid={`entity-group-item-${(item as ListItemProps)?.title}`}
+data-testid={`entity-group-item-${(item as ListItemProps)?.title?.replace(/[^a-zA-Z0-9-_]/g, '-')}`}
app/client/src/pages/Editor/JSEditor/AppJSEditorContextMenu.tsx (1)

31-33: Remove redundant Boolean call

The Boolean call is unnecessary as the value will already be coerced to a boolean in the if statement.

-  if (Boolean(jsCollection?.isMainJSCollection)) {
+  if (jsCollection?.isMainJSCollection) {
    return null;
  }
🧰 Tools
🪛 Biome (1.9.4)

[error] 31-31: Avoid redundant Boolean call

It is not necessary to use Boolean call when a value will already be coerced to a boolean.
Unsafe fix: Remove redundant Boolean call

(lint/complexity/noExtraBooleanCast)

app/client/src/pages/AppIDE/components/JSEntityItem/JSEntityItem.tsx (2)

41-51: Improved context menu rendering logic

The component now conditionally prevents rendering the context menu for main JS collections, which is appropriate for these special entities.

However, the Boolean call is redundant since the condition will already be coerced to a boolean.

-    if (Boolean(jsAction.isMainJSCollection)) {
+    if (jsAction.isMainJSCollection) {
🧰 Tools
🪛 Biome (1.9.4)

[error] 42-42: Avoid redundant Boolean call

It is not necessary to use Boolean call when a value will already be coerced to a boolean.
Unsafe fix: Remove redundant Boolean call

(lint/complexity/noExtraBooleanCast)


62-65: Extracted permission logic into a dedicated variable

Encapsulating the edit permission logic into a dedicated variable improves code readability and maintainability.

The Boolean call is redundant here as well.

-    () => canManageJSAction && !Boolean(jsAction?.isMainJSCollection),
+    () => canManageJSAction && !jsAction?.isMainJSCollection,
🧰 Tools
🪛 Biome (1.9.4)

[error] 63-63: Avoid redundant Boolean call

It is not necessary to use Boolean call when a value will already be coerced to a boolean.
Unsafe fix: Remove redundant Boolean call

(lint/complexity/noExtraBooleanCast)

app/client/packages/design-system/ads/src/Templates/EditableEntityName/EditableEntityName.tsx (2)

72-73: Consider input placeholder implementation.

The placeholder is defined in the style object rather than as a proper input property. This may not work as expected since placeholder is typically an attribute, not a style property.

- placeholder: "Name",
+ // Remove placeholder from style object

Then, add it to the inputProps object:

  inputProps = useMemo(
    () => ({
      ["data-testid"]: inputTestId,
      onKeyUp: handleKeyUp,
      onChange: handleTitleChange,
      autoFocus: true,
+     placeholder: "Name",
      style: {
        backgroundColor: "var(--ads-v2-color-bg)",
        paddingTop: "4px",
        paddingBottom: "4px",
        top: "-5px",
      },
    }),
    [handleKeyUp, handleTitleChange, inputTestId],
  );

87-88: Consider implementing the suggested tooltip separation.

The comment suggests using two separate tooltips for validation errors and long names. This might be a cleaner implementation as it would separate concerns.

Instead of conditionally configuring a single tooltip, consider:

- // Tooltip can either show the validation error or the name incase of long names
- // Maybe we should use two different tooltips for this @Ankita
- const tooltipProps: TooltipProps = useMemo(
-   () =>
-     validationError
-       ? {
-           content: validationError,
-           placement: "bottom",
-           visible: true,
-           isDisabled: false,
-           mouseEnterDelay: 0,
-           showArrow: true,
-         }
-       : {
-           content: name,
-           placement: "topLeft",
-           visible: !showTooltip,
-           isDisabled: !showTooltip,
-           mouseEnterDelay: 1,
-           showArrow: false,
-         },
-   [name, showTooltip, validationError],
- );
+ // Separate tooltip configurations for validation error and long names
+ const validationTooltipProps = useMemo(
+   () => ({
+     content: validationError,
+     placement: "bottom",
+     visible: !!validationError,
+     isDisabled: !validationError,
+     mouseEnterDelay: 0,
+     showArrow: true,
+   }),
+   [validationError]
+ );
+ 
+ const nameTooltipProps = useMemo(
+   () => ({
+     content: name,
+     placement: "topLeft",
+     visible: showTooltip,
+     isDisabled: !showTooltip,
+     mouseEnterDelay: 1,
+     showArrow: false,
+   }),
+   [name, showTooltip]
+ );
+ 
+ // Then in the JSX, conditionally render the appropriate tooltip
+ {validationError ? (
+   <Tooltip {...validationTooltipProps}>
+     <StyledComponent />
+   </Tooltip>
+ ) : (
+   <Tooltip {...nameTooltipProps}>
+     <StyledComponent />
+   </Tooltip>
+ )}
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 320b168 and 87cb9d6.

📒 Files selected for processing (22)
  • app/client/packages/design-system/ads/src/List/List.tsx (1 hunks)
  • app/client/packages/design-system/ads/src/Templates/EditableEntityName/EditableEntityName.tsx (4 hunks)
  • app/client/packages/design-system/ads/src/Templates/EditableEntityName/EditableEntityName.types.ts (1 hunks)
  • app/client/packages/design-system/ads/src/Templates/EntityContextMenu/EntityContextMenu.tsx (2 hunks)
  • app/client/packages/design-system/ads/src/Templates/EntityExplorer/EntityGroupsList/EntityGroupsList.tsx (1 hunks)
  • app/client/packages/design-system/ads/src/Templates/EntityExplorer/EntityItem/EntityItem.tsx (4 hunks)
  • app/client/packages/design-system/ads/src/Templates/EntityExplorer/EntityItem/EntityItem.types.ts (1 hunks)
  • app/client/packages/design-system/ads/src/Templates/EntityExplorer/EntityListTree/EntityListTree.stories.tsx (2 hunks)
  • app/client/packages/design-system/ads/src/Templates/EntityExplorer/EntityListTree/EntityListTree.test.tsx (6 hunks)
  • app/client/packages/design-system/ads/src/Templates/EntityExplorer/EntityListTree/EntityListTree.tsx (1 hunks)
  • app/client/packages/design-system/ads/src/Templates/EntityExplorer/EntityListTree/EntityListTree.types.ts (1 hunks)
  • app/client/packages/design-system/ads/src/__hooks__/useEditableText/useEditableText.ts (2 hunks)
  • app/client/src/IDE/Components/EntityContextMenu.tsx (2 hunks)
  • app/client/src/pages/AppIDE/components/AppPluginActionEditor/components/ContextMenuItems/Copy.tsx (1 hunks)
  • app/client/src/pages/AppIDE/components/AppPluginActionEditor/components/ContextMenuItems/Move.tsx (1 hunks)
  • app/client/src/pages/AppIDE/components/JSEntityItem/JSEntityItem.tsx (5 hunks)
  • app/client/src/pages/AppIDE/components/UIEntityListTree/UIEntityListTree.tsx (1 hunks)
  • app/client/src/pages/AppIDE/components/UIEntityListTree/WidgetContextMenu.tsx (3 hunks)
  • app/client/src/pages/AppIDE/components/UIEntityListTree/WidgetTreeItem.tsx (5 hunks)
  • app/client/src/pages/Editor/JSEditor/AppJSEditorContextMenu.tsx (1 hunks)
  • app/client/src/pages/Editor/JSEditor/ContextMenuItems/Copy.tsx (1 hunks)
  • app/client/src/pages/Editor/JSEditor/ContextMenuItems/Move.tsx (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • app/client/packages/design-system/ads/src/List/List.tsx
🧰 Additional context used
🪛 Biome (1.9.4)
app/client/src/pages/Editor/JSEditor/AppJSEditorContextMenu.tsx

[error] 31-31: Avoid redundant Boolean call

It is not necessary to use Boolean call when a value will already be coerced to a boolean.
Unsafe fix: Remove redundant Boolean call

(lint/complexity/noExtraBooleanCast)

app/client/src/pages/AppIDE/components/JSEntityItem/JSEntityItem.tsx

[error] 42-42: Avoid redundant Boolean call

It is not necessary to use Boolean call when a value will already be coerced to a boolean.
Unsafe fix: Remove redundant Boolean call

(lint/complexity/noExtraBooleanCast)


[error] 63-63: Avoid redundant Boolean call

It is not necessary to use Boolean call when a value will already be coerced to a boolean.
Unsafe fix: Remove redundant Boolean call

(lint/complexity/noExtraBooleanCast)

⏰ Context from checks skipped due to timeout of 90000ms (11)
  • GitHub Check: perform-test / client-build / client-build
  • GitHub Check: perform-test / server-build / server-unit-tests
  • GitHub Check: perform-test / rts-build / build
  • GitHub Check: client-unit-tests / client-unit-tests
  • GitHub Check: client-check-cyclic-deps / check-cyclic-dependencies
  • GitHub Check: client-build / client-build
  • GitHub Check: client-prettier / prettier-check
  • GitHub Check: client-lint / client-lint
  • GitHub Check: chromatic-deployment
  • GitHub Check: storybook-tests
  • GitHub Check: chromatic-deployment
🔇 Additional comments (39)
app/client/src/pages/Editor/JSEditor/ContextMenuItems/Copy.tsx (1)

34-34: Proper disabled state propagation implemented.

The addition of the disabled prop to MenuSubTrigger ensures consistent state propagation from parent to child components.

app/client/packages/design-system/ads/src/Templates/EntityExplorer/EntityItem/EntityItem.types.ts (1)

24-25: Well-documented enhancement for name normalization.

The addition of the optional normalizeName property with appropriate documentation provides flexible control over entity name handling during the rename process.

app/client/packages/design-system/ads/src/Templates/EntityExplorer/EntityListTree/EntityListTree.types.ts (1)

7-7:

Details

❓ Verification inconclusive

Verify all implementations include the new required property.

Adding the required name property to EntityListTreeItem interface enhances identification but might cause breaking changes if not all implementations are updated.


🏁 Script executed:

#!/bin/bash
# Search for implementations of EntityListTreeItem to verify they include the name property

# Find where EntityListTreeItem is constructed or defined
rg "EntityListTreeItem\s*(\{|\[)" --type ts

Length of output: 467


Action Required: Verify that all instantiations of EntityListTreeItem include the new name property

The interface update in
app/client/packages/design-system/ads/src/Templates/EntityExplorer/EntityListTree/EntityListTree.types.ts
now mandates a name: string; property. Our repository search only shows the updated interface definition and no obvious literal implementations missing this property.

  • Confirm that any object literal or constructor using EntityListTreeItem supplies a valid name value.
  • Double-check areas invoking this interface (even outside the immediate file) to prevent potential type errors.
app/client/src/pages/Editor/JSEditor/ContextMenuItems/Move.tsx (1)

44-44: Proper disabled state propagation implemented.

The addition of the disabled prop to MenuSubTrigger ensures proper state reflection and maintains UI consistency with the Copy component implementation.

app/client/src/IDE/Components/EntityContextMenu.tsx (1)

12-12: Good addition for improving component testability

Adding an optional dataTestId prop allows for more flexible testing configurations.

app/client/src/pages/AppIDE/components/UIEntityListTree/UIEntityListTree.tsx (1)

18-18: Appropriate addition of name property

Including the widget's name in the enhanced items tree is a good approach for maintaining proper identification in the UI.

app/client/src/pages/AppIDE/components/UIEntityListTree/WidgetContextMenu.tsx (1)

25-26: Good addition of necessary imports

The imports for EntityClassNames and clsx appropriately support the updated component implementation.

app/client/packages/design-system/ads/src/Templates/EntityExplorer/EntityListTree/EntityListTree.tsx (2)

52-54: Enhanced icon state representation in DOM

The addition of the data-icon attribute improves component testability by making the current expansion state directly accessible in the DOM structure.


56-56: Updated test identifier for better semantic clarity

Renaming the test ID from what appears to be t--entity-item-expand-icon to t--entity-collapse-toggle better reflects the component's purpose, which is to toggle the collapse state.

app/client/src/pages/AppIDE/components/AppPluginActionEditor/components/ContextMenuItems/Copy.tsx (1)

34-34: Added disabled state propagation to MenuSubTrigger

Good implementation of the disabled state. The menu trigger now respects the parent component's disabled state, ensuring consistent UI behavior and preventing confusing user interactions.

app/client/packages/design-system/ads/src/Templates/EditableEntityName/EditableEntityName.types.ts (1)

27-29:

Details

✅ Verification successful

Added configuration options for name handling and display

The addition of normalizeName and showEllipsis optional properties enhances the flexibility of the component. These well-documented props allow for better control over naming conventions and text overflow handling.

Make sure to implement these properties correctly in the component implementation file to ensure proper name normalization and ellipsis behavior.


🏁 Script executed:

#!/bin/bash
# Check if the new props are properly implemented in the component
rg -A 5 -B 5 "normalizeName|showEllipsis" --type typescript app/client/packages/design-system/ads/src/Templates/EditableEntityName/EditableEntityName.tsx

Length of output: 190


🏁 Script executed:

#!/bin/bash
# Re-run searchable pattern to verify the new props implementation in the component without using an unrecognized file type flag.
rg -A 5 -B 5 "normalizeName|showEllipsis" app/client/packages/design-system/ads/src/Templates/EditableEntityName/EditableEntityName.tsx

Length of output: 1432


Confirmed: Configuration Options Implemented Correctly

The new props (normalizeName and showEllipsis) have been successfully integrated. Verification confirms that:

  • They are declared as optional properties in the types file with clear documentation.
  • They are appropriately destructured with default values in the component file.
  • The ellipsis behavior is properly handled via the conditional logic in the useEffect hook.

No further changes are needed.

app/client/src/pages/AppIDE/components/AppPluginActionEditor/components/ContextMenuItems/Move.tsx (1)

45-45: Added disabled state propagation to MenuSubTrigger

Effective implementation of the disabled state for the Move operation. This change ensures UI consistency with the Copy operation and provides appropriate visual feedback to users when actions are unavailable.

app/client/packages/design-system/ads/src/Templates/EntityContextMenu/EntityContextMenu.tsx (3)

17-17: Standardizing prop naming convention

Updated prop name from dataTestid to dataTestId for consistency with other component props in the codebase, improving maintainability.


25-25: Updated destructuring to match interface change

Correctly updated the destructured prop name to match the interface change.


43-43: Updated attribute to use new prop name

The data-testid attribute now correctly uses the renamed dataTestId prop.

app/client/src/pages/Editor/JSEditor/AppJSEditorContextMenu.tsx (1)

36-36: Updated to use consistent dataTestId prop

Added the test ID for the EntityContextMenu component in line with the prop renaming in the component definition.

app/client/packages/design-system/ads/src/Templates/EntityExplorer/EntityItem/EntityItem.tsx (4)

20-20: Added normalizeName prop with default value

New optional property added to control name normalization behavior.


38-38: Enhanced EditableEntityName with additional props

Added normalizeName and showEllipsis props to improve the name display functionality:

  • normalizeName: Controls name normalization behavior
  • showEllipsis: Shows ellipsis for text overflow

Also applies to: 41-41


50-50: Updated useMemo dependency array

Correctly added normalizeName to the dependency array of useMemo to ensure the cached value is recalculated when this prop changes.


72-72: Updated data-testId attribute case

Changed attribute from data-testid to data-testId to maintain consistent naming convention across components.

app/client/packages/design-system/ads/src/Templates/EntityExplorer/EntityListTree/EntityListTree.stories.tsx (2)

36-36: Direct name property assignment

Simplified data structure by adding name property directly to tree items instead of using a separate names mapping object. This improves code maintainability and readability.

Also applies to: 42-42, 48-48, 55-55, 63-63, 71-71


111-111: Updated to use direct name reference

Modified to directly access item.name instead of looking up in a separate mapping object, aligning with the tree structure changes.

app/client/packages/design-system/ads/src/__hooks__/useEditableText/useEditableText.ts (2)

22-22: Enhanced function signature with normalization control

Adding the optional normalizeName parameter provides flexibility for consumers of this hook to control the name normalization behavior.


91-93: Well-implemented conditional name normalization

The implementation correctly uses the normalizeName flag to conditionally apply normalization, maintaining backward compatibility while adding new functionality.

app/client/src/pages/AppIDE/components/UIEntityListTree/WidgetTreeItem.tsx (2)

15-15: Improved type safety with explicit typing

Adding explicit type imports and annotations for the widget variable enhances type safety and code clarity.

Also applies to: 18-18


40-42: Refactored to use direct item properties instead of widget properties

The component now consistently uses properties from the item parameter rather than retrieving them from the widget object. This improves robustness by removing potential null reference issues and simplifies the code.

Also applies to: 44-49, 71-73, 81-83, 87-90, 102-102

app/client/src/pages/AppIDE/components/JSEntityItem/JSEntityItem.tsx (2)

23-23: Added conditional class names with clsx

Using clsx for managing conditional class names is a good practice that improves readability and maintainability.

Also applies to: 110-112


114-114: Fixed selection logic to use item key

Using item.key for the selection comparison instead of jsAction.id aligns with the Entity Explorer's selection model.

app/client/packages/design-system/ads/src/Templates/EntityExplorer/EntityListTree/EntityListTree.test.tsx (2)

12-12: Simplified ItemComponent to use direct name property

The component now directly accesses the name from the item object, which simplifies the code and aligns with the updated data structure.


23-24: Updated test data and queries to match new component structure

Tests now include name properties in the test data and use role-based queries with name attributes, which is more robust and matches the new component implementation.

Also applies to: 30-31, 47-47, 62-63, 69-69, 86-87, 93-94, 103-105, 111-111

app/client/packages/design-system/ads/src/Templates/EditableEntityName/EditableEntityName.tsx (9)

12-14: Clean utility function for checking text overflow.

Good abstraction that encapsulates overflow detection logic into a reusable function.


25-26: Props correctly introduced with default values.

The new props normalizeName and showEllipsis are properly defined with sensible defaults, promoting flexibility while maintaining backward compatibility.

Also applies to: 28-29


34-35: State management for tooltip visibility.

Good approach using dedicated state variable and ref for tracking overflow condition.


78-85: Effect for detecting text overflow.

The implementation correctly handles the ellipsis detection and updates tooltip visibility accordingly.


117-118: Improved class naming with clsx.

Good use of the clsx utility to conditionally apply the editing class.


124-125: Conditional ref application.

The ref is correctly applied only when the showEllipsis prop is true, avoiding unnecessary DOM references.


1-1: Properly organized imports.

Good organization of React hooks in the import statement.


49-50:

Details

❓ Verification inconclusive

Verify normalizeName implementation in useEditableText.

The normalizeName prop is now passed to the useEditableText hook. Ensure the hook implementation properly handles this parameter.


🏁 Script executed:

#!/bin/bash
# Check the implementation of useEditableText
echo "Checking useEditableText hook implementation..."
rg -A 20 "export const useEditableText" --type tsx --glob "**/packages/design-system/ads/src/**"

Length of output: 231


Action Required: Verify normalizeName Handling in useEditableText Hook

It appears our initial script using --type tsx did not yield results due to an unrecognized file type. Please either re-run the search with the appropriate file type flag (e.g., --type typescriptreact) or manually inspect the useEditableText hook implementation to ensure that the normalizeName prop is properly processed.

  • Verify that the normalization logic in useEditableText correctly applies the normalizeName function.
  • Confirm that any related tests cover scenarios involving this parameter.

87-109:

Details

❓ Verification inconclusive

Tooltip logic needs a review.

There's a potential logic issue with the tooltip visibility configuration.

For validation errors:

  • visible: true (always visible)
  • isDisabled: false (tooltip enabled)

For name tooltips:

  • visible: !showTooltip (hidden when showTooltip is true)
  • isDisabled: !showTooltip (disabled when showTooltip is true)

This appears contradictory since showTooltip state is meant to control when tooltips should appear.


🏁 Script executed:

#!/bin/bash
# Check if there are any similar tooltip implementations in the codebase
echo "Searching for similar tooltip implementations..."
rg -A 3 -B 3 "content: .+, placement: .+, visible: .+" --type tsx --glob "!**/node_modules/**"

Length of output: 231


I've noticed that the original search command didn't work as expected due to an unrecognized file type ("tsx"). To gather a more reliable result, please run a revised shell script that explicitly filters for TSX files:

This should help us verify whether similar tooltip configurations exist elsewhere in the codebase. Based on the review of the snippet, there is a potential inversion in the logic controlling the tooltip for non-error cases (i.e., using !showTooltip for both visible and isDisabled). Once you verify the output from the above script, please re-check if the tooltip state (showTooltip) is handled consistently throughout the project.

Action Required:

  • Run the revised shell script to confirm how tooltip properties are configured in other TSX files.
  • Double-check if the tooltip's logic (for instance, when showTooltip is true/false) is consistent with the intended behavior.

🏁 Script executed:


#!/bin/bash
echo "Searching for similar tooltip implementations in TSX files..."
rg -A 3 -B 3 "content: .+, placement: .+, visible:" -g "*.tsx"

Length of output: 319


Tooltip Logic Requires Careful Verification

The current implementation uses !showTooltip for both visible and isDisabled in the non-error branch, which is potentially counterintuitive if showTooltip is meant to directly control the tooltip’s display state. No similar implementations were identified elsewhere in the codebase, so it’s unclear whether this was intended or an oversight.

  • Verify that showTooltip is defined and used consistently in this context.
  • Consider whether the tooltip for validation errors and the regular name tooltip should have distinct state controls.
  • If the intent is to display the tooltip when showTooltip is true, then using !showTooltip may need refactoring or a clearer separation of concerns.

Copy link
Contributor

@ankitakinger ankitakinger left a comment

Choose a reason for hiding this comment

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

You have missed the following file changes:

app/client/src/pages/Editor/Explorer/Entity/Name.tsx
app/client/src/pages/AppIDE/components/PageList/PageElement.tsx
app/client/src/pages/AppIDE/components/PageList/PagesSection.tsx
app/client/src/pages/AppIDE/components/QueryEntityItem/QueryEntityItem.tsx

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: 0

🧹 Nitpick comments (1)
app/client/packages/design-system/ads/src/Templates/EditableEntityName/EditableEntityName.tsx (1)

78-85: Optimize effect dependencies.

The effect only tracks changes to editableName and showEllipsis, but the DOM element's dimensions could change for other reasons (like window resize).

  useEffect(
    function handleShowTooltipOnEllipsis() {
      if (showEllipsis) {
        setShowTooltip(!!isEllipsisActive(longNameRef.current));
      }
    },
-   [editableName, showEllipsis],
+   [editableName, showEllipsis, name],
  );

Consider also adding a window resize listener if the component needs to respond to layout changes.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 87cb9d6 and 06b3cb5.

📒 Files selected for processing (6)
  • app/client/packages/design-system/ads/src/Templates/EditableEntityName/EditableEntityName.tsx (4 hunks)
  • app/client/packages/design-system/ads/src/Templates/EntityExplorer/EntityGroupsList/EntityGroupsList.tsx (1 hunks)
  • app/client/packages/design-system/ads/src/Templates/EntityExplorer/EntityItem/EntityItem.tsx (4 hunks)
  • app/client/src/IDE/Components/EntityContextMenu.tsx (2 hunks)
  • app/client/src/pages/AppIDE/components/UIEntityListTree/WidgetContextMenu.tsx (3 hunks)
  • app/client/src/pages/AppIDE/components/UIEntityListTree/WidgetTreeItem.tsx (5 hunks)
🚧 Files skipped from review as they are similar to previous changes (5)
  • app/client/src/pages/AppIDE/components/UIEntityListTree/WidgetContextMenu.tsx
  • app/client/packages/design-system/ads/src/Templates/EntityExplorer/EntityItem/EntityItem.tsx
  • app/client/src/IDE/Components/EntityContextMenu.tsx
  • app/client/packages/design-system/ads/src/Templates/EntityExplorer/EntityGroupsList/EntityGroupsList.tsx
  • app/client/src/pages/AppIDE/components/UIEntityListTree/WidgetTreeItem.tsx
⏰ Context from checks skipped due to timeout of 90000ms (11)
  • GitHub Check: perform-test / server-build / server-unit-tests
  • GitHub Check: perform-test / rts-build / build
  • GitHub Check: perform-test / client-build / client-build
  • GitHub Check: client-check-cyclic-deps / check-cyclic-dependencies
  • GitHub Check: client-unit-tests / client-unit-tests
  • GitHub Check: client-prettier / prettier-check
  • GitHub Check: client-build / client-build
  • GitHub Check: client-lint / client-lint
  • GitHub Check: chromatic-deployment
  • GitHub Check: storybook-tests
  • GitHub Check: chromatic-deployment
🔇 Additional comments (8)
app/client/packages/design-system/ads/src/Templates/EditableEntityName/EditableEntityName.tsx (8)

12-14: Good utility function for checking text overflow.

This is a clean implementation to detect if text is overflowing its container.


25-28: New props improve component flexibility.

The props normalizeName and showEllipsis with sensible default values allow for better customization of the component behavior.


34-35: Proper state tracking for tooltip visibility.

Good implementation using local state and ref to control when to show tooltips.


49-49: Correct propagation of normalizeName param.

Passing the normalizeName prop to the useEditableText hook ensures consistent behavior.


72-72: Added placeholder improves UX.

Adding a placeholder text for the input field enhances user experience.


117-117: Using clsx for conditional classnames is good practice.

The use of clsx to conditionally apply the editing class is clean and follows best practices.


124-124: Conditional ref assignment is appropriate.

Only setting the ref when showEllipsis is true prevents unnecessary DOM operations.


87-109:

Details

❓ Verification inconclusive

Verify tooltip behavior for dual purposes.

The tooltip now serves two different purposes (showing validation errors and full names) which might confuse users.

In response to previous comment from @ankitakinger: "how would you add 2 different tooltips when it has to be on the same element?"
This implementation technically handles both cases, but consider if two separate tooltip components would be clearer.


🏁 Script executed:

#!/bin/bash
# Search for other components that may use this pattern to ensure consistency
rg -t tsx "isDisabled: !showTooltip" --glob "!**/EditableEntityName.tsx" 

Length of output: 102


Action Required: Verify Dual-Purpose Tooltip Consistency

The current implementation uses a single tooltip to display either validation errors or the full entity name, which might lead to user confusion. Before deciding if a refactor (such as splitting into two distinct tooltip components) is needed, we should verify that this dual-purpose pattern isn’t used elsewhere unexpectedly in the codebase.

A previous search for the pattern produced an error due to an unrecognized file type ("tsx"). Please re-run the modified search to check for consistent usage:

Once you review the output:

  • If similar patterns exist, consider evaluating whether a dedicated tooltip for each case could improve clarity.
  • If not, the dual-purpose tooltip may be acceptable, but bear in mind the potential for user confusion.

🏁 Script executed:


#!/bin/bash
# Re-run the search for 'isDisabled: !showTooltip' in TSX files (excluding EditableEntityName.tsx),
# ensuring TSX files are recognized.
rg --type-add='tsx:*.tsx' -t tsx "isDisabled: !showTooltip" --glob "!**/EditableEntityName.tsx"

Length of output: 219


Action: Reassess Dual-Purpose Tooltip Usage

Although a search for the pattern outside of EditableEntityName did not yield additional matches, the dual-use of the tooltip—handling both validation errors and full entity names—could still confuse users. There’s no evidence of this pattern being consistently implemented across the codebase, so please verify that this design is intentional. Consider if using two distinct tooltip components might provide clearer UX, especially when a validation error occurs.

  • Confirm that the combined tooltip behavior meets UX expectations.
  • Evaluate whether splitting the tooltip for error messages and for displaying lengthy names improves clarity.
  • Perform manual testing to ensure that users understand the tooltip’s dual role.

@ankitakinger
Copy link
Contributor

/build-deploy-preview skip-tests=true

@github-actions
Copy link

github-actions bot commented Mar 5, 2025

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/13670430773.
Workflow: On demand build Docker image and deploy preview.
skip-tests: true.
env: ``.
PR: 39557.
recreate: .

ankitakinger
ankitakinger previously approved these changes Mar 5, 2025
@github-actions
Copy link

github-actions bot commented Mar 5, 2025

Deploy-Preview-URL: https://ce-39557.dp.appsmith.com

@hetunandu
Copy link
Member Author

@ankitakinger Ill look into

app/client/src/pages/AppIDE/components/PageList/PageElement.tsx
app/client/src/pages/AppIDE/components/PageList/PagesSection.tsx

and the page list conversion in a different PR

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: 0

🧹 Nitpick comments (1)
app/client/src/pages/Editor/Explorer/Entity/Name.tsx (1)

48-48: Element type change improves component rendering consistency

Changing from div to span aligns with expected inline rendering for this wrapper. Since this component wraps editable text within a form context, using an inline element is semantically more appropriate.

This change addresses potential layout inconsistencies, but consider adding a display style property to ensure consistent rendering across browsers:

const EditableWrapper = styled.span`
+  display: inline-block;
  overflow: hidden;
  margin: 0 ${(props) => props.theme.spaces[1]}px;
  padding: ${(props) => props.theme.spaces[3] + 1}px 0;
  line-height: 13px;
`;
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 06b3cb5 and ddeaa29.

📒 Files selected for processing (2)
  • app/client/src/pages/AppIDE/components/QueryEntityItem/QueryEntityItem.tsx (3 hunks)
  • app/client/src/pages/Editor/Explorer/Entity/Name.tsx (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (11)
  • 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-lint / client-lint
  • GitHub Check: client-check-cyclic-deps / check-cyclic-dependencies
  • GitHub Check: client-prettier / prettier-check
  • GitHub Check: client-build / client-build
  • GitHub Check: storybook-tests
  • GitHub Check: chromatic-deployment
  • GitHub Check: chromatic-deployment
🔇 Additional comments (6)
app/client/src/pages/AppIDE/components/QueryEntityItem/QueryEntityItem.tsx (6)

53-55: Added dataTestId for improved test selection.

Adding a test identifier enhances component testability. Good practice for automated testing.


60-60: Improved null safety with optional chaining.

Using action?.userPermissions || [] prevents runtime errors when action is undefined or null.


77-78: Properly retrieving icon from action configuration.

Using the config's getIcon method ensures correct icon rendering based on the action and plugin type, which is more reliable than using the direct item.icon reference.


111-115: Fixed useMemo dependencies for correct recalculation.

Added missing dependencies to the useMemo array ensures the memoized nameEditorConfig is properly updated when these dependencies change.


121-121: Updated selection logic to use consistent identifiers.

Changed comparison from action.id to item.key for selection state, which aligns with how the component receives and manages its data structure.


128-128: Using derived icon variable for consistent rendering.

Correctly leveraging the derived icon variable from the action config instead of directly using item.icon.

ankitakinger
ankitakinger previously approved these changes Mar 5, 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

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between ddeaa29 and e89539b.

📒 Files selected for processing (1)
  • app/client/packages/design-system/ads/src/Templates/EditableEntityName/EditableEntityName.tsx (4 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (11)
  • GitHub Check: perform-test / server-build / server-unit-tests
  • GitHub Check: perform-test / rts-build / build
  • GitHub Check: perform-test / client-build / client-build
  • GitHub Check: client-unit-tests / client-unit-tests
  • GitHub Check: client-lint / client-lint
  • GitHub Check: client-check-cyclic-deps / check-cyclic-dependencies
  • GitHub Check: client-build / client-build
  • GitHub Check: client-prettier / prettier-check
  • GitHub Check: chromatic-deployment
  • GitHub Check: storybook-tests
  • GitHub Check: chromatic-deployment
🔇 Additional comments (8)
app/client/packages/design-system/ads/src/Templates/EditableEntityName/EditableEntityName.tsx (8)

1-4: Import additions are appropriate for new functionality.

The added imports for React hooks and TooltipProps properly support the new tooltip and element reference functionality.


12-14: Utility function implementation is sound.

This utility function provides a clean way to detect text overflow, which is essential for the tooltip visibility logic.


25-28: Props with default values maintain backward compatibility.

Good practice adding default values for the new props, ensuring existing implementations won't break.


34-35: State and ref for tooltip functionality is well structured.

The state and ref declarations are appropriately scoped for managing tooltip visibility based on text overflow.


49-49: Hook updated to support name normalization.

The normalizeName prop is correctly passed to the useEditableText hook.


78-85: Effective tooltip visibility management with proper dependencies.

The useEffect correctly manages tooltip visibility based on text overflow and includes appropriate dependencies.


88-107: Well-structured tooltip props with proper memoization.

The tooltip props are conditionally structured based on validation state and visually managed through the showTooltip state. The useMemo optimization is appropriate for performance.


112-123: Enhanced rendering with conditional ref and improved class management.

The conditional ref assignment and clsx usage for class names improve the component's flexibility and readability.

I see this addresses the previous comment about handling multiple tooltips on the same element.

paddingTop: "4px",
paddingBottom: "4px",
top: "-5px",
placeholder: "Name",
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Incorrect use of 'placeholder' in style object.

The 'placeholder' property isn't a valid CSS style property and should be moved to the input attributes.

- placeholder: "Name",

This should be added to the inputProps object instead:

 inputProps = useMemo(
   () => ({
     ["data-testid"]: inputTestId,
     onKeyUp: handleKeyUp,
     onChange: handleTitleChange,
     autoFocus: true,
+    placeholder: "Name",
     style: {
       backgroundColor: "var(--ads-v2-color-bg)",
       paddingTop: "4px",
       paddingBottom: "4px",
       top: "-5px",
     },
   }),
   [handleKeyUp, handleTitleChange, inputTestId],
 );
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
placeholder: "Name",
- placeholder: "Name",
+ // Removed placeholder from the style object.
- // ... rest of the code in the style object ...
+ inputProps = useMemo(
+ () => ({
+ ["data-testid"]: inputTestId,
+ onKeyUp: handleKeyUp,
+ onChange: handleTitleChange,
+ autoFocus: true,
+ placeholder: "Name",
+ style: {
+ backgroundColor: "var(--ads-v2-color-bg)",
+ paddingTop: "4px",
+ paddingBottom: "4px",
+ top: "-5px",
+ },
+ }),
+ [handleKeyUp, handleTitleChange, inputTestId],
+ );

@hetunandu hetunandu requested a review from ankitakinger March 5, 2025 10:21
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: 0

♻️ Duplicate comments (1)
app/client/packages/design-system/ads/src/Templates/EditableEntityName/EditableEntityName.tsx (1)

72-72: ⚠️ Potential issue

Move 'placeholder' from style object to input attributes.

The 'placeholder' property isn't a valid CSS style property and should be moved to the inputProps object.

- placeholder: "Name",

This should be added to the inputProps object instead:

 inputProps = useMemo(
   () => ({
     ["data-testid"]: inputTestId,
     onKeyUp: handleKeyUp,
     onChange: handleTitleChange,
     autoFocus: true,
+    placeholder: "Name",
     style: {
       backgroundColor: "var(--ads-v2-color-bg)",
       paddingTop: "4px",
       paddingBottom: "4px",
       top: "-5px",
     },
   }),
   [handleKeyUp, handleTitleChange, inputTestId],
 );
🧹 Nitpick comments (1)
app/client/packages/design-system/ads/src/Templates/EditableEntityName/EditableEntityName.tsx (1)

78-85: Add window resize listener for tooltip visibility.

The current implementation only checks for text overflow when editableName or showEllipsis changes, but not when window or container size changes.

useEffect(
  function handleShowTooltipOnEllipsis() {
    if (showEllipsis) {
      setShowTooltip(!!isEllipsisActive(longNameRef.current));
    }
  },
  [editableName, showEllipsis],
);

+useEffect(() => {
+  if (!showEllipsis) return;
+  
+  const handleResize = () => {
+    setShowTooltip(!!isEllipsisActive(longNameRef.current));
+  };
+  
+  window.addEventListener("resize", handleResize);
+  return () => window.removeEventListener("resize", handleResize);
+}, [showEllipsis]);
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between e89539b and 94867c9.

📒 Files selected for processing (1)
  • app/client/packages/design-system/ads/src/Templates/EditableEntityName/EditableEntityName.tsx (4 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (10)
  • GitHub Check: perform-test / rts-build / build
  • GitHub Check: perform-test / server-build / server-unit-tests
  • GitHub Check: client-lint / client-lint
  • GitHub Check: client-check-cyclic-deps / check-cyclic-dependencies
  • GitHub Check: client-build / client-build
  • GitHub Check: client-unit-tests / client-unit-tests
  • GitHub Check: client-prettier / prettier-check
  • GitHub Check: chromatic-deployment
  • GitHub Check: chromatic-deployment
  • GitHub Check: storybook-tests
🔇 Additional comments (7)
app/client/packages/design-system/ads/src/Templates/EditableEntityName/EditableEntityName.tsx (7)

12-14: Helper function to detect text overflow looks good.

The isEllipsisActive utility function provides a clean way to detect text overflow and will be useful for dynamic tooltip display.


25-28: Props added with sensible defaults.

The new props normalizeName and showEllipsis have appropriate default values set to false, maintaining backward compatibility with existing usage.


34-35: State and ref for tooltip management.

Good addition of state and ref to handle tooltip visibility based on text overflow.


49-49: Normalization flag passed to hook.

The normalizeName flag is correctly passed to the useEditableText hook to ensure consistent behavior.


90-97: Tooltip configuration looks good.

The primary tooltip shows the full name when text is truncated, with appropriate delay and positioning.


98-105: Nested tooltip pattern for validation errors.

The nested tooltip pattern allows for showing both the full name and validation errors without conflict. This is a valid approach based on the previous review comments about needing different tooltips on the same element.


106-118: Enhanced text component with accessibility improvements.

The use of aria-invalid and class handling with clsx improves both accessibility and styling flexibility. The conditional ref assignment is also a good optimization.

@ankitakinger
Copy link
Contributor

/build-deploy-preview skip-tests=true

@github-actions
Copy link

github-actions bot commented Mar 5, 2025

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/13673826456.
Workflow: On demand build Docker image and deploy preview.
skip-tests: true.
env: ``.
PR: 39557.
recreate: .

@github-actions
Copy link

github-actions bot commented Mar 5, 2025

Deploy-Preview-URL: https://ce-39557.dp.appsmith.com

@hetunandu hetunandu requested a review from ankitakinger March 5, 2025 10:45
@hetunandu hetunandu merged commit defc0a9 into release Mar 6, 2025
50 checks passed
@hetunandu hetunandu deleted the chore/ads-app-ide-ee-changes branch March 6, 2025 05:52
github-actions bot pushed a commit to Zeral-Zhang/appsmith that referenced this pull request Apr 12, 2025
## Description

Just UI changes from appsmithorg#39093 


Fixes appsmithorg#39556

## Automation

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

### 🔍 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/13673781581>
> Commit: b78e21d
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=13673781581&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.IDE`
> Spec:
> <hr>Wed, 05 Mar 2025 10:57:58 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**
- Enhanced editable text components now support name normalization with
dynamic ellipsis and improved tooltip handling.
- Entity and widget list views now display names directly with updated
expand/collapse icons and refined selection behavior.
- Context menus reflect conditional interactivity by disabling options
based on permissions and item types.
- New identifiers for list items and context menus improve testing
capabilities.

- **Refactor**
- Consolidated property handling and class name assignments across
components for consistent behavior.
- Streamlined data structures and conditional rendering in entity
explorers and context menus to enhance clarity and maintainability.
- Updated components to use direct property access for improved
performance and readability.
<!-- 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

IDE Navigation Issues/feature requests related to IDE navigation, and context switching IDE Pod Issues that new developers face while exploring the IDE IDE Product Issues related to the IDE Product ok-to-test Required label for CI skip-changelog Adding this label to a PR prevents it from being listed in the changelog Task A simple Todo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Task]: AppIDE Entity Explorer style fixes

2 participants