Skip to content

RevisionsPopover: Refactor and support speculative results

Administrator requested to merge tr/revisions-popover-refactor into main

Created by: umpox

This PR:

  1. Refactors RevisionsPopover away from FilteredConnection to use useConnection and generic Connection UI components.
  2. Adds support for displaying 'speculative' results alongside branch nodes. This is to support ancestry branch references (e.g. branch^1) and is required for https://github.com/sourcegraph/sourcegraph/issues/22677. This is currently not enabled but will be for the compare page
  3. Fixes a bug where the RevisionsPopover relied on the location changing to be dismissed, meaning clicking a node that does not change location would not hide the popover. This is just by attaching a onClick prop to the rendered nodes. This prop will also be used to fire other side effects for future work, like eventLogger.
  4. Adds RevisionsSelector to Storybook, which should help catch a lot of bugs that we've previously missed due to us now having visual regression tests.
  5. General code/docs/redesign cleanup across components

Part of https://github.com/sourcegraph/sourcegraph/issues/22677

Follow on PR to enable this on repository compare page: https://github.com/sourcegraph/sourcegraph/pull/23977

Standard

image

Speculative result

image

Merge request reports

Loading