Skip to content

v0.29.0

Choose a tag to compare

@AlexeyMz AlexeyMz released this 24 Mar 22:22
· 163 commits to master since this release

馃殌 New Features

  • Support round (elliptical-shaped) elements:
    • Allow element templates to set shape: 'ellipse' to correctly compute link geometry;
    • Change ElementTemplate to be an object with additional element template options, allow to return both ElementTemplate and ElementTemplateComponent from elementTemplateResolver;
    • Add built-in basic circle-shaped RoundTemplate with its RoundEntity template component;
    • Add RenderingState.getElementShape() method to compute shape information (including bounds) for the element.
  • Support smooth-curved links:
    • Allow link templates to set spline: 'smooth' to have rounded joints and overall shape via cubic B茅zier curves;
    • Render links as smooth-curved by default unless a spline: 'straight' is set in the link template.
  • Allow to dock a dialog to any side of a target with dock property with a configurable dockMargin.

馃悰 Fixed

  • Fix search section activation race in UnifiedSearch which causes to sometimes open the first section instead of the specified one in focus command.
  • Auto-focus on search input field in UnifiedSearch on focus command.
  • Use --reactodia-viewport-dock-margin instead of a hard-coded value to compute max size for a dialog without target.

馃拝 Polish

  • Use "rounded" look by default by setting default --reactodia-border-radius-base to a non-zero value (it can be unset as before if desired to have a more "rectangular" UI styling).
  • Make Canvas a focusable element to allow to handle keyboard events scoped to the graph:
    • Removing selected elements on Delete key press now happens only when SelectionActionRemove if displayed by the Halo or Selection canvas widgets and only if the canvas has the focus to avoid accidental element removal by the action from unrelated document parts.
    • Expose keydown and keyup events on CanvasApi.events to handle keyboard events scoped to the canvas.
    • Canvas is now auto-focused (without scroll) on certain actions such as removing selected elements, grouping or ungrouping entities or dismissing a dialog.
  • Export built-in templates and its components separately for easier customization:
    • Change StandardTemplate to a template object, expose its components as StandardEntity and StandardEntityGroup;
    • Change ClassicTemplate to a template object, expose its component as ClassicEntity;
    • Rename DefaultLinkPathTemplate to DefaultLink.
  • Improve default routing for self (feedback) links with a single user-defined variable to have a basic loop instead of a straight line.
  • Reduce the size of the main package bundle by moving fallback synchronous (blocking) layout into the separate entry point /layout-sync:
    • [馃挜Breaking] Make defaultLayout a required prop for a Workspace: if a bundled synchronous fallback (blockingDefaultLayout()) was used by default, now it is necessary to import it manually from /layout-sync;
    • The recommended layout algorithm usage is as before via Web Workers with defineLayoutWorker() and useWorker().
  • [馃挜Breaking] Replace explicit "commands" passing by common WorkspaceContext.getCommandBus():
    • Remove all commands-like props from components, e.g. commands, connectionMenuCommands, instancesSearchCommands, searchCommands.
    • Triggering a command or listening for one from outside the component should be done by acquiring a commands object using getCommandBus() with the following built-in command bus topics: ConnectionsMenuTopic, InstancesSearchTopic, UnifiedSearchTopic, VisualAuthoringTopic.
    • [馃ИExperimental] Custom command bus topics can be defined with CommandBusTopic.define().
  • Support linkType option for SelectionActionEstablishLink to create a relation of a specific type from that action by default.

馃敡 Maintenance

  • Move deprecated type styles and link templates into separate entry point @reactodia/workspace/legacy-styles, including SemanticTypeStyles, makeOntologyLinkTemplates(Reactodia) (factory) and makeLinkStyleShowIri(Reactodia) factory.
  • Remove deprecated WorkspaceProps.onIriClick() and corresponding events and trigger method on SharedCanvasState.
  • Extract HashMap, HashSet and hash-code generation utilities into separate package @reactodia/hashmap.
  • Extract Web Worker-related utilities into separate package @reactodia/worker-proxy:
    • @reactodia/worker-proxy/protocol should be used instead of @reactodia/workspace/worker-protocol to define custom workers.
    • useWorker() hook now accepts any worker adhering to the RefCountedWorker interface from @reactodia/worker-proxy, e.g. created with refCountedWorker() function.
  • Replace classnames runtime dependency by clsx.
  • Update runtime dependencies: n3, @vscode/codicons.
  • Update dev-dependencies: Webpack + loaders, SASS, TypeScript, Vitest, ESLint.

Link to the CHANGELOG v0.29.0