Skip to content

feat(monitor): support mode and style in preview and editor #3502

Description

@nighca

Background

PR #3487 added model-layer support in Builder for reading, validating, cloning, and exporting monitor mode and style fields. It currently accepts only mode: 1 | 2 and style: default | scratch.

SPX now supports four monitor modes: default (1), large/value-only (2), slider (3), and list (4). Builder therefore rejects valid SPX projects using modes 3 or 4.

The Builder UI also does not yet consume the supported display fields: monitors configured with the new appearances still use the legacy rendering in StageViewer and MapViewer, and the SPX project editor does not offer controls to edit mode or style.

Goal

Provide complete Builder support for SPX monitor mode and style in both project modeling and preview/editing experiences.

Scope

  • Extend the monitor model, raw configuration validation, clone, and export paths to preserve all supported modes: 1 | 2 | 3 | 4. Existing style support remains default | scratch.
  • Render monitors in StageViewer and MapViewer according to mode and style:
    • default + mode 1 (standard)
    • default + mode 2 (large, value-only)
    • scratch + mode 1 (Scratch-style label and value)
    • scratch + mode 2 (Scratch-style large, value-only)
    • mode 3 (Scratch-style slider)
    • mode 4 (Scratch-style list)
  • Builder preview support for modes 3 and 4 is visual-only: slider input and list interaction are not editable in StageViewer or MapViewer.
  • Add mode and style controls for modes 1 and 2 to the monitor widget detail panel in the SPX project editor. Changes should update the preview immediately and persist through save/export. Whether to expose the runtime-specific slider/list configuration in the editor is out of scope for this issue.
  • Add automated coverage for model serialization and preview rendering. Existing projects using style: default must retain their current appearance and behavior.

Upstream references

SPX monitor feature requests and implementations:

Builder model-layer support:

Acceptance criteria

  • Builder loads, clones, and exports projects with monitor modes 1–4 without rejecting or downgrading their configuration.
  • Projects containing each supported appearance render monitors in StageViewer and MapViewer consistently with SPX runtime semantics; modes 3 and 4 are rendered as non-interactive previews.
  • Users can change mode and style for scalar monitors (modes 1 and 2) in the monitor detail panel; the preview updates immediately and the configuration remains after reloading the project.
  • Legacy default monitors have no visual regressions.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions