Skip to content

batches: make viewing the details of a locally-executed spec less weird

Warren Gifford requested to merge kr/local-specs-should-look-okay into main

Created by: courier-new

Although we're hiding locally-executed specs from the execution list views, it's still possible (and, in fact, likely) to pull up the details for one such batch spec from the batch changes list page if, for example, a user executes a spec locally but leaves it unapplied. For local specs, the experience in the execution UI was a little weird. This just makes it slightly less disorienting:

Screen Shot 2022-06-07 at 6 40 42 PM
  • The "Execution" tab will be disabled for locally-executed specs, since there's nothing to view there.
  • The workspaces preview panel will be hidden, since there's no workspaces resolution to show.
  • The execution stats will be hidden, and the state badge will show a special indicator, "LOCAL", to indicate the state is not really reflected from this page for locally-executed specs.

If someone does manually try to navigate to /execute, there will just be a message that there is no execution to show for this spec. I suppose I could also just conditionally disable the routes, but I thought this would be slightly more helpful.

Screen Shot 2022-06-07 at 6 41 14 PM

Unrelated, but there was apparently an eslint configuration change recently that now requires names for the functions passed to React.memo, so I updated those places for the SSBC components to get rid of the warning. For that reason I would recommend reviewing with the "don't show whitespace changes" option enabled, since a bunch of stuff got re-indented as a result.

Test plan

Tested locally with specs run from src-cli. Added additional storybook coverage for the components impacted.

Merge request reports

Loading