Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Jdb/poc-inline-insights #39394

Closed
wants to merge 14 commits into from
Closed

Jdb/poc-inline-insights #39394

wants to merge 14 commits into from

Conversation

unclejustin
Copy link
Contributor

@unclejustin unclejustin commented Jul 26, 2022

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

Related BE PR: https://github.com/sourcegraph/sourcegraph/pull/39475

To set up pick any file. I've been using this one: https://sourcegraph.test:3443/github.com/sourcegraph/sourcegraph/-/blob/enterprise/internal/insights/query/querybuilder/builder.go?L24

Then create an insight with any keyword in that file. You should see the line decoration for that file. Clicking the decoration should open the popover. Clicking it again should close the popover.

Known Issues:

  • Links aren't clickable. Popover seems to render beneath code.
  • To keep the popover from closing when mousing away from the decoration, I set hideOnClick="toggle" in LineDecorator. This works but also means the popover doesn't close when you click outside the popover. Which is not great.

Remaining Items:

  • Fix the above. Probably clean up how we pull data. (I am so sorry)
  • Build the dropdown for the file at the top of the blob view. You should be able to reuse the popover component I already built.
  • Extract all of the logic building the decorations in Blob.tsx to a utility so that we don't clutter up Blob anymore.
  • Make sure all of this is feature flagged default off

Note

Felix recommended breaking this up into 3 separate issues. I've stubbed them out below. I would take the code in this PR and pull what you need into brand new feature branches to build these one at a time.

For example: Grab the popover component and build the file drop-down first.

Here are the issues in order of what makes sense so that they build on each other:

  1. https://github.com/sourcegraph/sourcegraph/issues/39550
  2. https://github.com/sourcegraph/sourcegraph/issues/39551
  3. https://github.com/sourcegraph/sourcegraph/issues/39552

Note 2

@Joelkw actually wants item 3 above done first, but it doesn't make sense to build it this way. (Sorry Joel). I recommended breaking this up into smaller pieces and getting them reviewed/merged separately.

Test plan

N/A This is just a spike

App preview:

Check out the client app preview documentation to learn more.

@cla-bot cla-bot bot added the cla-signed label Jul 26, 2022
@unclejustin unclejustin force-pushed the jdb/poc-inline-insights branch from c8d3c83 to 8fca471 Compare July 26, 2022 00:03
@CristinaBirkel
Copy link
Contributor

@unclejustin closing this PR since we've re-prioritized such that this prototype will no longer be developed and we don't want to merge in any of the code.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Display insights in blob view without extensions
2 participants