Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Feature request: configurable redirect after creating a collection item

Đang mở
#1,620 1 bình luận 1 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
70/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
frontend

Hướng nghiên cứu

Search the collection-item creation flow for the router.push(${collectionPath}/item/${encodeURIComponent(slug)}) entry point. Trace how collection-level options are defined and passed into that flow, then verify that the existing item redirect remains the default while the new collection option returns to collectionPath. Confirm the behavior by creating an item through both configurations.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

When creating a new collection item, Keystatic currently redirects to the newly created item's edit page.

For some editorial workflows, it would be useful to optionally return to the collection list instead.

Example use case:

  • editor opens a collection
  • clicks "Add"
  • fills the form
  • clicks "Create"
  • item is saved
  • editor is returned to the collection list and can immediately add another item

In a real user test, staying on the newly created item's edit page caused confusion: the editor thought the form was ready for the next item and started editing the item that had just been created.

A collection-level option could perhaps look like:

afterCreate: 'item' | 'collection'

with the current behaviour remaining the default.

For my project, changing:

router.push(${collectionPath}/item/${encodeURIComponent(slug)});

to:

router.push(collectionPath);

produces the desired behaviour.

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

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Thinkmill/keystatic

Tất cả issue của Thinkmill/keystatic

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.