Skip to content

v0.23.0

Choose a tag to compare

@github-actions github-actions released this 20 Nov 21:44
a96ba7f

What robot products need that no other kit has (a live camera, a dead-man drive pad, a site map), and every component's words translatable.

Added

  • camera-feed (beta): a robot's live camera over a native <video> the app feeds (a WebRTC stream, set as srcObject, or a src the browser plays), no streaming library; the app owns the connection. It always says whether the picture is live, by a shape and a word in the header beside the camera and the robot: Live (a still dot, never red, never pulsing) with latencyMs; Connecting (the only blue: a spinner, over a skeleton that holds aspectRatio); Stalled · last frame 14:02:31 over the dimmed last picture after staleAfterMs (2 s) without a new frame, watched with requestVideoFrameCallback, else timeupdate; Paused; Camera offline with offlineReason and Reconnect (onRetry); No camera. Pause view freezes this screen only (the robot keeps streaming); snapshot draws the frame on screen to a PNG for onSnapshot; mute only with audio; full screen. Space and F only while focus is inside. children are drawn over the picture (a crosshair, detection boxes). Labels exported as CameraFeedLabels / defaultCameraFeedLabels, with formatTime for the site's clock.
  • Icon set: VideoOff, for no live picture (the camera is offline, or there is none).
  • teleop-pad (beta): manual driving of a mobile robot from a phone or a console, as a dead-man stick. The robot moves only while the stick is held: release, a cancelled pointer, lost focus, a hidden page or timeoutMs without pointer events send a zero command at once and call onStop with the reason. While held, { linear, angular } (−1…1, ROS REP 103 axes) goes out at a fixed rateHz (10) so the robot can run its own watchdog. Pressing never moves the robot (the stick starts where the finger lands); dead zone 10 %, maxSpeed drawn as a scale; arrow keys or W A S D while held, Space to stop; a status line with icon and words (Hold to drive, Driving · 0.4 m/s, Stopped, Disabled: reason); 56 px knob, larger in glove density; haptic ticks. A mouse held perfectly still sends no events, so the 2 s pointer timeout stops it too; timeoutMs={false} turns that off, only where the robot runs its own watchdog. The emergency stop stays StopButton, beside it.
  • feedback: driveStart and driveStop patterns (one and two short ticks) for manual driving.
  • Icons Move (moving under manual driving) and CirclePause (standing still after manual driving ended).
  • robot-map 0.23.0 (beta): the kit's site map, as a component. It lived only as a drawing inside map-workspace. RobotMap draws a floor plan in metres (an image URL or your SVG) in plain SVG, with no map library: zones (no entry, slow, charging, other) as hairline outlines with an icon and a name, never a fill; planned routes dashed in the in-progress blue, travelled tracks solid grey; robots as their status shape with a heading tick and their name, which moves aside rather than cover another, and the state in words when a robot needs someone; selection as a ring and a bold name. Pan and zoom by drag, two fingers, the wheel (once the map has focus, or with Ctrl, so a page still scrolls past it), 44 px zoom and fit buttons, and keys (arrows, + / -, 0), gliding at --motion-base unless motion is reduced. A scale bar, a north arrow when northDeg is given, and empty, loading and error states. The map is one Tab stop; RobotMapList lists the same robots with position, zone, heading and state, and a row selects its robot on the map. Coordinates are metres from the plan's top-left, y down, heading clockwise from the top; from a ROS map frame: x = xRos − originX, y = height − (yRos − originY), heading = 90 − yaw × 180 / π (in the docs and the type).
  • lint:rules: a block that draws a RobotMap must also render RobotMapList, as a chart block renders its table and a graph block its list.

Changed

  • map-workspace 0.23.0 is built on robot-map: same layout, trays and markers, now with heading ticks, a named loading bay, a scale bar and pan and zoom. Its robots are listed in a Robots sheet from the top bar.
  • Localisation: every word the kit says can be translated without editing its source. Components that showed or announced fixed English now take labels, the kit's existing pattern: an exported <Name>Labels type and English default<Name>Labels, merged under a partial labels prop, with functions for words that hold a number or a name. New in 0.23.0: Autocomplete, Breadcrumb, ChipGroup, CommandDialog, CopyButton, DataGrid (every part, selectColumn and expandColumn included; DataGridPagination passes Pagination's), DatePicker and DateRangePicker, DialogContent, PhoneInput, Questionnaire and QuestionField, RouteProgress, SearchField, Spinner, Attachment, Stepper and StepperCompact, Sortable (its drag announcements), Trace and TraceHeader (status words, counts, durations), TimePicker. The defaults are today's words; single props such as label, placeholder and closeLabel still work and win.
  • locale where a component formats a number, a day or a time itself: ChipGroup, Filters, LoadMore and ShareBar (numbers; left out, the browser's language as before), DatePicker and DateRangePicker (the trigger's day with Intl, plus calendarLocale for react-day-picker's calendar), TimePicker (times with Intl), PhoneInput (country names and their order; English when left out). Calendar lets a react-day-picker locale such as zhTW name its days.
  • Docs: Localisation (Getting started): why labels and locale, the pattern, a worked zh-TW example, and every component's keys with their English defaults, generated from the source (npm run props now records each labels prop's keys in site/props.json).

Fixed

  • tabs 0.23.0: no scrollbar on the tab list on phones. The triggers sit 1 px past the list's border (-mb-px, so the underline covers it); with overflow-x: auto for many tabs, overflow-y computes to auto too, so the list scrolled 1 px vertically and Android showed a scrollbar on first load. overflow-y is now hidden (also on the docs' component tabs and the drawer's area tabs). Checked on all 334 pages at phone width: no box scrolls by 1–4 px any more.