Skip to content
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

Add editable name functionality for the name of the entity list item #37896

Closed
12 tasks done
Tracked by #37342
ankitakinger opened this issue Dec 2, 2024 · 1 comment · Fixed by #38442
Closed
12 tasks done
Tracked by #37342

Add editable name functionality for the name of the entity list item #37896

ankitakinger opened this issue Dec 2, 2024 · 1 comment · Fixed by #38442
Assignees
Labels
IDE Pod Issues that new developers face while exploring the IDE IDE Product Issues related to the IDE Product Task A simple Todo

Comments

@ankitakinger
Copy link
Contributor

ankitakinger commented Dec 2, 2024

Create a new EntityItem component which will act as a HOC to ListItem component and have all the name editing related functionalities.

Entity list item component will accept the prop nameEditorConfig. This prop will be an object consisting of:

  • canEdit - boolean (will also handle permissions to edit based on GAC)
  • isEditing - boolean
  • isLoading - boolean
  • onEditComplete - function
  • validateName - a function that accepts newName string and returns error string if the name is invalid or null if it is valid. We will normalize the newName before calling this function.

This object will be used to handle the editable property of an entityName. Use the same implementation details as Editor tabs today.

normaliser(): A function that will normalize the input before setting it inside (remove spaces, spl chars etc)

entityNameValidator(existingName, extraReservedNames): returns a validator function that expects a new name and returns error or null

Things to be taken care of in this task:

  • Editing of title should not be allowed when description is added
  • Please use the ADS text component for editable name functionality. Editable name text input needs custom styling if we use the ADS Text component (else create a different input component for entity item)
  • Show Spinner in place of the left control when renaming is in progress.
  • Name of the entity item may or may not be editable (it will be an optional functionality).
  • Show the right control even when editing the name of the entity
  • Add Renaming and Renaming error states for Entity list item as per designs
  • Add error messages UI as per designs. Note: Error state of entity item (red icon and text) is different and error message for incorrect title of the item is different (popup with error message). Error state is out of scope in this project.

Design:
https://www.figma.com/design/sz08OJt2VrEgxQ8eToFIqG/ADS2.0---Components?node-id=8954-7244&t=HrFzlJnYdgkRxcwN-0

@Nikhil-Nandagopal Nikhil-Nandagopal added the Task A simple Todo label Dec 2, 2024
@ankitakinger ankitakinger added IDE Product Issues related to the IDE Product IDE Pod Issues that new developers face while exploring the IDE labels Dec 2, 2024
@ankitakinger
Copy link
Contributor Author

Hey team! Please add your planning poker estimate with Zenhub @alex-golovanov @hetunandu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IDE Pod Issues that new developers face while exploring the IDE IDE Product Issues related to the IDE Product Task A simple Todo
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants