-
-
Notifications
You must be signed in to change notification settings - Fork 391
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
Fix widget styling bugs #3065
Open
lenacohen
wants to merge
6
commits into
master
Choose a base branch
from
widget-iframe-inside-shadow-dom
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Fix widget styling bugs #3065
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
lenacohen
commented
Feb 27, 2025
•
edited
Loading
edited
- Fixes Widget replacement overlapping with content on some sites #3024
- Move widget placeholder inside shadow DOM to avoid interferences
- Fixes placeholder being hidden on https://developer.chrome.com/blog/extension-news-january-2025
- Fixes widget overlapping with navbar on page scroll on https://www.msn.com/en-us/sports/nfl/super-bowl-mvp-jalen-hurts-had-lesbian-nation-behind-him-for-the-biggest-night-of-his-life/ar-AA1yLY0D
- Fixes missing placeholder border on https://ew.com/adrien-brody-and-halle-berry-controversial-oscars-kiss-11686590
- Address widget replacement overlapping with content by ensuring that the parent node height is at least as large as the min height of the widget
- Fixes overlap on https://www.wausaudailyherald.com/story/news/politics/elections/2024/09/27/heres-what-we-know-so-far-about-wausau-mayor-doug-dinys-removal-of-the-clerks-drop-box/75402110007/
- Remove code that the shadow DOM makes unnecessary
- Computed styling is still necessary on some pages: https://www.wausaudailyherald.com/story/news/politics/elections/2024/09/27/heres-what-we-know-so-far-about-wausau-mayor-doug-dinys-removal-of-the-clerks-drop-box/75402110007/
lenacohen
commented
Feb 27, 2025
Comment on lines
406
to
409
let widgetFrame = document.createElement('iframe'); | ||
let shadowHost = document.createElement("div"); | ||
let shadowRoot = shadowHost.attachShadow({ mode: "closed" }); | ||
shadowRoot.appendChild(widgetFrame); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could replace the iframe with the shadowHost, but didn't see a benefit to doing that in the spirit of minimizing change. Let me know if you think I should.
…dow root must be open for Selenium access
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
widgets
Click-to-activate placeholders for blocked but potentially useful social buttons/widgets
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.