This repository was archived by the owner on Mar 3, 2023. It is now read-only.
Render text editor contents inside shadow DOM#3943
Merged
nathansobo merged 68 commits intomasterfrom Nov 5, 2014
Merged
Conversation
src/theme-package.coffee
Outdated
Contributor
There was a problem hiding this comment.
Any reason in particular to change these quotes?
Contributor
Author
There was a problem hiding this comment.
No, I think it just happened across a couple commits because I was interpolating a variable into that string for a while.
c655d8a to
16c5187
Compare
16c5187 to
494b767
Compare
f3f7ac3 to
12a6095
Compare
12a6095 to
3d9eb86
Compare
11203e6 to
8dbdac7
Compare
added 19 commits
November 4, 2014 16:37
Themes aren’t applying correctly and there are issues with mini editors but this basically works. I’m leaving the .editor node in the shadow DOM for theme compatibility and because React still wants to render into a wrapper element.
…instead of via the shadow DOM. We always honor the computed font styles of the host element.
This preserves existing theming behavior
React event handlers don’t work because of the shadow DOM
The focusout event doesn’t seem to work for elements in the shadow DOM. Other people seem to share this experience: https://code.google.com/p/chromium/issues/detail?id=378163#c7
If stylesheet files are named with 2 extensions, the first extension is used as the context argument when the package’s stylesheets are loaded. This allows people to target the text editor by naming their stylesheet `index.atom-text-editor.less`.
This avoids a race condition where stylesheets would be added after all packages were deactivated and leak into the next spec.
Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
When the shadow DOM is enabled, this happens organically because the focus is abstracted across the shadow boundary. Without that abstraction boundary, we need to pretend that a blur of the hidden input is actually a blur of the entire editor. Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
8428210 to
badf172
Compare
Contributor
Author
|
This is ready to merge. |
Contributor
Author
There was a problem hiding this comment.
Well, not quite. It's still there but no more reason to call it out in a class specifically.
Contributor
Author
There was a problem hiding this comment.
Oh that's what you said.
Contributor
|
👍 Doesnt look crazy painful with the feature flag. Was wondering how you did the contextual styles with no shadow root, and the global style element looks pretty elegant. 💥 ⛵ |
Contributor
Author
|
Thanks for the review. I'm going to merge this now so hold on to your 🎩. |
nathansobo
pushed a commit
that referenced
this pull request
Nov 5, 2014
Render text editor contents inside shadow DOM
26 tasks
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Closes #1800
Tasks