Repository navigation
Scheduler, Gantt with resource leveling, and Material 3 date and time pickers - #6216
shai-almog wants to merge 19 commits into
Conversation
…path and resource leveling The UI-free layer the Scheduler and Gantt components are built on. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…e model The views paint their items and keep no component per item. A shared surface does the two-axis scrolling under pinned headers, the fling, the wheel, pinch zoom and the tap/drag/long-press split; items are moved, resized and created by dragging, each change offered to the listeners and then to the model. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… project model Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…heme constant Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…marker Core installs fallback styles for every Scheduler*, Gantt* and PickerMaterial* UIID the installed theme does not mention, light or dark, so a theme that predates them does not paint a white rectangle. android-material and ios-modern style all of them and the Calendar month grid. android-material sets pickerStyle to material, which now opens the Material date and time pickers by itself on a platform whose default is the native dialog; an explicit setUseLightweightPopup(false) keeps the platform's, and string and duration pickers are not affected. Calendar gains a today marker: a UIID from setTodayUIID or the calendarTodayUIID theme constant, which both modern themes set. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…PDF or a print The view is painted off screen at the page's size, a page of content at a time, each under the headers that belong to its part. Pages go to the platform's print dialog as one PDF of JPEG pages, written by a small writer of its own; where JPEG cannot be encoded a single page prints as an image. Laying a view out for a page moves its zoom inside limits that depend on the room it has, so the surface saves and restores the hour height or the time scale around a page. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…Scheduler Timeline keeps its API (lanes, blocks, legend) and maps them onto a Scheduler: lanes on one day are resources side by side, a single lane is a day view, lanes on different days a week. Shifts are background items, time held by another calendar is blocked, bookings open on a tap. A background band is now painted before the grid lines in the day and resource views, so the hour lines stay visible across working hours. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A new developer guide chapter covers the Scheduler, resources, working hours, a calendar source as a model, the Gantt chart, leveling and printing. The components chapter gains the Material date and time pickers and the Calendar's today marker; the theming chapter the pickerStyle and calendarTodayUIID constants. Every snippet, in the guide and in the API reference, runs as it stands in the inline Playground. The Playground's automatic import now also answers "package Outer does not exist", which is what an unimported Outer.Inner.CONSTANT reads as when nothing else names Outer. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…terial pickers Each runs in both appearances at a fixed instant in UTC, so a capture does not depend on the day or the zone it was taken in. The port status contract maps them to a new scheduling feature and to the native theme controls. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
SpotBugs: no dead stores in the scheduling theme defaults, the date names are cached in an object and not in two lazily set statics, day steps are multiplied as longs, and the two anonymous classes that kept no outer state are named static ones. PMD: the engine's indexed loops are for-each loops. The loops that tell listeners stay indexed, since a listener may remove itself while it is told, and so does the one painted for every row of every frame. isEditable is marked as the override of Component's that it is. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Both are placed by the framework over the form they belong to, so both opt out of native window mode as the picker's other popups do, and the Scheduler joins the list FrameworkChromeNeverWindowsTest holds to that. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Engine: a task placed under a summary that waits for it is refused and put back; a leveling result is applied only to tasks still in the project; an empty set of working hours is a day off; created ids do not collide. Calendar model: a refused save or delete is followed by a load, answers for a calendar that was removed are dropped, an item is found again by its id. Scheduler: the selection follows the id across a load, listeners are told from a snapshot, a drag ends when the view leaves the form, a day-snapped move keeps the time of day, off-hours follow a calendar in another zone. Gantt: a move snaps the distance and not the start, a manual task keeps its span, a constraint keeps its kind, progress is offered to the listeners, a task removed while held ends the drag, pages end between rows and carry no selection, the load is worked out for the rows in view. Pickers: the last hour of the range can be chosen, a time that is only looked at is not changed, text that is no date or time is not confirmed, eight digits are a date, one dialog at a time. Docs: the calendar figure is the restyled one. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Calendar model: an edit or a delete of an item from before a load is one of the item that is drawn; a load that overtook an edit is asked again once the edit is saved; a failure for a removed calendar is dropped. Scheduler: a selection that is gone is told to the listeners; off-hours of a calendar in another zone are in the column's own clock; a pinch whose end went elsewhere is over. Project: a task goes under a parent of this project only. Gantt: a drag keeps a constraint only when it places the task; the dropped bar slides from under the hand; a link is asked again before it is made. Pickers: a dialog the application covered is a cancel and not a picker that never opens again; the last day of a date-time range is whole. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A picker whose dialog the application covered opens again and Cancel keeps its value. A created event is found again by the event behind it; a load still in flight when an edit is saved is asked again. A task moves only under a parent of the project. A link is checked before the listeners are asked. A lost pinch leaves no scale behind. Print documents nobody collected are swept by a later print. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
An edit of a calendar item is made in the calendar the item was held in: a source that gives one meeting the same id in two shown calendars had whichever copy came first changed. A Material dialog that was given up while another dialog lay over it closes by its buttons when it is seen again, and a covered dialog's unconfirmed choice is not the picker's value. The booking template declares the first release with the scheduling views, as the shooter does for the 3D engine, so the Initializr withholds it from an older core that cannot compile it. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Cloudflare Preview
|
The fallback that finds an edited item by the event behind it looks in the item's own calendar first, as the search by id does. A Material dialog that is still opening is not taken for one the application covered. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Native fidelity (ios-27-metal)68 pairs compared -- median 94.6%, worst 74.5% ( Distribution --
Geometry vs native (bbox offset / size ratio / center offset / corner radius) -- gated separately from the visual score
Side-by-side comparisons (worst first)
|
✅ Continuous Quality ReportTest & Coverage
Static Analysis
Generated automatically by the PR CI workflow. |
Native fidelity (Android, Material 3)54 pairs compared -- median 95.6%, worst 91.3% ( Distribution --
Geometry vs native (bbox offset / size ratio / center offset / corner radius) -- gated separately from the visual score
Side-by-side comparisons (worst first)
|
Native fidelity (iOS Modern, Metal)68 pairs compared -- median 95.0%, worst 83.5% ( Distribution --
Geometry vs native (bbox offset / size ratio / center offset / corner radius) -- gated separately from the visual score
Side-by-side comparisons (worst first)
|
…guide figures The scheduler and the Gantt answer the pointer the way a desktop component does: a hovered item and slot light up, the cursor names what a press would do, a tooltip gives the full title and range, a dragged item lifts and settles where it lands, and a refused move slides back. The Material pickers sweep the clock hand and slide between months. Each has a stoppable clock (setAnimationTime), which is how the guide stages the motion as a row of frames. The toolbars of both components wrap to two rows where one does not fit, so a phone keeps the view buttons and the navigation. Fixed while drawing the figures: grid lines mixed against black on a transparent grid style, month chips that showed only a time, a background band at full strength over a person's day, clock numbers of the inner ring overlapping the outer one, and the year grid opening scrolled away from the selected year. The developer guide gains 43 figures covering every view, the CSS restyling, colours from data, a custom renderer, the Gantt with baseline, load and leveling, and the pickers, and the class documentation of Scheduler, Gantt and the pickers shows the main ones. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Native Windows port (arm64)Compared 222 screenshots: 210 matched, 12 missing references.
Benchmark ResultsDetailed Performance Metrics
ParparVM vs HotSpot (JDK 25): Windows arm64Runner CPU: ARMv8 (64-bit) Family 8 Model D49 Revision 0, MICROSOFT CORPORATION (baseline Ratios are ParparVM / JDK 25: below 1.00x ParparVM is faster (time) or smaller (RAM). Median of 5 interleaved, paired rounds; every run's output was verified. A ratio more than 20% (time) / 25% (RAM) above its baseline in
Result: no regression |
The hour, the colon, the minute and AM/PM were a flow of four components that each took their own preferred size: a one-digit hour was narrower than the minute, the two periods were as tall as their paddings added up to, and the colon sat where the font put its glyph. They are now laid out as one row measured against the box of the hour, with the colon drawn as two dots about the middle. The typed mode showed two small left-aligned text fields. They are now the boxes of the hour and the minute with a caret in them, in the same type, with two digits in the middle and "Hour" and "Minute" under them. The default styles of the scheduler, the Gantt chart and the pickers stayed light in dark mode under a theme that carries its dark styles as $Dark entries, which is every native theme without rules of its own for them. The picker screenshot tests show the picker as a Picker does, a card in the middle of a dimmed form, where they had stretched it across the form. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>












































































































































































































































































































































































































What this adds
Scheduling model and engine (
com.codename1.scheduling, no UI imports)ScheduleItem,ScheduleResource,ScheduleModel/DefaultScheduleModel, andCalendarScheduleModel, which shows anyCalendarSource(device, CalDAV, Google, Microsoft) with recurrences expanded and edits written back.WorkCalendar: working days, daily hours, holidays, arithmetic in working time.ProjectModel,GanttTask,TaskDependency(FS/SS/FF/SF with lag),ProjectScheduler(forward and backward pass, slack, critical path, summary roll-up, constraints, baselines; a link that would make a cycle is refused) andResourceLeveler, which proposes a change set the application applies or discards.Components (
com.codename1.ui.scheduler)Scheduler: day, work week, week, month, agenda, resource timeline and resource day views. Items are painted, not components, so thousands scroll. Drag to move, edge drag to resize, drag on empty time to create, snapping, zoom, current-time line, working-hours shading, vetoable change events.Gantt: task table beside the chart, bars, summaries, milestones, progress, baseline ghost bars, routed dependency links, critical path, drag to move, resize, set progress and link, with a resource load histogram underneath.SchedulePrinter: a scheduler or a Gantt chart on pages, as images, a PDF or a print job.Material 3 pickers (
com.codename1.ui.spinner)MaterialDatePickerandMaterialTimePicker, lightweight and theme styled.Pickeropens them when the theme constantpickerStyleismaterial, which the modern Android theme sets.setUseLightweightPopup(false)keeps the platform dialog, which no longer forces 24 hours.Themes
ui/Calendargains a today marker (setTodayUIID,calendarTodayUIID).Slate
Timelineis now the framework'sSchedulerbehind the same API: the owner board, and the provider's day and week. The Initializr template is re-synced.Docs and tests
Outer.Inner.CONSTANT.Notes for review
FrameworkChromeNeverWindowsTestlistsScheduler: its view menu and the Material picker dialog opt out of native window mode.🤖 Generated with Claude Code