Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(detection): Ignore invisible nodes when extracting text under mouse #561

Merged

Conversation

melink14
Copy link
Owner

@melink14 melink14 commented Jun 26, 2021

Specifically, ignore display: none and visibility: hidden.

This change is also the first unit tested change so contains the initial
configuration of testing. (See #159 for details on decisions).

Testing Stack: @web/test-runner + Mocha/Chai/Sinon + Puppeteer Headless Chrome.
Works with vscode debugging for fast test driven development.

Fixes #366
Fixes #159

@melink14 melink14 force-pushed the melink14/issue366/Multi-layered-HTML-prevents-word-detection branch 4 times, most recently from 5459476 to 12db918 Compare July 2, 2021 16:31
@melink14 melink14 requested a review from Stephie July 2, 2021 16:34
@melink14 melink14 marked this pull request as ready for review July 2, 2021 16:36
@melink14 melink14 marked this pull request as draft July 6, 2021 23:51
@melink14
Copy link
Owner Author

melink14 commented Jul 6, 2021

Will completely change this to be based on snowpack soon!

@melink14 melink14 force-pushed the melink14/issue366/Multi-layered-HTML-prevents-word-detection branch from 12db918 to 98ae30c Compare July 7, 2021 00:18
@melink14 melink14 changed the base branch from main to melink14/snowpack July 7, 2021 00:19
extension/rikaicontent.ts Outdated Show resolved Hide resolved
@melink14 melink14 marked this pull request as ready for review July 7, 2021 00:23
@melink14 melink14 force-pushed the melink14/issue366/Multi-layered-HTML-prevents-word-detection branch from 98ae30c to 62961c9 Compare July 7, 2021 00:50
@melink14 melink14 force-pushed the melink14/issue366/Multi-layered-HTML-prevents-word-detection branch from 62961c9 to 66fdff6 Compare July 7, 2021 00:58
@melink14 melink14 force-pushed the melink14/issue366/Multi-layered-HTML-prevents-word-detection branch 2 times, most recently from 47afb7f to 7c7851b Compare July 7, 2021 04:59
@codecov-commenter
Copy link

codecov-commenter commented Jul 11, 2021

Codecov Report

❗ No coverage uploaded for pull request base (main@1bdd3d3). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #561   +/-   ##
=======================================
  Coverage        ?   37.50%           
=======================================
  Files           ?        3           
  Lines           ?     1384           
  Branches        ?       18           
=======================================
  Hits            ?      519           
  Misses          ?      865           
  Partials        ?        0           

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 1bdd3d3...73d825a. Read the comment docs.

@melink14 melink14 force-pushed the melink14/issue366/Multi-layered-HTML-prevents-word-detection branch from 7c7851b to 8d2c396 Compare July 11, 2021 09:30
@melink14 melink14 force-pushed the melink14/issue366/Multi-layered-HTML-prevents-word-detection branch from 8d2c396 to 6bd752e Compare July 16, 2021 13:02
Base automatically changed from melink14/snowpack to main July 16, 2021 13:04
@melink14 melink14 force-pushed the melink14/issue366/Multi-layered-HTML-prevents-word-detection branch from 6bd752e to 1260f33 Compare July 16, 2021 13:07
Specifically, ignore `display: none` and `visibility: hidden`.

This change is also the first unit tested change so contains the initial
configuration of testing. (See #159 for details on decisions).

Testing Stack: @web/test-runner + Mocha/Chai/Sinon + Puppeteer Headless Chrome.
Works with vscode debugging for fast test driven development.

With --coverage flag, we get a coverage report that we can upload to
codecov.

Fixes #366
Fixes #159
@melink14 melink14 force-pushed the melink14/issue366/Multi-layered-HTML-prevents-word-detection branch from 1260f33 to 73d825a Compare July 16, 2021 13:20
@melink14 melink14 merged commit cb97f36 into main Jul 16, 2021
@melink14 melink14 deleted the melink14/issue366/Multi-layered-HTML-prevents-word-detection branch July 16, 2021 13:32
melink14 pushed a commit that referenced this pull request Jul 17, 2021
## [2.0.0](v1.2.6...v2.0.0) (2021-07-17)

### ⚠ BREAKING CHANGES

* This version includes optional chaining requiring Chrome >=80

### Features

* Force Google Docs to use HTML mode instead of canvas mode ([#596](#596)) ([94b60a6](94b60a6)), closes [#593](#593)
* **detection:** Ignore invisible nodes when extracting text under mouse ([#561](#561)) ([cb97f36](cb97f36)), closes [#159](#159) [#366](#366) [#159](#159)

### Bug Fixes

* **dict:** Update dictionaries to latest versions. ([#581](#581)) ([77189c3](77189c3))
* Skip text processing when range is null ([#598](#598)) ([ae55bff](ae55bff)), closes [#386](#386)

### Code Refactoring

* Migrate from webpack to snowpack for build step ([#583](#583)) ([1bdd3d3](1bdd3d3))
@melink14
Copy link
Owner Author

🎉 This PR is included in version 2.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

Invisible HTML prevents word detection Decide and implement unit testing framework
2 participants