Commit Graph

8951 Commits

Author SHA1 Message Date
Ben Ogle
2a9c78ef92 Move horiz scrollbar into the scrollView
Also remove all the gutter width calculation. It was flawed anyway,
2014-07-23 16:20:48 -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
Ben Ogle
d3a6e79428 The horizontal scrollbar takes gutter width into account 2014-07-22 18:26:58 -07:00
probablycorey
911ca0d846 Remove Atom.isReleasedVersion 2014-07-22 14:10:29 -07:00
probablycorey
88d1ba2271 Remove Atom.getVersion() 2014-07-22 14:10:29 -07:00
Ben Ogle
c67f8493e0 Softwrap always takes into account the vertical scrollbar width 2014-07-22 11:52:23 -07:00
Ben Ogle
1a90588752 Visible is now a member variable. 2014-07-22 11:46:34 -07:00
Ben Ogle
2e4893c786 Be more defensive in ReactEditorView::activate
It is conceivable that a package could have a reference to a view
that is not within a pane. 

Fixes #2853
2014-07-22 10:37:37 -07:00
probablycorey
94f871e37e Make react editor the default 2014-07-21 16:33:25 -07:00
Nathan Sobo
ba21f0b0d8 Eliminate duplicate 'gutter' class
This was previously needed when we applied 'editor-colors' to the
line numbers to give them an opaque background in hopes of supporting
sub pixel AA, but that dream is dead for now anyway. This makes the
gutter harder to style, so I'm nixing it.
2014-07-21 14:56:09 -07:00
Nathan Sobo
a68b9a793f Don't update the GutterComponent if there's no renderedRowRange 2014-07-21 14:28:48 -07:00
Nathan Sobo
0c4da92d6b Handle hide and show entirely in the wrapper view
Enable sync updates and manually invoke the pollDOM function on the
component when we call hide/show on the wrapper view. This ensures that
we perform initial measurements when showing the editor for the first
time.
2014-07-21 14:09:16 -07:00
Nathan Sobo
38b286f989 Remove 'editor-colors' class from lines and gutter for mini editors
Having the editor-colors class on these elements was causing the theme
to be applied to lines in mini editors in the settings view, which
caused a black inset box to appear with dark syntax themes.

This was added to give the lines an opaque background which was supposed
to enable sub pixel anti-aliasing despite being on the GPU, but it
didn't seem to be working. Perhaps we can revisit this issue after the
Chrome 35 upgrade to see if sub pixel antialiasing works with opaque
backgrounds afterward.
2014-07-21 13:50:58 -07:00
Nathan Sobo
df7f816c88 Move 'editor-colors' to wrapper view to support padding on mini editors 2014-07-21 13:43:00 -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
4a8ac85ffb Restrict ReactEditorView::getPane implementation 2014-07-21 10:43:32 -07:00
Nathan Sobo
c4177aba3e Handle 'attributes' param to ReactEditorView 2014-07-21 10:43:31 -07:00
Nathan Sobo
3206fdce9e Add ReactEditorView::setPlaceholderText shim 2014-07-21 10:43:31 -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
a0f75f1639 Determine visibility by checking offsetWidth/Height of the editor's node
This could still use some cleanup
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
4020ed1535 Support ReactEditorView construction with params hash 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
Desmond Brand
3d53749771 Fix typo in event trigger
destoryed -> destroyed
2014-07-21 00:20:39 -07:00
Nathan Sobo
79ee887c9a Fix a bug where scopes were being duplicated for every single token
This improves scroll performance by generating many fewer span elements
to render lines.
2014-07-20 15:09:14 -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
Maximilian Schüßler
381d5b91b2 Indentation respects tab stops now, fix #2672 2014-07-15 08:44:21 -07:00
Ben Ogle
b744997201 Merge pull request #2950 from lee-dohm/ld-bug-2274
🐛 Fix regression in indent-guide in React editor
2014-07-15 08:06:02 -07:00
Kevin Sawicki
0357872558 Use repository URL in crashed message
Now that the repository is public, issues there are better than
emailing the help address.
2014-07-15 06:25:53 -07:00
Ivan Zuzak
cd1a17fb0a Support multiple separators in context menu 2014-07-14 17:10:13 -07:00
Kevin Sawicki
0faff626d1 Remove stray # 2014-07-14 07:55:28 -07:00
Kevin Sawicki
18818c9ba5 Special case quoting of certain explorer args
This is required for things like:

`explorer.exe /root,C:\a\folder` to spawn correctly.

Refs atom/tree-view#180
2014-07-14 07:55:28 -07:00
Lee Dohm
7ac3e6d9a5 🐛 Fix regression in indent-guide in React editor
Previously the indent guide was always showing on the whitespace only
lines in the React editor. This is the same behavior as in the old
editor and had the same fix, just ported to `LinesComponent`.

See: 314833bbac

Fixes #2274
2014-07-13 09:39:21 -07:00
Ben Ogle
b8c0c125a2 Merge pull request #2941 from atom/bo-fallback-vars
Import base *-variables files as fallback vars when loading packages/themes
2014-07-11 15:16:30 -07:00
Ben Ogle
36769c35fc Don’t need the absolute path, just variables
`static` is already on the path
2014-07-11 15:04:00 -07:00
Ben Ogle
9a393a6ec9 Load fallback variables in the user’s stylesheet 2014-07-11 14:08:09 -07:00
Ben Ogle
bbe02fc6b0 Load packages with the fallback variables 2014-07-11 14:07:48 -07:00
Ben Ogle
9fbc6d4f02 Add cssForFile to LessCompileCache 2014-07-11 14:06:46 -07:00
Kevin Sawicki
41c8878769 📝 Add missing : 2014-07-11 13:30:30 -07:00