Skip to content

fix(fields/array): add visible edit button to rows and make edit dialog dismissable (#1644) - #1647

Open
MilindChatrabhuji wants to merge 1 commit into
Thinkmill:mainfrom
MilindChatrabhuji:fix/array-field-edit-and-dismiss-1644
Open

MilindChatrabhuji wants to merge 1 commit into
Thinkmill:mainfrom
MilindChatrabhuji:fix/array-field-edit-and-dismiss-1644

Conversation

@MilindChatrabhuji

Copy link
Copy Markdown

Description

Fixes #1644

For fields.array() with non-child items (e.g. object elements), the item editor was difficult to discover and difficult to leave using pointer controls:

  1. Row edit discovery: Each row in ArrayFieldListView previously rendered only a drag handle and a delete button (trash2Icon). Editing was only possible by clicking anywhere on the row body, which is not obvious to mouse/touch users and lacked a dedicated action button in the accessibility tree.
  2. Dialog dismissal: The "Edit item" dialog rendered inside DialogContainer without isDismissable: true. As a result, there was no close ("X" / dismiss) button in the dialog header, and clicking the modal underlay outside the dialog did nothing. The only ways to leave were submitting the form via "Done" or pressing the Esc key.

Changes

  1. Add explicit edit button to ArrayFieldListView:
    • Renders a dedicated ActionButton with pencilIcon (@keystar/ui/icon/icons/pencilIcon) next to the delete button.
    • Includes localized tooltip and aria-label={stringFormatter.format('edit')}.
    • Adds aria-label={stringFormatter.format('delete')} to the delete button for consistent screen reader accessibility.
    • Clicking the edit button calls onOpenItem(index).
  2. Enable dismissable modal container in ArrayFieldInput:
    • Passes isDismissable to <DialogContainer> and <Dialog isDismissable>.
    • Enables the standard Keystar dismiss (X) button in the dialog header and click-outside dismissal on the underlay.
  3. Changeset:
    • Added patch changeset for @keystatic/core describing the UX improvements.

Fixes #1644

@changeset-bot

changeset-bot Bot commented Oct 26, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: aaf0940

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@keystatic/core Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Array field: no visible edit button on rows and no close button in the "Edit item" dialog

1 participant