Skip to content

v1.3.0

Choose a tag to compare

@EightKK EightKK released this 22 Nov 09:00
· 171 commits to main since this release
86fb8e0

Adds recurring events, automatic edge label placement, GanttChart header sorting and filtering, PropertyInspector assignment and dependency fields, TaskBoard collapse, filters and WIP minimums, and an opt-in CSV formula escape. It also fixes the findings of a full review of the components, the core and the interchange (including imports that a small hostile file could stall for seconds), and refactors large parts of GanttChart, NetworkGraph and the core without changing their results. A few changes are not strictly backward compatible: they are listed under "Breaking changes" and marked Behaviour change under "Fixed"; read them before upgrading.

Breaking changes

  • resourceLoadHistogram now throws a RangeError, not an Error, for load segments that overlap within a resource, like its other checks of times, load and capacity (an unknown resource still throws an Error). GanttChart reports overlapping loadSegments through validation-error with the same RangeError. Who is affected: code that tells this failure apart by its class, for example error.constructor === Error or !(error instanceof RangeError). What to do: check for RangeError; the message is unchanged.

Added

  • Recurring events (RFC 5545 RRULE), opt-in: new core functions parseRecurrenceRule, formatRecurrenceRule, expandRecurrence, expandRecurringEvents and applyRecurringEdit with the types RecurrenceFrequency, RecurrenceWeekday, RecurrenceRule, RecurrenceZoneOptions, CalendarRecurrence, RecurrenceSeries, RecurrenceOccurrence, RecurrenceExpandOptions, RecurringEditScope, RecurringEditTarget, RecurringEditChange and RecurringEditOptions. DAILY, WEEKLY, MONTHLY and YEARLY rules with INTERVAL, COUNT, UNTIL, BYDAY (with ordinals), BYMONTHDAY, BYMONTH, BYSETPOS and WKST, plus EXDATE and RDATE, expand in an IANA time zone or fixed offset and keep their local time across daylight-saving changes; sub-daily frequencies, BYHOUR, BYMINUTE, BYSECOND, BYYEARDAY and BYWEEKNO are rejected. CalendarEvent gains the optional recurrence, seriesId and recurrenceId, EventCalendarEdit the optional occurrence, and EventCalendarLabels the optional recurring; EventCalendar names occurrences "…, Recurring" and marks them with vw-is-recurring, while events without these fields render as before. applyRecurringEdit applies an edit to one occurrence (override or EXDATE), to it and the following ones (split series) or to the whole series. fromICalendar takes recurrence: 'series' (parsed rule, EXDATEs, RDATEs and RECURRENCE-ID overrides) or recurrence: { range } (expanded occurrences, new type ICalendarExpandOptions); the default is unchanged. toICalendar writes RRULE, EXDATE and RDATE for events with recurrence, with TZID times and a VTIMEZONE for an IANA zone. The "Event calendar" demo has a weekly sync with a choice of edit scope.
  • TaskBoard (opt-in, controlled): collapsible columns and lanes (collapsible, v-model:collapsed-column-ids, v-model:collapsed-lane-ids; collapsed areas render a narrow strip or only a header, are skipped by the keyboard and are not drop targets), a filter prop with "3 of 7" column counts (moves keep indices that count hidden cards, so applyBoardCardMove on the full array is right), and TaskBoardColumn.wipMin marking columns under a minimum (vw-is-under-minimum). groupBoardCards takes { filter }; TaskBoardCell gains indices and total, TaskBoardColumnStatus gains total, wipMin and underMinimum (these new fields are required, so code that builds TaskBoardCell or TaskBoardColumnStatus objects by hand, for example in test doubles, must add them; values from groupBoardCards already have them), and TaskBoardLabels gains wipMin, underMinimum, collapse and expand. New CSS variables --vw-board-wip-under, --vw-board-collapsed-width and --vw-board-collapsed-fill. The "Task board" demo shows them. Without the new props nothing changes.
  • NetworkGraph edgeLabelPlacement prop (opt-in, default 'midpoint', which keeps the current output): 'avoid' or an options object moves edge labels along and beside their routes, away from node boxes, other labels and other edges where there is space. It runs after all routing, avoidNodes included; drag and resize previews place the labels of the changed edges and those near the changed nodes, and exportSvg and exportPng draw the placed labels. The diagram styles demo has a "Place labels clear" toggle.
  • Core placeGraphEdgeLabels(layout, edges, options) with GraphEdgeLabelPlacementOptions (fontSize, glyphWidth, labelSize, labelText, gap, margin, samples, edgeIds, obstacles), GraphEdgeLabelSize and GraphEdgeLabelPlacement: a deterministic greedy label placement that returns a new layout and keeps the edgeLabels anchor meaning (centre and baseline of the text).
  • GanttChart header sorting and filtering, opt-in: sortableColumns (true or column IDs, timelineLabelColumnId for the row label column) adds a sort button to each header ("Sort by Finish") that cycles that column's rule through ascending, descending and none, keeping the other rules, and proposes the sort through update:sort; the button name carries the controlled sort ("Sort by Finish (ascending)"). filterableColumns adds a filter button that opens a small dialog with a text filter (and a value list for a select field), proposing update:filters for the controlled filters prop; Escape closes it and returns focus. The chart never reorders or filters rows; apply the proposals with useTimelineView (new setFilters). New GanttLabels entries sortBy, sortedAscending, sortedDescending, filterBy, filtered, filterContains, filterValues and clearFilter. Without the new props the markup is unchanged.
  • Timeline views: TimelineViewState.filters (TimelineViewFilter: columnId, optional text and values), optional so states saved without filters still parse; projectTimelineView keeps the ancestors of filtered rows and sorts or filters by row label for timelineLabelColumnId. New core helpers filterTimelineRows(rows, predicate) (matches with their ancestors) and nextTimelineSort(sort, columnId).
  • PropertyInspector list fields, opt-in: assignments (resource select, units, add and remove) and dependencies (predecessor, FS/SS/FF/SF type, lag, add and remove) tables in fields, with accessible names such as "Units for Crane" and "Remove Crane". Each edit proposes the whole list through the new list-change event, checked by the new core validateInspectorList and a synchronous validateListChange (list-change-rejected, reason shown inline). New types InspectorListFieldKind, InspectorOption, InspectorAssignment, InspectorDependency, InspectorAssignmentsField, InspectorDependenciesField, InspectorListField, InspectorListChange and InspectorListChangeValidator, and optional PropertyInspectorLabels entries for the table. change and InspectorChange are unchanged.
  • toCsv(table, { escapeFormulas: true }) (opt-in, new type CsvOptions) writes text cells that start with =, +, -, @, a tab or a carriage return with a leading apostrophe, so spreadsheets do not run them as formulas. Number cells are unchanged, and without the option the output is the same as before.
  • GraphEdgeLabelPlacementOptions.edgeWidth(edge), opt-in: the drawn width of wide edges such as flow bands, so a label keeps its gap from the outer side of its band and other labels stay off the band. NetworkGraph passes the edgeBands widths when edgeLabelPlacement is on. labelSize and edgeWidth may return null as well as nothing.

Fixed

  • fromDrawio and fromDrawioAsync read deeply nested containers in linear time (20,000 levels took about 36 seconds, now under half a second) and collect the label cells of edges in linear time; label cells now count against maxItems like nodes, edges and groups, so a file with more than maxItems items including its label cells now throws a RangeError.
  • toDrawio writes a node label that has a line break also as vwLabel in the style, so fromDrawio reads it back whole instead of splitting it into label and detail. Files without vwLabel are read as before.
  • timelineFromCsvTable builds WBS ancestors and the row order without quadratic work (a 20,000-level code in about 40 KB took about 10 seconds) and throws a RangeError for a WBS code of more than 1,000 levels.
  • toMsProjectXml writes carriage returns in project, task, calendar and resource names as 
, so they survive a round trip instead of being read as line feeds.
  • Character references in draw.io HTML labels and Mermaid entity codes are decoded only for characters XML allows, as in the XML reader: references to C0 controls (other than tab and line breaks), U+FFFE and U+FFFF stay as written. toMermaid drops those characters and unpaired surrogates from labels, as the XML writers do.
  • SVG export theme colours must be CSS colour values (hex, colour names and keywords, and the functions rgb, rgba, hsl, hsla, hwb, lab, lch, oklab, oklch, color, color-mix, light-dark, var and calc), so a theme cannot put a url() reference into the exported image. Behaviour change: other values, which were written into the SVG unchecked before, now throw a RangeError naming the key; the colours the components read from the stylesheet are not affected.
  • Behaviour change: the exposed TaskBoard cancelMove() now reports card-move-cancel with the new reason api (added to TaskBoardMoveCancelReason), like EventCalendar's cancelEdit(); it reported escape before. Code that switches on the reason should handle api.
  • TaskBoard: with a filter on, the arrow keys moved the focus to the wrong card, because the index counted hidden cards. Collapsed column and lane IDs are now compared by value and filter by the cards it shows, so an equal array or a new function passed inline no longer cancels a move on every render of the parent; a filter that is not a function is reported through validation-error (TypeError from groupBoardCards). A drop on the card's own place now reports card-move-cancel (no-target), as documented. Column and lane toggles are described by the column's count and WIP state and the lane's count, so collapsed areas still report them, and a card is described by its detail (its name is unchanged). Styles: the collapse chevron points the right way in right-to-left boards, forced-colors mode marks columns under their minimum and collapsed strips with dashed borders, and print shows the whole board without toggles.
  • EventCalendar: a keyboard edit that validateEdit rejected no longer takes the focus back to that event after a later, unrelated change of events, and the focus request is dropped when the focus moves elsewhere. A pointer cancellation no longer swallows the next click or Space. locale (and height and dir) are validated and reported through validation-error instead of failing during rendering. The hour gutter uses formatTime when it is given (default output unchanged), and month view events get a keyboard hint that names Up and Down (new optional EventCalendarLabels.monthEditHint, defaulting to dayEditHint when only that is localized). In forced-colors mode today's column keeps a system-colour background with a Highlight frame.
  • Edge label placement: with a gap smaller than margin, a label no longer lands on its own route instead of beside it; duplicate or invalid edge IDs throw Duplicate edge ID: <id> / Invalid edge ID: <id> instead of depending on the input order; an obstacle that is not a rectangle (such as null) throws RangeError('Invalid edge label obstacle at index <i>'); labelSize returning null uses the estimate; samples out of range reads samples must be an integer from 1 to 32 (got …); the outside-the-layout cost is weighed in label area. NetworkGraph drag previews also place labels whose estimated box (not just the anchor) comes near a changed node, and keep the saved anchors of edges rerouted along an unchanged path, so labels no longer jump when a drag starts.
  • NetworkGraph: node-move and nodes-move payloads are plain objects again (the drag preview held reactive proxies, so structuredClone(change) threw); an inline avoidNodes object literal no longer reroutes every edge and cancels a gesture in flight each time the parent renders; arrow keys on a node no longer propose a move while a keyboard connection is armed; hover tooltips and context menus treat resize and waypoint handle drags like the other pointer gestures; moving saved positions with collapsed groups no longer lays out the expanded graph again; alignment guide candidates are collected once per drag.
  • rescheduleFromStatusDate lets a partly done task meet its own finishNoEarlierThan: the remaining work resumes later, as it already did for FF and SF links and as rescheduleFromActuals does, instead of returning infeasible with ['finishNoEarlierThan', 'fixedStart'].
  • levelResources with { explain: true } no longer takes cubic time: 1,000 unit tasks on one resource took about 16 seconds and recorded 503,500 reasons, and now take well under a second with 4,999. Adjacent capacity shortages with the same capacity now form one capacity reason that names every holding task (see Explain a plan). Leveling without explain scans each resource from a task's earliest start instead of from the start of the horizon; its results are unchanged.
  • filterGraph walks once from all matching nodes instead of once per match, so a 20,000-node chain where every node matches, with neighborhood: 20000, takes a fraction of a second instead of about two minutes. The result is unchanged.
  • countGraphCrossings validates its input: an unknown direction and a box without finite geometry and rank throw a RangeError, and an edge end without a box throws an Error (Unknown node in graph edge <id>: <node>) instead of being skipped silently.
  • traverseGraph rejects duplicate and empty node IDs with an Error, as it already did for edges.
  • graphAlignmentGuides, snapGraphPoint, graphNodesInPolygon, findOrthogonalRoute and graphLayoutChangeMetrics throw a RangeError instead of a TypeError for a missing (null or undefined) rectangle, box or point.
  • layoutFlowGraph with the default scale no longer throws for a rank too wide for 360 units (about 23 or more nodes): the default extent grows to that rank's gaps and minimum node sizes. Small graphs lay out as before, and an explicit fitExtent that is too small still throws.
  • validateTimelineData names the dependency in Invalid dependency type: <id>.
  • The numeric options of the graph routing, snapping, analysis and filter functions use the layout options' message format, <option> must be <rule> (got <value>). Error classes are unchanged.
  • GanttChart header controls: the header cells no longer claim role="columnheader" and aria-sort outside a table row (assistive technology could ignore them, and only some headers had the role); the sort state is in the sort button name instead, also for secondary sort rules. nextTimelineSort keeps the other sort rules and rotates only the activated column (a new column becomes the first rule). The filter text box is controlled like the value checkboxes (text the parent does not apply is replaced by the applied filter), whitespace-only text removes the filter, and text composed with an input method is proposed once, when the composition ends. Empty sortableColumns or filterableColumns lists no longer reserve the timelineLabelColumnId column ID, and unknown IDs in these lists are reported through validation-error.
  • GanttChart: a keyboard row move that is rejected or ignored no longer pulls focus back to the bar on a later bars update; bar keys no longer edit, and a bar press no longer starts a drag, while an armed connection or another pointer gesture is in flight. A spreadsheet fill handle drag is now cancelled by Escape, cancelEdit(), new rows or columns and readonly or spreadsheet changes with edit-cancel (empty barIds), starts only for a primary pointer with no other gesture in flight, and blocks other gestures while it runs. A zoom change (buttons, presets, Ctrl+wheel, fitToBars) now cancels progress, constraint, connection and create drags with source-changed, as documented. Validated props that do not change the rows (such as now, markers or tooltipDelay) no longer rebuild the row tree, which also cancelled a fill drag. Scrolling no longer reads the label column's layout on every scroll event, and vertical scrolling no longer recomputes the time window.
  • PropertyInspector list fields: validateInspectorList requires positive safe integer units (and defaultUnits and maxUnits must be positive integers), as ResourceAssignment does, and safe integer lags, as schedule links do; a lag typed in display units (lagUnitSize) is rounded to whole model units. Messages and aria-invalid now belong to the box or select that caused them (the type select included), so Escape or typing in one box no longer clears another box's rejection.
  • useEditTransaction: submit, undo and redo no longer throw when the adapter's validate or apply or createOperationId throws; they resolve to invalid with the error message and save nothing.
  • EventCalendar, TaskBoard, GanttChart and NetworkGraph: a blank or whitespace-only rejection reason from any validator (validateEdit, validateCreate, validateCardMove, GanttChart's validateConnection, validateCellEdit or validateSheetEdit, NetworkGraph's validateConnection, validateDelete, validateEdgeReshape, validateNodeResize or validateLabelEdit) now rejects with that validator's default text (such as labels.rejected, labels.createRejected, labels.moveRejected or labels.connectionRejected), as PropertyInspector already did, instead of emitting and announcing an empty reason.
  • EventCalendar: a pointer drag in the day or week time grid that rests near the top or bottom of the visible grid now scrolls it, so an event can be moved, resized or created into hours scrolled out of view.
  • GraphPalette and PropertyInspector use the default colours of the other components when --vw-muted and --vw-surface-hover are unset: secondary text is #4c6371 (was #4f6574) and hovered palette items and inspector buttons are #edf5fa (was #e4ecf2 and #e3edf5). The stylesheet now defines these shared defaults once on the component roots; themes set through --vw-* variables are unaffected.
  • toGraphMl and toMermaid indent nested groups at most 32 levels deep, so their output grows linearly with the nesting depth instead of quadratically: toGraphMl threw "Invalid string length" for 20,000 nested groups. Output for 32 or fewer levels is unchanged.
  • fromMermaid skips an accDescr { … } block up to the first } after it. A } earlier on the same line (such as }; accDescr { or a quoted label) sent the reader back before the block, so it looped without end, adding warnings until memory ran out, or failed with a misleading syntax error.
  • NetworkGraph: a pointer capture that the browser refuses (for example for a synthetic or already released pointer) no longer throws after the drag state was set, which left a half-started drag without gesture-start.

These fix the unreleased recurring events:

  • applyRecurringEdit with 'following' no longer throws "Duplicate event ID" after an 'occurrence' edit of the same occurrence; the dropped override frees its ID for the new series.
  • applyRecurringEdit with 'following' on an RDATE now ends the series before it and starts the new series at the next rule instance, with the changed occurrence as an RDATE, instead of moving the rule onto the RDATE's weekday. A recurrenceId that is not an occurrence of the series throws an Error.
  • applyRecurringEdit throws an Error, instead of silently changing the rule's meaning, for a move to another day of a rule with BYDAY ordinals (2MO), BYSETPOS, BYMONTHDAY days outside 1–28, or BYMONTH when the occurrence changes month. Moves within the day are unchanged.
  • toICalendar writes a series with a nonzero utcOffsetMinutes as local times with a fixed-offset TZID (UTC+0900) and VTIMEZONE instead of UTC, so BYDAY and BYMONTHDAY keep their local days; fromICalendar reads such a fixed-offset VTIMEZONE back as utcOffsetMinutes.
  • toICalendar writes overrides (seriesId and recurrenceId, new optional fields of ICalendarEvent) of a series in the same export with the series' UID and a RECURRENCE-ID, so a reimport with { range } no longer shows the changed occurrence twice.
  • VTIMEZONE observances written by toICalendar now begin in the year before the zone's first event instead of after it (for example in the southern hemisphere).
  • Rules that can never match, such as FREQ=DAILY;BYMONTH=2;BYMONTHDAY=30, are detected up front instead of walking 146,097 days on every expansion.

Changed

  • Less repeated work in the core, with the same results: propagateEdit, rescheduleFromStatusDate and rescheduleFromActuals build the scheduling model of the unedited plan once instead of twice, and resolveEntityRefs checks a load target only against the bound load targets of its own resource.

Demo

  • Four new design gallery showcases: CI/CD pipeline (a live job DAG linked to a run timeline, with failure injection and retry), Knowledge graph (a force-directed graph with clusters, search, neighbourhoods and shortest paths), Construction program (a scheduled master programme with critical path, baseline, resource leveling, earned value and a what-if delay) and Service map (a live service topology with grouped namespaces, traffic-weighted edges, an incident blast radius and an alert timeline).

Development

  • Browser tests on CI: the browser job retries a failed test once, keeps traces and uploads the Playwright report as an artifact on failure. The test server starts with the new --strict-port flag of scripts/serve.mjs and fails with a clear message when the port is taken instead of moving to another one; VW_PORT=0 is rejected by the Playwright config and means "any free port" for npm start. The gantt tooltip test no longer waits on the wall clock.
  • The npm release workflow now waits up to about 10 minutes, instead of 90 seconds, for the registry to list a new version before it compares the integrity, and logs each wait. npm took longer than 90 seconds for 1.1.0 and 1.2.0, so the job failed after a successful publish and needed a rerun.