Skip to content

view: every cell of a value over a coordinate index shows — #2060

Closed

Description

@shunichironomura

Warning

This content was written by an AI agent and must be verified by a human developer. After human verification, this alert may be removed.

Found in the review of #2057, which adds the experimental view. It does not block that PR; #2059 fixed the findings that did. Paths refer to #2059's head.

Problem

  • The view model lists an axis's entries (indexes[].labels) as the strings of entry_keys(): #0, #1, ….
  • It keys a value's entries by indexed_entry_display_name: 0 s, 0.5 s, ….
  • web/view/src/values.ts joins the two by string equality. No cell of a value over a coordinate index finds its value, so every cell shows —. Value diffs and selection do not reach those cells either.
  • A value over a Fin(n) axis is not drawn as a table: Fin axes are not in indexes at all.

Code: crates/graphcal-project/src/view_model/project.rs (axis labels), crates/graphcal-project/src/view_model/value.rs (entry keys), web/view/src/values.ts.

Reproduction

graphcal view tests/fixtures/valid/range_index.gcl:

{"indexes":[{"name":"TimeStep","labels":["#0","#1","#2"]}], …}

while node x's entries are keyed "0 s", "0.5 s", "1 s".

Proposed fix

  • Give each axis entry a { key, display } pair, and let value entries refer to key.
  • Include Fin axes in indexes.
  • Test the path from Rust through JSON to the page.

This changes the wire format, so it belongs with the other model contract changes.

The review rated this non-critical because no wrong number is shown. It is a candidate for raising, since time series are a main use of the view.

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

    bugSomething isn't workingrustwebviewThe experimental view (web/view, graphcal view, graphcal/viewModel)

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions