Skip to content

fix(plugin-calendar): no resize handle in the week/day views without an end field; calendar-view forwards a host endEditable - #29292

Merged
objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/project-thread-dyr5y4
Nov 2, 2026
Merged

objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/project-thread-dyr5y4

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Steedos · project thread

Fixes #29197

Clause-②: no
Metadata-protocol: none

维护者速读

What changes

  • CalendarView, week and day views: endEditable={false} now also hides the top "Resize start" handle, so with no stored end the time grid draws no resize handle at all. handleEventPointerDown ignores the top and bottom zones when endEditable is false; a body drag still moves the event. The month view is as calendar month view: the resize-end handle is drawn when the view declares no end-date field, and dragging it PATCHes the unchanged start date (updated_at bumps, update triggers fire) #29020 left it (no "Resize event end" handle). The prop's doc now says what false means: the events have no stored end, so no view draws a resize handle. The type is unchanged.
  • ObjectCalendar: unchanged. It already passes endEditable={Boolean(calendarConfig.endDateField)}, so a view with no end field now draws no top handle either.
  • calendar-view renderer: forwards a host's endEditable as a declared host hatch, the way it forwards slotMinutes: a boolean reaches CalendarView, anything else gets the absent-key answer (the default true). No registry input, @object-ui/types key or metadata key is added.
  • Docs: one bullet under "Week / Day view" in content/docs/frontend/plugins/plugin-calendar.mdx.

Premise note (why the renderer forwards rather than derives). A calendar-view node's endDateField defaults to end: CalendarViewSchema.endDateField carries @default 'end' in @object-ui/types, and the renderer reads schema.endDateField || 'end'. So every authored node names an end field, and deriving endEditable from it would always give true. Only the host knows its records keep no end, so the renderer forwards the host's boolean. Handles need a host onEventDrop in the first place (JSON cannot carry a function), so the hatch sits beside the callback that makes them appear.

Tests

New file ui/packages/plugin-calendar/src/__tests__/CalendarView.noEndNoResize-29197.test.tsx, 12 cases:

  • CalendarView directly, week and day: endEditable={false} draws neither the top nor the bottom handle. Control: the default draws both.
  • ObjectCalendar, week and day: a view with no end field (with allDayField declared, so the record is drawn timed) draws no top handle and no bottom handle. Control: a view with an end field draws both.
  • calendar-view through SchemaRenderer: a host onEventDrop with endEditable: false draws neither time-grid handle in the week view and no "Resize event end" handle in the month view. Controls: no endEditable from the host draws both handles, and a non-boolean 'false' gets the default (both handles).

Updated ObjectCalendar.endEditable-29020.test.tsx: the two cases that pinned the top handle staying with no end field (one through ObjectCalendar, one on CalendarView directly) now assert it is gone; the end-field controls are untouched.

Acceptance notes

  • .changeset/29020-calendar-resize-without-end-field.md (unreleased) still says the top "Resize start" handle is unchanged. Both changesets ship in the same release, so the changelog will carry that line and this one's correction side by side. It is outside this claim's file surface and left as it is.
  • The pointer-down guard is not reachable from a test: with endEditable false the top and bottom zones have no element to press. It keeps the gesture closed if a handle is drawn by some later change.
  • ui/packages/plugin-calendar/README.md keeps its one-line summary ("Drag top/bottom edges to resize start/end times"), which stays true for views with an end field; it is outside this claim's file surface.

Verification

Readings on head d28a86c7, base 45e9b2f1.

Tests
Gates
  • node scripts/pm/dispatch-gates.mjs --commands derived 66 families; all 66 ran with exit 0 on head d28a86c7, the 65 unlocked ones with this body as the PR event (check-adr-0087-registration, check-changeset-no-major, check-closing-keyword-parity, check-empty-changeset, check-sdui-manifest among them). Two needed a second run: check:skill-examples first refused with exit 3 (PREREQUISITE NOT MET, @objectstack/client-react unbuilt) and ran exit 0 after building it; in pnpm --dir ui exec vitest run scripts/ (locked, 171 files) one case, check-hand-rolled-comment-mask "exits 0 as a process", a whole-tree scan, timed out at 15 s in the full run, and its file alone then passed 22 of 22; the rest of the run was 168 files passed, 2 skipped.
  • dispatch-gates --ran: 66 derived, 66 run, 0 NOT-MEASURED, 0 UNRUN.
  • node ui/scripts/check-new-cross-file-line-citations.mjs: 0 new citations.
  • eslint on the four changed ui files: 0 errors; 25 warnings, the same counts (24 and 1) the two source files carry at the base, and none in the two test files.

Generated by Claude Code

…nd; calendar-view forwards a host endEditable

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jRjkd6BVRcw6N7MyTu
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 2, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:ui#1 · zhuangjianguo · session_01QsR2jUJ19MstFvFhjgiYTu

席位核对 · ACCEPT · 2026-11-02T11:29Z

Head-sha: d28a86c7ccbc6e05de8527afdc9ef2e7fb392d34

  • Shape:
  • Read in the diff:
  • Pins changed: ObjectCalendar.endEditable-29020.test.tsx, two expectations flipped from top handle present to absent. This is the card's ask, and the PR body says so.
  • Gates (check-runs on this head): 51 success, 8 skipped, 0 failed or pending. mergeable_state is clean.
  • Tests (dev):
  • NOT MEASURED: the seat ran no live session. The pointer-down guard is unreachable from a test while no handle is drawn; the dev says so in the PR body.
  • Findings: none filed. The unreleased .changeset/29020-… line ("top handle unchanged") ships beside this changeset's correction in the same release. That is a changelog wording note, not a defect.
  • Serial: none. No other seat-1 card touches plugin-calendar.
  • Landing: ordinary queue landing, pr_ready then automerge_enable. Fixes #29197 closes the card on merge.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 2, 2026 11:30
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge November 2, 2026 11:30
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 2, 2026
Merged via the queue into main with commit 3d528bf Nov 2, 2026
60 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-dyr5y4 branch November 2, 2026 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Calendar with no end-date field: the week/day "Resize start" handle still moves the event, and the calendar-view renderer drops endEditable

1 participant