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

Commit bc0c050

Browse files
authored
feat: remove Find Implementations button (#65)
It is rarely supported and used, so it does not deserve such prominent billing. A future commit will allow consumers to add this button back. Helps with sourcegraph/sourcegraph#492
1 parent 10bf916 commit bc0c050

File tree

3 files changed

+3
-21
lines changed

3 files changed

+3
-21
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Adds code intelligence to code views on the web. Used in [Sourcegraph](https://s
1212

1313
- Listens to hover and click events on the code view
1414
- On mouse hovers, determines the line+column position, does an LSP hover request and renders it in a nice tooltip overlay at the token
15-
- Shows buttons for go-to-definition, find-references, find-implementations
15+
- Shows buttons for go-to-definition and find-references
1616
- When clicking a token, pins the tooltip to that token
1717
- Highlights the hovered token
1818

src/HoverOverlay.tsx

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export interface HoverOverlayProps {
5252

5353
/**
5454
* The hovered token (position and word).
55-
* Used for the Find References/Implementations buttons and for error messages
55+
* Used for the Find References buttons and for error messages
5656
*/
5757
hoveredToken?: HoveredToken & HoveredTokenContext
5858

@@ -205,24 +205,6 @@ export const HoverOverlay: React.StatelessComponent<HoverOverlayProps> = ({
205205
>
206206
Find references
207207
</ButtonOrLink>
208-
<ButtonOrLink
209-
linkComponent={linkComponent}
210-
// tslint:disable-next-line:jsx-no-lambda
211-
onClick={() => logTelemetryEvent('FindImplementationsClicked')}
212-
to={
213-
hoveredToken &&
214-
toPrettyBlobURL({
215-
repoPath: hoveredToken.repoPath,
216-
rev: hoveredToken.rev,
217-
filePath: hoveredToken.filePath,
218-
position: hoveredToken,
219-
viewState: 'impl',
220-
})
221-
}
222-
className="btn btn-secondary hover-overlay__action e2e-tooltip-find-impl"
223-
>
224-
Find implementations
225-
</ButtonOrLink>
226208
</div>
227209
{definitionURLOrError === null ? (
228210
<div className="alert alert-info hover-overlay__alert-below">

src/url.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export interface RangeSpec {
4242
range: Range
4343
}
4444

45-
export type BlobViewState = 'references' | 'references:external' | 'impl'
45+
export type BlobViewState = 'references' | 'references:external'
4646

4747
export interface ViewStateSpec {
4848
/**

0 commit comments

Comments
 (0)