feat(intent): embedded calendar panel for a composition child inside its master page#6239
Merged
Conversation
…its master page
view: calendar (or function: Calendar / view: range) on a COMPOSITION
CHILD no longer requires remodeling the child as PRIMARY: the child
stays a detail of its master (MANAGE_DETAILS layout, the detail
registry, the master-filtered controller, its form pages) and the
calendar becomes HOW the master renders its panel - an embedded
x-h-calendar in place of the detail table, on both the master browse
page and the record's edit form. Event-click edits the child; an
empty-day click creates one with the master FK AND the clicked date
preset (the shared form presets matching create query params). An
empty month renders as a calendar, not a 'no records' note.
EdmIntentGenerator branches: dependent + isCalendar -> detailCalendar
marker + the calendar* properties (no MANAGE_CALENDAR layout, no
standalone page); detail-register carries the calendar meta into the
registration; the shared detailPanel maps master-filtered rows to
events (same Jackson java.time conventions as the standalone calendar
page); master-view + form-view render the x-h-calendar branch.
Verified on a generated project: the registration carries
calendar: { start: 'Day', title: 'Note', view: 'month', range: false },
both views carry the branch, the served shared panel has the event
mapping, and the child keeps its detail contract. Unit: a dependent
calendar child keeps MANAGE_DETAILS + the meta while a primary keeps
MANAGE_CALENDAR. Suite 114/114.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Nedelcho Delchev <delchevn@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
view: calendar(orview: range/function: Calendar) on a composition child previously did nothing — calendar rendering was PRIMARY-only, which forced real models (the timesheets day-allocation) to remodel the child as a standalone PRIMARY entity just to get a calendar. Now the child stays a detail of its master — the detail registry, the master-FK-filtered controller, its generated form pages, all unchanged — and the calendar becomes how the master renders its panel:The master's browse page and the record's edit form render an embedded
x-h-calendarin place of that child's detail table: the same master-filtered rows become events; event-click edits the child; an empty-day click creates one with the master FK and the clicked date preset (the shared form presets matching create query params). An empty month renders as a calendar rather than a "no records" note.How
dependent && isCalendar()→ adetailCalendarmarker + thecalendar*properties on the.model; the layout staysMANAGE_DETAILSand no standalone calendar page is generated. A PRIMARY calendar entity keepsMANAGE_CALENDARexactly as before.calendar: { start, end?, title?, color?, view, range }.detailPanel(application-core runtime): builds events from the rows using the def's meta — the same Jacksonjava.timearray/epoch conventions as the standalone calendar page — plus the click handlers; non-calendar defs are byte-identical in behavior.x-ifbranch between the calendar and the table.slotsstays primary-only (a booking page, not a panel).Verification
Generated project (Timesheet + DayAllocation): the registration carries
calendar: { start: 'Day', title: 'Note', view: 'month', range: false }(syntax-checked), both views carry the branch, the served shared panel has the event mapping, the child keeps its detail contract (form pages, filtered controller). Unit test: a dependent calendar child keepsMANAGE_DETAILS+ the meta while a primary keepsMANAGE_CALENDAR. Full engine-intent suite green. Visual rendering rides the samex-h-calendarcomponent the standalone calendar pages already exercise.Unblocks: the timesheets day-allocation returning to its natural master-detail model (the workaround recorded when the calendar views landed).
🤖 Generated with Claude Code