Skip to content
This repository has been archived by the owner on Nov 25, 2021. It is now read-only.

feat: document highlights #278

Merged
merged 20 commits into from Jul 2, 2020
Merged

feat: document highlights #278

merged 20 commits into from Jul 2, 2020

Conversation

efritz
Copy link
Contributor

@efritz efritz commented Jul 1, 2020

Part of sourcegraph/sourcegraph#10868. Sibling PRs: sourcegraph/sourcegraph#11822 and sourcegraph/code-intel-extensions#409

This PR adds functionality to subscribe to hover events and highlight the ranges which are returned from the new createHoverifier parameter of createHoverifier. This is conceptually symmetric to what happens when the hover symbol itself is highlighted.

Kapture 2020-07-01 at 10 03 05

@efritz efritz marked this pull request as ready for review July 1, 2020 15:14
@efritz efritz requested a review from a team July 1, 2020 15:14
src/hoverifier.ts Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jul 1, 2020

Codecov Report

Merging #278 into master will increase coverage by 0.35%.
The diff coverage is 91.11%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #278      +/-   ##
==========================================
+ Coverage   85.29%   85.64%   +0.35%     
==========================================
  Files          14       14              
  Lines         578      620      +42     
  Branches      145      158      +13     
==========================================
+ Hits          493      531      +38     
- Misses         85       89       +4     
Impacted Files Coverage Δ
src/types.ts 100.00% <ø> (ø)
src/hoverifier.ts 85.77% <90.00%> (+0.62%) ⬆️
src/testutils/fixtures.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ee60fa4...1f9ec13. Read the comment docs.

@efritz efritz changed the title feat: highlight visible references feat: document highlights Jul 1, 2020
Copy link
Contributor

@felixfbecker felixfbecker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall!

src/hoverifier.ts Outdated Show resolved Hide resolved
src/hoverifier.ts Outdated Show resolved Hide resolved
src/hoverifier.ts Outdated Show resolved Hide resolved
src/hoverifier.ts Outdated Show resolved Hide resolved
src/hoverifier.ts Outdated Show resolved Hide resolved
src/hoverifier.ts Outdated Show resolved Hide resolved
@efritz efritz requested a review from felixfbecker July 2, 2020 16:46
@efritz efritz requested a review from eseliger July 2, 2020 17:14
Copy link
Contributor

@felixfbecker felixfbecker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to have tests here too :)

src/hoverifier.ts Outdated Show resolved Hide resolved
src/hoverifier.ts Outdated Show resolved Hide resolved
src/hoverifier.ts Outdated Show resolved Hide resolved
src/hoverifier.ts Outdated Show resolved Hide resolved
@efritz efritz requested a review from felixfbecker July 2, 2020 18:19
@efritz
Copy link
Contributor Author

efritz commented Jul 2, 2020

@felixfbecker Added a test.

src/hoverifier.test.ts Outdated Show resolved Hide resolved
src/hoverifier.test.ts Outdated Show resolved Hide resolved
src/hoverifier.test.ts Show resolved Hide resolved
@efritz efritz requested a review from felixfbecker July 2, 2020 19:44
src/testutils/fixtures.ts Outdated Show resolved Hide resolved
Co-authored-by: Felix Becker <felix.b@outlook.com>
@efritz
Copy link
Contributor Author

efritz commented Jul 2, 2020

🎉

@efritz efritz merged commit f71c1a2 into master Jul 2, 2020
@efritz efritz deleted the document-highlight-provider branch July 2, 2020 19:59
@sourcegraph-bot
Copy link

🎉 This PR is included in version 7.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

None yet

4 participants