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

fix: unsubscribe from actions and hover observable #102

Merged
merged 1 commit into from
Apr 1, 2019

Conversation

felixfbecker
Copy link
Contributor

Continuation of #100

The code view was still possible to be re-shown after being hidden because the nested action and hover Observables were not unsubscribed from and could emit after the code view was unhoverified. This would happen on a page navigation, because the removed code view causes the text documents in the extension API to be updated, which causes the Observable returned by getActions to emit again.

The test reproduces the problem by making getActions emit something.

The fix is to use takeUntil() to only take from the actions and hover Observables until the code view is unsubscribed (we need to do this for the two higher-order Observables).

Fixes https://github.com/sourcegraph/sourcegraph/issues/3108

Only take from the actions and hover Observables until the code view is unsubscribed.

Fixes https://github.com/sourcegraph/sourcegraph/issues/3108
@codecov
Copy link

codecov bot commented Apr 1, 2019

Codecov Report

Merging #102 into master will decrease coverage by 0.06%.
The diff coverage is 87.5%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #102      +/-   ##
==========================================
- Coverage   83.77%   83.71%   -0.07%     
==========================================
  Files          13       13              
  Lines         524      528       +4     
  Branches      120      120              
==========================================
+ Hits          439      442       +3     
- Misses         85       86       +1
Impacted Files Coverage Δ
src/hoverifier.ts 83.14% <87.5%> (-0.19%) ⬇️

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 6b92020...9f5890b. Read the comment docs.

@felixfbecker felixfbecker merged commit 50263a6 into master Apr 1, 2019
@felixfbecker felixfbecker deleted the take-until-actions branch April 1, 2019 20:44
@sourcegraph-bot
Copy link

🎉 This PR is included in version 6.0.6 🎉

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
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Orphan hovers after navigation
3 participants