Nathan Sobo
d678f367db
Clear cursor blink interval when editor component unmounts
2014-04-22 17:09:44 -06:00
Nathan Sobo
febfb120c8
Fix typo
2014-04-22 17:09:44 -06:00
Nathan Sobo
addbe80e8a
Update the gutter if the scrollTop has changed
2014-04-22 17:09:44 -06:00
Nathan Sobo
b96abfffb7
Add more displayNames
2014-04-22 17:09:44 -06:00
Nathan Sobo
a6f2e926fe
Upgrade to underscore-plus@1.2.1 for optimized isEqualForProperties
2014-04-22 17:09:44 -06:00
Nathan Sobo
550a4ce906
Use isEqualForProperties in LinesComponent to decide when to re-measure
2014-04-22 17:09:43 -06:00
Nathan Sobo
1a56b487a1
Stop propagation of input events to prevent react from doing extra work
...
React seems to be handling these events when they bubble to the root of
the document. We want to avoid wasting time on this.
2014-04-22 17:09:43 -06:00
Nathan Sobo
4fa9c64c2b
Drop batchedUpdates on input since we're batching in the model anyway
2014-04-22 17:09:43 -06:00
Nathan Sobo
56e5fb7a63
Set process.env.NODE_ENV to 'production' to speed up React
2014-04-22 17:09:43 -06:00
Nathan Sobo
efa72bcb1c
Implement shouldComponentUpdate for GutterComponent
...
Only update the gutter when the visible row range has changed or if
a screen lines change has occurred within the visible row range.
2014-04-22 17:09:43 -06:00
Nathan Sobo
033db8997b
Batch updates when moving cursors
...
This ensures that updates associated with autoscroll and cursor movement
get combined.
2014-04-22 17:09:43 -06:00
Nathan Sobo
64a487eebb
Implement shouldComponentUpdate for ScrollbarComponent
...
It checks that the incoming scrollTop/Left and scrollHeight/Width differ
from their current values. The scrollTop/Left value are updated in
the component properties to always reflect the state of the DOM when
scrolling or when assigning a new value.
2014-04-22 17:09:43 -06:00
Nathan Sobo
ddc677fb30
Batch multiple view updates with Editor::batchUpdates
2014-04-22 17:09:43 -06:00
Nathan Sobo
fe6a007774
Call requestUpdate instead of forceUpdate so we can track all updates
2014-04-22 17:09:43 -06:00
Nathan Sobo
48d90e3dfc
Funnel cursor and selection updates through EditorComponent
2014-04-22 17:09:43 -06:00
Nathan Sobo
f457b41a81
Assign a key to cursor and selection components
2014-04-22 17:09:43 -06:00
Nathan Sobo
93388c2048
Make Cursor and Selection models for automatic id assignment
2014-04-22 17:09:43 -06:00
Nathan Sobo
66f3f2d883
Add displayName to components
2014-04-22 17:09:42 -06:00
Nathan Sobo
3657dc0bf4
💄
2014-04-22 17:09:42 -06:00
Nathan Sobo
274288161d
Make line number components immutable
2014-04-22 17:09:42 -06:00
Nathan Sobo
0d03e388f1
💄 spec description
2014-04-22 17:09:42 -06:00
Nathan Sobo
507106d35b
💄 method order
2014-04-22 17:09:42 -06:00
Nathan Sobo
eeba559ec7
Add a SelectionsComponent containing all selections
2014-04-22 17:09:42 -06:00
Nathan Sobo
14bfa90004
Extract a CursorsComponent containing all cursors
2014-04-22 17:09:42 -06:00
Nathan Sobo
0ec6cbe141
💄 method order
2014-04-22 17:09:42 -06:00
Nathan Sobo
e952ab2e02
Extract a LinesComponent
2014-04-22 17:09:42 -06:00
Nathan Sobo
5c2eb053d8
Extract an EditorScrollView component
2014-04-22 17:09:42 -06:00
Nathan Sobo
aee552476a
Call onScroll with the current scrollTop/Left in ScrollbarComponent
2014-04-22 17:09:42 -06:00
Nathan Sobo
355abef2cf
Manage update of scrollbar scroll positions in ScrollbarComponent
2014-04-22 17:09:42 -06:00
Nathan Sobo
cec62c56a6
Extract a ScrollbarComponent
2014-04-22 17:09:41 -06:00
Nathan Sobo
35ea4e6de4
Extract gutter to its own component
2014-04-22 17:09:41 -06:00
Nathan Sobo
8c266957f1
Isolate CSS changes to a single selector
2014-04-22 17:09:41 -06:00
Nathan Sobo
f1f93f2f70
Spy on setInterval explicitly when needed in EditorComponent spec
2014-04-22 17:09:41 -06:00
Nathan Sobo
de773e4f75
Revert "Remove setInterval spy. It's now spied in the spec helper w/ setTimeout"
...
This reverts commit 930f1d7f018bb9949b0ee0e4ca7330a8a4ce0ec7.
I actually don't want to globally spy on setInterval because it interferes with
expected behaviors and eventually I'd like both of these to be opt-in.
2014-04-22 17:09:41 -06:00
Nathan Sobo
205e10fd09
Fix undefined variable references rendering lines
2014-04-22 17:09:41 -06:00
Nathan Sobo
ca4dd5a29a
Explicitly disable use of react editor in specs
2014-04-22 17:09:41 -06:00
Nathan Sobo
2517765821
Rename 'core.useNewEditor' to 'core.useReactEditor' and default to false
2014-04-22 17:09:41 -06:00
Nathan Sobo
4b9871fa13
Enable advanced scroll management only when editor is used by react view
...
This preserves the original behavior of the editor model with respect
to scroll position and autoscroll unless it's being used by the react
component, which flips the ::manageScrollPosition flag to true.
2014-04-22 17:09:41 -06:00
Nathan Sobo
28dd7d4acd
Treat all whitespace lines as not having leading whitespace
...
Instead it's treated as all trailing whitespace, as it was originally.
2014-04-22 17:09:41 -06:00
Nathan Sobo
e3eb51c135
Don't expect trailing whitespace invisibles on soft-wrapped lines
...
Now that trailing whitespace status of tokens is assigned at
construction time, we no longer render invisibles at the end of
soft-wrapped lines. Pretty sure this is not a behavior we wanted anyway.
2014-04-22 17:09:41 -06:00
Nathan Sobo
9ec38ddb0d
Remove setInterval spy. It's now spied in the spec helper w/ setTimeout
2014-04-22 17:09:41 -06:00
Nathan Sobo
7a4dc0b9a4
Eliminate duplicate key to pass coffeelint
2014-04-22 17:09:40 -06:00
Nathan Sobo
6b4ce5f205
Add shims to get git-diff-view working
2014-04-22 17:09:40 -06:00
Nathan Sobo
9a3f8022ad
Add shims to get bracket matcher working
2014-04-22 17:09:40 -06:00
Nathan Sobo
a2a625a7bb
Add ReactEditorView::getPane for backward-compatibility
2014-04-22 17:09:40 -06:00
Nathan Sobo
495b1571ca
Add 'editor' class to ReactEditorView wrapper for backward compatibility
2014-04-22 17:09:40 -06:00
Nathan Sobo
c862ccbc56
Add command listeners to SpacePen wrapper for backward compatibility
...
This is the only way to integrate with the command palette currently.
2014-04-22 17:09:40 -06:00
Nathan Sobo
59709a92ba
Include SpacePen wrapper view in spec
...
During the transition to React, it will be easier if the EditorComponent
assumes it's rendered inside the ReactEditorView. This will make it
easier to test compatibility with existing editor APIs.
2014-04-22 17:09:40 -06:00
Nathan Sobo
022f5ca219
Replace previous character when inserting accented characters
2014-04-22 17:09:40 -06:00
Nathan Sobo
96ebb9bf03
Correctly position cursor on mousedown when editor is scrolled left
2014-04-22 17:09:40 -06:00