Cheng Zhao
6a58f6054a
Pass $PATH by command line
2014-11-05 12:11:42 +08:00
Ben Ogle
ddd4a9a968
Merge pull request #4063 from atom/bo-unify-panel-styling
...
Unify panel styling
2014-11-04 17:12:49 -08:00
Ben Ogle
743c50014f
Do not import overlay
2014-11-04 16:59:02 -08:00
Ben Ogle
af761fb004
All panel styling into panels.less
2014-11-04 15:39:25 -08:00
Nathan Sobo
badf1725fa
Handle focus on hidden input when shadow DOM is disabled
...
Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com >
2014-11-04 16:37:29 -07:00
Nathan Sobo
2b2149bca1
Add config schema for editor.useShadowDOM
...
Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com >
2014-11-04 16:37:28 -07:00
Nathan Sobo
e1d6d55311
Enable editor.useShadowDOM in all specs
2014-11-04 16:37:28 -07:00
Nathan Sobo
670a710753
Test editor focus/blur handling with shadow DOM enabled/disabled
...
Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com >
2014-11-04 16:37:28 -07:00
Nathan Sobo
dd1e5338c6
Focus the root TextEditorElement in spec instead of component node
...
Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com >
2014-11-04 16:37:28 -07:00
Nathan Sobo
100af7d27d
Fix corner cases related to lifecycle state of EditorComponent on events
...
Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com >
2014-11-04 16:37:28 -07:00
Nathan Sobo
9b70cf2044
Make blur event on text editor element work with shadow DOM disabled
...
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 >
2014-11-04 16:37:28 -07:00
Nathan Sobo
7fe9c14772
💄
2014-11-04 16:37:28 -07:00
Nathan Sobo
9690e44ffe
Correctly handle focus when shadow DOM is disabled
...
Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com >
2014-11-04 16:37:27 -07:00
Nathan Sobo
0e57ede712
Only create a shadow root if editor.useShadowDOM config setting is true
...
Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com >
2014-11-04 16:37:27 -07:00
Nathan Sobo
dd7335c30b
Simplify focus/blur handling
...
Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com >
2014-11-04 16:37:27 -07:00
Ben Ogle
4537e9bd1a
Fix specs
2014-11-04 16:37:27 -07:00
Nathan Sobo
0488fc21da
⬆️ autocomplete for shadow DOM fix with auto-selecting 1 option
2014-11-04 16:37:27 -07:00
Nathan Sobo
160bb29034
Null-guard component in blur handler
2014-11-04 16:37:27 -07:00
Nathan Sobo
497b4a4e24
Toggle quotes back
2014-11-04 16:37:27 -07:00
Nathan Sobo
dd4e7d6921
Wait for promise resolution on all calls to activatePackage
...
This avoids a race condition where stylesheets would be added after all
packages were deactivated and leak into the next spec.
2014-11-04 16:37:26 -07:00
Nathan Sobo
d060ecdc24
Assign package stylesheet context based on double-extension in file name
...
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`.
2014-11-04 16:37:26 -07:00
Nathan Sobo
84d1101903
Upgrade package-generator to fix specs with shadow DOM
2014-11-04 16:37:26 -07:00
Nathan Sobo
6f3c53a17a
Only cancel focus events if the editor is or contains the related target
2014-11-04 16:37:26 -07:00
Nathan Sobo
dd17e8f018
Replace focusout event handlers on hiddenInput shim with blur handlers
...
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
2014-11-04 16:37:26 -07:00
Nathan Sobo
cf3f1aa2eb
Don’t handle text editor focus when it already has focus
2014-11-04 16:37:26 -07:00
Nathan Sobo
adaf1829da
Determine focus using document.activeElement instead of component state
2014-11-04 16:37:26 -07:00
Nathan Sobo
7863db480e
Override jQuery.contains instead of jQuery.fn.position
...
Turns out the problems with position inside the shadow DOM are due to
the fact that elements in the light DOM don’t claim to contain elements
from a shadow DOM, causing jQuery.fn.offset to bail out early and
misreport positions inside the editor.
2014-11-04 16:37:26 -07:00
Nathan Sobo
5cc243ec11
Inject both underlayer and overlayer via shadow DOM insertion points
2014-11-04 16:37:25 -07:00
Nathan Sobo
2e46cf9b8d
Refefine $.fn.position in terms of offsetTop/Left to work w/ shadow DOM
...
The default implementation of position seems to barf when things are in
the shadow DOM. This seems to be a suitable replacement that doesn’t.
2014-11-04 16:37:25 -07:00
Nathan Sobo
5e8655fa60
Don’t use :focus selector to store previously focused element
2014-11-04 16:37:25 -07:00
Nathan Sobo
c64a4b7ca9
Fallback to light DOM in TextEditorView::find if nothing found in shadow
2014-11-04 16:37:25 -07:00
Nathan Sobo
bda1429293
Trigger ‘blur’ on select list editor instead of ‘focusut’ on its input
2014-11-04 16:37:25 -07:00
Nathan Sobo
eb19989ecd
Handle focus at the host element level
...
Detecting focus and blur at the level of the input is creating problems
when we blur and then immediately refocus. This is simpler.
2014-11-04 16:37:25 -07:00
Nathan Sobo
62c0db11ee
Define enter as ‘core:confirm’ in select-list mini editors
...
We were leaving this to packages to define, and they were getting it
wrong by selecting into the ‘input’ which is now in shadow.
2014-11-04 16:37:25 -07:00
Nathan Sobo
8aeabe5fe5
Listen for ‘blur’ on mini editor of select list rather than ‘focusout’
...
The focusout handler on the mini editor’s hidden input wasn’t being
triggered, but we can listen for blur directly on the editor now that
the shadow DOM abstracts the focus.
2014-11-04 16:37:25 -07:00
Nathan Sobo
ab846a2495
Put views appended via appendToLinesView in the light DOM
...
This adds an insertion point to the lines div via a <content> tag,
allowing immediate children of the editor tag to be positioned relative
to the lines div but still be styled via global CSS.
2014-11-04 16:37:24 -07:00
Nathan Sobo
7202908780
Split editor stylesheet into light and shadow DOM versions
...
This prevents the need for a :host pseudo-class in the editor CSS which
breaks linting. It also fits selectors targeting the host element in a
more intuitive spot in the cascade.
2014-11-04 16:37:24 -07:00
Nathan Sobo
c4cfac5615
Use event capture for pane focus/blur events
...
Focusin/focusout don’t seem to bubble properly across shadow DOM
boundaries, so capturing is a more reliable alternative.
2014-11-04 16:37:24 -07:00
Nathan Sobo
866f2d9a76
Fix appendToLinesView
2014-11-04 16:37:24 -07:00
Nathan Sobo
3b455c00d3
Proxy TextEditorView::find calls to the root inside the shadow DOM
2014-11-04 16:37:24 -07:00
Nathan Sobo
1f777addd9
Sample font styling when font config values change
...
We previously could do it whenever stylesheets changed, but these values
end up getting assigned to the global stylesheet for cascading reasons
and we’re only watching the local stylesheet. We poll the host elements
DOM properties, but forcing a sync poll when the config values change
makes behavior synchronous for specs and more responsive when changing
these values.
2014-11-04 16:37:24 -07:00
Nathan Sobo
58744f6b7b
Account for shadow DOM when asserting on focus
2014-11-04 16:37:24 -07:00
Nathan Sobo
7badd9ba25
Don’t rely on :focus selector for toHaveFocus matcher
...
:focus doesn’t work properly when focus is inside the shadow DOM of
an element, but document.activeElement does.
2014-11-04 16:37:23 -07:00
Nathan Sobo
e8d7058383
Go back to the plain “theme” group for theme stylesheets
2014-11-04 16:37:23 -07:00
Nathan Sobo
42fc54f716
Protect against stylesheets changing while detached
2014-11-04 16:37:23 -07:00
Nathan Sobo
c11675dca1
Don’t recycle the same composite disposable for stylesheet activation
2014-11-04 16:37:23 -07:00
Nathan Sobo
cdb62812d2
Don’t use syntax themes in spec because they are inserted in shadow DOM
2014-11-04 16:37:23 -07:00
Nathan Sobo
2d3d64f399
Call reloadStylesheets instead of reloadStylesheet in spec
2014-11-04 16:37:23 -07:00
Nathan Sobo
2321aa2bee
Get SpacePen outlet shims from inside shadow DOM
2014-11-04 16:37:23 -07:00
Nathan Sobo
fa733c85ad
Fix setEditorHeightInLines shim now that we’ve dropped .react class
2014-11-04 16:37:23 -07:00