Add editable name functionality for the name of the entity list item #37896
Labels
IDE Pod
Issues that new developers face while exploring the IDE
IDE Product
Issues related to the IDE Product
Task
A simple Todo
Create a new
EntityItem
component which will act as a HOC toListItem
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
- booleanisLoading
- booleanonEditComplete
- functionvalidateName
- a function that acceptsnewName
string and returnserror string
if the name is invalid ornull
if it is valid. We will normalize thenewName
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 nullThings to be taken care of in this task:
Design:
https://www.figma.com/design/sz08OJt2VrEgxQ8eToFIqG/ADS2.0---Components?node-id=8954-7244&t=HrFzlJnYdgkRxcwN-0
The text was updated successfully, but these errors were encountered: