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

Conversation

@lguychard
Copy link
Contributor

Rel RFC 76

Introduces HoverifyOptions.scrollBoundaries, an array of HTMLElement, which would typically contain elements with a lower z-index than the hover overlay but a higher z-index than the code view, such as a sticky file header.

At runtime, in reaction to scroll events, hide the hover overlay when it overlaps with a hover boundary.

IntersectionObserver could not be used here, as it requires an ancestor relationship between the root and target elements.

Before:

After:

Rel  [RFC 76](https://docs.google.com/document/d/1albi6HaAU9JAqdQXjsE-50NidxG4icE-36XqxxKgfM4/edit)

Introduces `HoverifyOptions.scrollBoundaries`, an array of `HTMLElement`, which would typically contain elements with a lower z-index than the hover overlay but a higher z-index than the code view, such as a sticky file header.

At runtime, in reaction to scroll events, hide the hover overlay when it overlaps with a hover boundary.

`IntersectionObserver` could not be used here, as it requires an ancestor relationship between the root and target elements.
@codecov
Copy link

codecov bot commented Dec 3, 2019

Codecov Report

Merging #196 into master will increase coverage by 0.91%.
The diff coverage is 94.59%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #196      +/-   ##
==========================================
+ Coverage   84.06%   84.98%   +0.91%     
==========================================
  Files          13       13              
  Lines         546      566      +20     
  Branches      135      141       +6     
==========================================
+ Hits          459      481      +22     
+ Misses         87       85       -2
Impacted Files Coverage Δ
src/helpers.ts 75% <100%> (+16.66%) ⬆️
src/hoverifier.ts 85.22% <93.1%> (+1.97%) ⬆️

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 b02e96d...05adfe2. Read the comment docs.

Co-Authored-By: Felix Becker <felix.b@outlook.com>
@felixfbecker
Copy link
Contributor

Could this be unit tested in Karma?

@lguychard lguychard merged commit f44f3ab into master Dec 16, 2019
@sourcegraph-bot
Copy link

🎉 This PR is included in version 6.3.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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants