Commit Graph

4235 Commits

Author SHA1 Message Date
Nathan Sobo
444c18be34 Stop polling when an update is pending 2014-07-27 11:46:22 -06:00
Nathan Sobo
dca096b8e3 Use requestAnimationFrame to batch updates in Chrome 35
In Chrome 31, setImmediate was yielding better behavior. But now Chrome
35 seems to behave more smoothly when we use requestAnimationFrame, and
the delay for keystrokes is non-existent.
2014-07-27 11:46:22 -06:00
Kevin Sawicki
d47348e8f9 Cache incompatible modules in local storage 2014-07-25 15:34:03 -07:00
Kevin Sawicki
56df7bdbe3 Add version to package 2014-07-25 15:23:36 -07:00
Kevin Sawicki
1ea909d4db Check installed packages for working native modules
Test require each native module in each installed package to make sure
it can be required successfully in Atom.
2014-07-25 15:19:16 -07:00
Nathan Sobo
7515fd94ba Merge branch 'master' into chrome35
Conflicts:
	package.json
2014-07-24 17:40:37 -07:00
Nathan Sobo
7738eeeacc Give the line-numbers div an opaque background for better GPU perf
We sample both the background color of the editor and the gutter. If the
gutter has an actual background color, we use it. Otherwise we fall back
to the same background as the editor.
2014-07-24 17:23:04 -07:00
Nathan Sobo
c6116468e4 Apply background color of root editor node to lines as an inline style
This ensures lines have an opaque background that matches whatever the
editor is styled as, but avoids the need to apply the .editor-colors
class to the .lines div. That approach fell down when people were
setting the background color via means other than .editor-colors, such
as styling mini editors via the .editor.mini selector in the settings
view.
2014-07-24 16:54:01 -07:00
Nathan Sobo
2a2d0b60f7 💄 2014-07-24 16:41:25 -07:00
Cheng Zhao
dcbf730129 Merge branch 'master' into chrome35
Conflicts:
	apm/package.json
	package.json
2014-07-24 17:17:35 +08:00
Ben Ogle
00275d95ec Merge pull request #3044 from atom/bo-h-scrollbar
Horizontal scrollbar no longer covers the gutter
2014-07-23 16:35:02 -07:00
Ben Ogle
242df788e6 Remove unnecessary scrollbar specs 2014-07-23 16:25:24 -07:00
Ben Ogle
3295b9b0dd Romove runSetImmediateCallbacks() in many cases
This is because of the removal of the gutter measurement. When there 
was measurement, every load of the editor would measure and request at 
least one render based on the reset of the gutter width. These 
specs don’t need to call runSetImmediateCallbacks() as they either 
don’t do anything to cause a render or they render immediately
(in the case of updated options).

In some cases, we need to make sure nothing happened, so I added a
hasSetImmediateCallbacks() function, which is used in specs where 
nothing should have happened.
2014-07-23 16:25:10 -07:00
Kevin Sawicki
adaee84933 Remove unused fixtures 2014-07-23 10:11:02 -07:00
Kevin Sawicki
84ff28ee69 Remove unused package fixtures 2014-07-23 10:11:01 -07:00
Kevin Sawicki
cfb1501720 Remove unused replication fixture 2014-07-23 10:11:01 -07:00
Ben Ogle
ffb041a160 Only render an nbsp on empty lines when no eol character defined
Fixes #3053
2014-07-23 09:30:52 -07:00
Ben Ogle
361f8ec770 Add specs for toggling the gutter when the editor is hidden 2014-07-22 18:26:58 -07:00
Ben Ogle
48a5123202 💄 Move logic into measureGutterIfNeeded 2014-07-22 18:26:58 -07:00
Ben Ogle
0f1d155685 Move gutterWidth into state; add specs for scrollbar position 2014-07-22 18:26:58 -07:00
Kevin Sawicki
5f7f5b5367 Merge branch 'master' into chrome35 2014-07-22 17:56:24 -07:00
Kevin Sawicki
bc4173f856 Remove logging of screen lines in spec 2014-07-22 14:51:13 -07:00
probablycorey
a3f046b948 Fix getVersion spec 2014-07-22 14:10:29 -07:00
Ben Ogle
17364cd528 Take the scrollbar width into account in specs 2014-07-22 11:54:26 -07:00
Nathan Sobo
5871bee791 Make spec assertions insensitive to scrollbars on Windows 2014-07-22 10:16:43 -07:00
Nathan Sobo
43c9e21f1d Make setEditorHeightInLines/WidthInChars spec helpers work with React
Fixes #3019
2014-07-21 15:04:44 -07:00
Nathan Sobo
ca1220a682 Delay initial measurement until the editor becomes visible
Previously, these measurements were always performed when the editor
component was mounted. This didn't work in situations where the
component was mounted in a non-visible state. This commit includes a
visibility check in the resize polling we were already doing, kicking
off the measurement process as soon as the editor is visible.
2014-07-21 13:40:10 -07:00
Nathan Sobo
0346e5809a Only prevent default on mousewheel events if editor actually scrolls
This prevents mini editors from capturing scroll events.
2014-07-21 10:43:31 -07:00
Nathan Sobo
99704517bb Remove animation frame batching of mousewheel events
This doesn't seem to adversely affect the scroll experience, and it's
much simpler. I want to avoid preventing the default action of
mousewheel events if they don't actually lead to scrolling, and making
the behavior synchronous will make that a lot easier.
2014-07-21 10:43:31 -07:00
Nathan Sobo
783ef730e2 Rename EditorComponent::measureScrollView to ::measureHeightAndWidth
Since we also check if we're auto-height in this method, this name seems
like a better description of the objectives of this method.
2014-07-21 10:43:31 -07:00
Nathan Sobo
e81db5d706 Pull out EditorComponent::pollDOM method
This makes the actions that we perform in the poll loop explicit, and
will prevent the accumulation of polling-related behavior in the
::measureScrollView method.
2014-07-21 10:43:31 -07:00
Nathan Sobo
d0893ccdaf Add placeholderText to React editors 2014-07-21 10:43:31 -07:00
Nathan Sobo
a9c7842a50 Don't render line decorations on mini editors 2014-07-21 10:43:31 -07:00
Nathan Sobo
544c759fd1 Don't set an explicit line height on mini editors
This allows the line height to be styled via CSS. I would actually
like to allow all these properties to be assigned via CSS rather than
explicitly via the settings view, but that can be deferred until the
old editor is removed.
2014-07-21 10:43:31 -07:00
Nathan Sobo
759dbc061d Don't render invisible characters in React mini editors 2014-07-21 10:43:31 -07:00
Nathan Sobo
56c9f75e8c Add the 'mini' class to the React wrapper view for mini editors 2014-07-21 10:43:30 -07:00
Nathan Sobo
635f288050 Explicitly assign height of editor-contents when height is auto 2014-07-21 10:43:30 -07:00
Nathan Sobo
cc8b7b13b3 Don't show the gutter when 'mini' is true on React editors 2014-07-21 10:43:30 -07:00
Nathan Sobo
e999ef00e7 Base editor dimensions on the wrapper view
The goal is to make the editor behave like a standard block-level
element.

The horizontal behavior is simple: we stretch horizontally to fill our
container.

The vertical behavior is more nuanced. If an explicit height is assigned
on the wrapper view, we honor that height. But if no explicit height is
assigned, the editor stretches vertically so that its contents are
visible.

This prepares us to support mini editors, which need to be 1-line tall
without an explicit height assignment.
2014-07-21 10:43:30 -07:00
Nathan Sobo
f16ea63a95 Export ReactEditorView as EditorView from 'atom' module
Also, remove a few early requires of 'exports/atom.coffee' in the spec
suite that were causing failures.
2014-07-21 10:43:30 -07:00
Nathan Sobo
cdb5fe15d2 Render nbsp on empty lines to ensure they have a non-zero height
Fixes #2958
2014-07-16 00:56:14 -07:00
Ivan Žužak
608c2b5354 Merge pull request #2977 from atom/iz-multiple-separators
Support multiple separators in context menu
2014-07-15 15:22:37 -07:00
Ben Ogle
cce49da18c Fix spec 2014-07-15 08:44:58 -07:00
Ben Ogle
29e883cf36 Add specs 2014-07-15 08:44:21 -07:00
Ivan Zuzak
cd1a17fb0a Support multiple separators in context menu 2014-07-14 17:10:13 -07:00
Lee Dohm
b100310764 Add failing test for #2274
Tested first on a branch off of `master` to ensure that it would
actually fail 😀
2014-07-13 13:27:32 -07:00
Ben Ogle
e620121953 Add spec for loading theme with incomplete variable file 2014-07-11 14:04:54 -07:00
Ben Ogle
9976166902 Render the line numbers after gutter mount
Fixes #2916
2014-07-10 17:25:58 -07:00
Nathan Sobo
7155ec4b73 Fix autoscroll specs for addSelectionForBufferRange 2014-07-09 08:06:14 -06:00
Nathan Sobo
e170b9f56b Render line-ending invisibles on empty lines
Fixes #2857

Including correct interleaving with indent guides.
2014-07-08 16:53:06 -06:00