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

Validate CodeMirror as alternative blob view implementation #39408

Closed
20 of 21 tasks
fkling opened this issue Jul 26, 2022 · 5 comments
Closed
20 of 21 tasks

Validate CodeMirror as alternative blob view implementation #39408

fkling opened this issue Jul 26, 2022 · 5 comments
Assignees
Labels
codemirror PRs and issues related to migrating to CodeMirror team/code-navigation team/graph Graph Team (previously Code Intel/Language Tools/Language Platform)

Comments

@fkling
Copy link
Contributor

fkling commented Jul 26, 2022

This issues keeps track of the work that needs to be done for a baseline implementation of the blob view with CodeMirror.

The feature flag is enableCodeMirrorFileView.

Known issues to be fixed/discussed:

  • Selected line is not synced with cursor position and therefore not sent to extensions
  • File content is visible under line numbers (looks like line number background is transparent?)
  • Dismissing the hovercard info box causes the hovercard to shrink upwards, "detaching" it from the line/token it was shown for.
  • Hovercards are disabled in reference panel blob view (see https://github.com/sourcegraph/sourcegraph/pull/40131 for more information)
    • From @fkling: Issue was something different. See PR If replacing <Router /> with <MemoryRouter /> would fix the navigation issue (which I don't know), then we could introduce a special flag/config option to instruct the React wrapper to use MemoryRouter instead of Router. It's not pretty but doable. But if simply using <MemoryRouter /> would not solve the issue then I don't think there is anything we can do about that (except refactoring the ref panel and hover cards to work differently).
      So whether or not to fix/change this is up for debate.
    • https://github.com/sourcegraph/sourcegraph/pull/40249
  • Close button is not functional in un-pinned hovercards
@fkling fkling added team/graph Graph Team (previously Code Intel/Language Tools/Language Platform) team/code-navigation codemirror PRs and issues related to migrating to CodeMirror labels Jul 26, 2022
@macraig
Copy link
Contributor

macraig commented Aug 8, 2022

Small bug: Popover close button doesn't seem to work

CleanShot.2022-08-08.at.12.59.39.mp4

@fkling
Copy link
Contributor Author

fkling commented Aug 9, 2022

@macraig

Small bug: Popover close button doesn't seem to work

I can make that work somehow, but do we even need the x if the hovercard isn't pinned? Just moving the cursor anywhere else (outside the hovercard) will hide it.

@macraig
Copy link
Contributor

macraig commented Aug 9, 2022

@fkling not really, we should remove if when it isn't pinned then?

@fkling
Copy link
Contributor Author

fkling commented Aug 9, 2022

@macraig That would make more sense to me.

@olafurpg
Copy link
Member

olafurpg commented Sep 7, 2022

Closing this as "successfully validated". We are not going to ship this with 4.0 since there are still a few remaining issues that we'd like to fix before enabling the new blob view by default. The remaining issues are tracked in the Code Navigation tab of our project board https://github.com/orgs/sourcegraph/projects/211/views/21

@olafurpg olafurpg closed this as completed Sep 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
codemirror PRs and issues related to migrating to CodeMirror team/code-navigation team/graph Graph Team (previously Code Intel/Language Tools/Language Platform)
Projects
None yet
Development

No branches or pull requests

3 participants