A day's slots can't be copied to another day, so each day of a shift grid is built slot by slot
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ó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 38/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- react, typescript
- Lĩnh vực
- documentation, frontend, full-stack, testing
Hướng nghiên cứu
Read src/components/build-wysiwyg/BuildWysiwyg.tsx, src/components/build-wysiwyg/WysiwygGroup.tsx, and src/components/build-shared/useBuildState.ts, then check how duplicateRow, withSave, and the bulk slots endpoint work. Add the date heading action and its tests, then update the signup help page and changelog. Done means the specified component, state, and e2e tests pass at desktop and phone widths, along with the listed lint, typecheck, knip, and test commands.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Needs your OK: this adds a "Copy day" button to each date heading on the Build tab. Swap pipeline:proposed for pipeline:ready to have it built.
What happens
On the Build tab, when slots are grouped by a Date field, Add date under the last day starts a new day (handleAddDate in src/components/build-wysiwyg/BuildWysiwyg.tsx). It adds one slot with no values and 1 spot, under a "Set a date" heading. addRow in src/components/build-shared/useBuildState.ts always sends capacity: 1.
Nothing copies a whole day:
- Duplicate copies one slot (
duplicateRow). - A date heading only changes the date of the slots under it (
GroupHeaderinsrc/components/build-wysiwyg/WysiwygGroup.tsx).
So each new day is built from nothing. Take a food bank with three shifts each Saturday and 8 people per shift. The second Saturday took 13 steps: Add date, set the date, type What, the start, the end and Spots again, then Duplicate twice and change two times on each copy. Every one of those slots matched the day before, apart from the date. Four Saturdays means doing it three times.
Fix, in outline
- A "Copy day" button on each date heading. It shows where Add date shows (slots grouped by a Date field), on every group that has a date.
- It asks for the new date with the date picker the heading already uses (
FIELD_VALUE_INPUTS, as inGroupHeader). - It adds a copy of every slot in that day, with the new date, every other value and the same spots. It sends one request to the existing
POST /api/signups/[id]/slots/bulk.addSlotsBulkadds them in one transaction with one activity row, so the server doesn't change. - The copies keep the day's order, and appear under the new date's heading.
partitionRowsalready sorts the days by date. - Nobody's sign-up is copied. The copies start empty, as Duplicate's copies do.
- A
copyGroupaction inuseBuildState, next toduplicateRow. It goes throughwithSave, so the save status, and Publish's wait for pending saves in #580, include it.
Watch for
- Spots.
duplicateRowturns a slot with no limit into 1 spot. Copy day should keep "no limit": the bulk route takescapacity: null. - A date that already has slots. The copies join that day, after its slots. Don't refuse it.
- The button's name. Name it after its day for screen readers ("Copy Sat, Nov 7"). The row toolbar's bare "Duplicate" buttons are already hard to tell apart.
- Phones. At 390px the heading row is narrow. The button must not push the date onto two lines, and it needs a touch target of at least 44px.
- Grouping comes first. A new signup made by hand isn't grouped by date, so neither Add date nor Copy day shows until the organizer sets Fields → Group slots by → Date. That's covered on #503 (check 6).
- Open PRs. #580 and #581 change
BuildWysiwyg.tsx,WysiwygGroup.tsxanduseBuildState.ts. Build onmainafter they merge, or expect a merge. - Related. #498 lists a bigger version as "not in this plan": a start for hand-built signups made from days × shifts × people. This is the small step.
- Docs. The help page "Create and publish your first signup" describes Duplicate under "Add slots". Add a step for Copy day, with its
.ui.tsentry and test. The CHANGELOG.
Choices this makes
- Where it goes: a small button beside each date heading. It works like the slot row's Edit, Duplicate and Delete buttons (
ToolbarButtoninWysiwygSlot.tsx), but it's always visible, not shown on hover, so it can be found on a phone. The alternative is to make Add date ask "Empty day, or a copy of Sat, Nov 7?". That keeps one button, but adds a step to every Add date. - It asks for the date first, so copies never sit undated under "Set a date". The alternative is to copy with no date and let the organizer set the heading, which already moves every slot under it.
- Days only. Groups by a List or text field don't get it yet. The same action could later copy one station's slots to another.
- Add date stays as it is: one empty slot.
- The button says "Copy day".
Done when
- On a signup grouped by date, Copy day on a day with three slots, given a new date, adds three slots on that date. They have the same values and spots, in the same order, and come from one request. A reload shows the same.
- A slot with no limit is copied with no limit.
- Component tests: the button shows only on dated groups of a signup grouped by a Date field, and it's named after its day. A
useBuildStatetest pins the single bulk request and its rows. - An e2e test copies a day at 1280 and at 390.
pnpm lint && pnpm typecheck && pnpm knip && pnpm testpass.
Found by the UX walkthrough (scenario O2) on 2026-10-24, and checked against the code on main at 4ed27a9.
Generated by Claude Code
- Ngôn ngữ chính
- TypeScript
- Star
- 19
- Fork
- 4
- Merge trung bình
- 20 giờ 9 phút
- Pull request đã merge (30 ngày)
- 156
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
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 richshaw/OpenSignup
-
enhancement pipeline:proposed pipeline:ux
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
richshaw/OpenSignup#654 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
The help pages never say "pause", so organizers looking for it miss Close or reopen a signupĐang mởenhancement pipeline:proposed pipeline:ux
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
richshaw/OpenSignup#653 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement pipeline:proposed pipeline:ux
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
richshaw/OpenSignup#652 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
SMTP timeout notes in smtp.ts and the changelog describe nodemailer 10.0, not 10.1Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởenhancement good first issue pipeline:ready
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
richshaw/OpenSignup#645 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
A signup page's first Tab skips the header and lands on the next tabCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởbug good first issue pipeline:ready pipeline:ux
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
richshaw/OpenSignup#644 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của richshaw/OpenSignup
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
awslabs/visual-asset-management-system#804 ·
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 70/100
restatedev/sdk-typescript#813 ·
-
bug desktop P1 session XS
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/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 62/100
Merit-Systems/x402scan#1312 ·
-
type:bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Azure/apiops-cli#331 ·
Maintainer thường phản hồi trong vòng 3 ngày