Array field: no visible edit button on rows and no close button in the "Edit item" dialog
Maintainer thường phản hồi trong vòng 1 ngày
@bacarndiaye đang làm issue này rồi.
Từ ngày 19/10/2026.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- Nửa ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- react, typescript
- Lĩnh vực
- accessibility, frontend
Hướng nghiên cứu
Start with ArrayFieldInput and ArrayFieldListView, which the issue identifies as the dialog and row implementations. Check how nearby fields use DialogContainer dismissal and ActionButton labels, then run the relevant array field tests. Done means each row exposes an edit action and accessible delete label, and the dialog can be dismissed by its header button and by clicking outside.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
For fields.array() with object (or any non-child) elements, the item editor is hard to discover and hard to leave with a pointer:
- List rows have no visible "edit" action. Each row only shows the drag handle and a trash button. Editing is only possible by clicking anywhere on the row, which is not obvious (no pencil icon, no tooltip, no button in the accessibility tree).
- The "Edit item" dialog has no close button. The only button is Done. Clicking outside the dialog does nothing; only the Esc key closes it, which is invisible to mouse and touch users.
Related: #1593 shows how fragile it is to rely on the whole-row click as the only way to open the dialog.
Reproduction
@keystatic/core 0.6.9, @keystatic/astro 6.0.0, Astro 7.4.1, Chromium.
import { config, fields, singleton } from '@keystatic/core';
export default config({
storage: { kind: 'local' },
singletons: {
demo: singleton({
label: 'Demo',
path: 'src/data/demo',
format: 'json',
schema: {
items: fields.array(
fields.object({ title: fields.text({ label: 'Title' }) }),
{ label: 'Items', itemLabel: (props) => props.fields.title.value },
),
},
}),
},
});
- Open
/keystatic/singleton/demo, add two items. - Look at the rows: only a drag handle and a trash icon.
- Click a row: the Edit item dialog opens with only a Done button.
- Click outside the dialog: it stays open. Press Esc: it closes.
Expected
- A visible edit button (pencil icon with a tooltip,
aria-label="Edit") on each row, next to delete. Theeditstring already exists in the locale strings. - A close ("Dismiss") button in the dialog header and outside-click dismissal.
Closing is safe: the dialog edits the item live, and Done only closes the dialog, so closing with the X is equivalent to Done (the same as Esc today).
Cause / suggested fix
ArrayFieldInputrenders<DialogContainer onDismiss={...}>withoutisDismissable.@keystar/ui'sDialog/DialogContaineralready supportisDismissable, which renders a "Dismiss"ActionButtonand enables dismissal by clicking the underlay.ArrayFieldListViewrenders a singleActionButton(trash) perItem. Adding a secondActionButtonwithpencilIconthat callsonOpenItem(index)is enough. The trash button also has noaria-label(icon-only, tooltip only).
I verified both changes locally with a patch-package patch against 0.6.9 (compiled output):
- t14 = jsx(DialogContainer, {
- onDismiss: t12,
+ t14 = jsx(DialogContainer, {
+ onDismiss: t12,
+ isDismissable: true,
children: t13
+ jsxs(Flex, { gridArea: "actions", alignItems: "center", gap: "small", children: [
+ /* TooltipTrigger > ActionButton aria-label={format('edit')} onPress={() => props.onOpenItem(props.elements.indexOf(item))} + pencilIcon */,
+ /* existing TooltipTrigger > ActionButton (trash), now with aria-label={format('delete')} */
+ ]})
With this, rows show pencil + trash, the dialog shows an X, and outside click closes it. Happy to open a PR against the source if this direction is acceptable.
Side note
The dialog title ("Edit item"), "Done", "Add" and "Empty list" are not localised even when locale is set (see #1578).
- Ngôn ngữ chính
- TypeScript
- Star
- 2.5k
- Fork
- 176
- Merge trung bình
- 5 giờ 46 phút
- Pull request đã merge (30 ngày)
- 3
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Thinkmill/keystatic
-
Incorrect Dutch translations: “Save” is translated as “Redden”Có thể đã có người làm @MilindChatrabhuji đã nhận 5 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Typo/Grammar on Website HomepageCó thể đã có người làm @Punith1117 đã nhận 151 ngày trước. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Feature: post-save "publishing" notice / `onCommit` hook so editors know changes aren't live yetĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Thinkmill/keystatic
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Slaymish/HealthAgent#7 ·
-
area: engine topic: math type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Get-Concord-AI/concord-mcp#310 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Correct install_claude: 'marketplace add' over a different source is refused, not replaced in placeĐang mởtype:bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
nightgauge/nightgauge#2804 ·
Maintainer thường phản hồi trong vòng 1 ngày