Skip to content

Insights/fix-series-toggle

Warren Gifford requested to merge insights/fix-series-toggle into main

Created by: unclejustin

Closes https://github.com/sourcegraph/sourcegraph/issues/36461

Before this PR clicking on all series toggled them to "on" but then clicking a series again toggle just that series "off". This felt misleading because clicking all fo the series "on" implies resetting the chart to the default state. Such that clicking a series from here, should only display that series.

This PR clears out the selections when all series have been "toggled on" so that the default state is reset correctly.

Test plan

  • Added unit test confirming deselecting of series when all series have been selected
  • Open storybook
  • Go to "Smart Insights View Grid Example"
  • Use "Backend insight #2 (closed)"
  • Click first legend item
  • Only that series is shown
  • Click second legend item
  • Both series are shown
  • Click third legend item
  • All three series shown
  • Click first legend item again
  • Only that series shown

App preview:

Check out the client app preview documentation to learn more.

Merge request reports

Loading