This repository was archived by the owner on Sep 30, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
hideOnClick="toggle"
inLineDecorator
. This works but also means the popover doesn't close when you click outside the popover. Which is not great.Remaining Items:
Blob.tsx
to a utility so that we don't clutter up Blob anymore.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:
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.