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(ui): Isolate rikaikun popup from host page via shadow DOM and all: revert #933

Merged
merged 6 commits into from
Apr 2, 2022

Conversation

melink14
Copy link
Owner

@melink14 melink14 commented Apr 2, 2022

  • Creates a div inside of shadow root to contain all styles and modifications.
  • Updates CSS to use all: revert instead of previous adhoc reset.
  • Installs CSS directly into the shadow DOM as per best practices.
  • Fallsback to all: initial for older Chrome browsers.
  • Removes special check for text files since chrome renders them as normal HTML pages.

Fixes #221

melink14 and others added 5 commits April 2, 2022 10:15
人 does not have any verb forms meaning the display of the extra furigana isn't tested.
…ll: revert`

- Creates a div inside of shadow root to contain all styles and modifications.
- Updates CSS to use `all: revert` instead of previous adhoc reset.
- Installs CSS directly into the shadow DOM as per best practices.
- Fallsback to `all: initial` for older Chrome browsers.
- Removes special check for text files since chrome renders them as normal HTML pages.

Fixes #221
@codecov
Copy link

codecov bot commented Apr 2, 2022

Codecov Report

Merging #933 (3a67c5c) into main (7c833c9) will increase coverage by 0.60%.
The diff coverage is 93.54%.

@@            Coverage Diff             @@
##             main     #933      +/-   ##
==========================================
+ Coverage   75.83%   76.44%   +0.60%     
==========================================
  Files           7        7              
  Lines        3000     2984      -16     
  Branches      162      161       -1     
==========================================
+ Hits         2275     2281       +6     
+ Misses        724      702      -22     
  Partials        1        1              
Impacted Files Coverage Δ
extension/rikaicontent.ts 75.14% <93.54%> (+1.26%) ⬆️

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 7c833c9...3a67c5c. Read the comment docs.

Base automatically changed from melink14/betterkanjitest to main April 2, 2022 01:44
@melink14
Copy link
Owner Author

melink14 commented Apr 2, 2022

Will ignore codecov this time since it's caused by variable name change only and the previous lines were also uncovered.
percy doesn't work at all with shadow dom so I guess I'll disable it for now: percy/cli/issues/280

@melink14 melink14 closed this Apr 2, 2022
@melink14 melink14 reopened this Apr 2, 2022
@melink14 melink14 merged commit e6a6e7a into main Apr 2, 2022
@melink14 melink14 deleted the melink14/shadow-dom branch April 2, 2022 02:05
melink14 pushed a commit that referenced this pull request Apr 4, 2022
## [2.3.0](v2.2.5...v2.3.0) (2022-04-04)

### Features

* **ui:** Isolate rikaikun popup from host page via shadow DOM and `all: revert` ([#933](#933)) ([e6a6e7a](e6a6e7a)), closes [#221](#221)

### Bug Fixes

* **detection:** Copy text affecting style properties of input/textarea elements when creating fake ([#886](#886)) ([23fc0df](23fc0df)), closes [#672](#672)
* **dict:** Update dictionaries to latest versions ([#954](#954)) ([deae6f5](deae6f5))
* **ui:** Only show info popups in the main frame of a tab ([#948](#948)) ([90c7b21](90c7b21))
@melink14
Copy link
Owner Author

melink14 commented Apr 4, 2022

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

Encapsulate rikaikun popup in shadowdom to prevent weird interactions with host page
1 participant