Commit Graph

14986 Commits

Author SHA1 Message Date
Nathan Sobo
669586c11b 💄 2014-04-22 17:09:05 -06:00
Nathan Sobo
5b79bb7f66 Wait longer to clear preserved lines after mousewheel events 2014-04-22 17:09:05 -06:00
Nathan Sobo
fd2ed9a1bc Prevent scroll event feedback loops after scrolling via the model layer
When scrolling via the model layer, such as happens on autoscroll due to
moving the cursor, we update the scroll position of the fake vertical
scrollbar manually. When we receive the scroll event that results from
this, we want to do nothing. The best way to determine whether we're
getting a "real" scroll event from the user or feedback from setting
the scrollTop ourselves is to compare the scrollTop to what's in the
model. If the values are equal, there's no need to request an animation
frame to assign it. This improves performance.
2014-04-22 17:09:04 -06:00
Nathan Sobo
95bf08dfa0 Eliminate overlayer by preserving lines during mousewheel events
Previously, the overlayer served as a permanent target for mousewheel
events that would never be removed by scrolling. This is because the
velocity scrolling effect on a trackpad is implemented by repeating
events on the original mousewheel event target. If this target is
removed, the events stop repeating and the velocity effect is ruined.
Now we refrain from removing any lines until mousewheel events stop
flowing.
2014-04-22 17:09:04 -06:00
Nathan Sobo
3d3b72a954 Render selections 2014-04-22 17:09:04 -06:00
Nathan Sobo
724babdcb6 Only update vertical scrollbar's scrollTop if it has changed 2014-04-22 17:09:04 -06:00
Nathan Sobo
bad2cebd6e Add Editor::setSelectedScreenRange 2014-04-22 17:09:04 -06:00
Nathan Sobo
565b611c18 Do a better job imitating the old SpacePen-based editor 2014-04-22 17:09:04 -06:00
Nathan Sobo
1b8f23722b Correctly close scope spans when rendering line HTML 2014-04-22 17:09:04 -06:00
Nathan Sobo
ab02d5f25f Update the vertical scroll bar when scrollTop changes in the model 2014-04-22 17:09:04 -06:00
Nathan Sobo
e472d7b038 Add autoscrolling with react editor view
Its implemented in the model to restrict touching of the DOM.
2014-04-22 17:09:04 -06:00
Nathan Sobo
ba83b0ede0 Update height of DisplayBuffer from editor component on overflow changed 2014-04-22 17:09:04 -06:00
Nathan Sobo
96e6ddac2e Prevent out-of-bounds scrollTop assignment on DisplayBuffer 2014-04-22 17:09:04 -06:00
Nathan Sobo
08bd03b706 Opt in to editor view only when core.useNewEditor is true 2014-04-22 17:09:04 -06:00
Nathan Sobo
2f42f23ec6 Revert changes to editor-view 2014-04-22 17:09:03 -06:00
Nathan Sobo
5a8ca1ae66 Move screen-related properties to DisplayBuffer
Scroll positions, height, width, line height. We force update when one
of these observed properties changes.
2014-04-22 17:09:03 -06:00
Nathan Sobo
9898cbc52e Remove space-pencil dependency 2014-04-22 17:09:03 -06:00
Nathan Sobo
53cc5c9856 Base cursor x position on char widths stored in DisplayBuffer
Whenever new lines are added to the screen, we measure and store any
unseen scope/character combinations in the DisplayBuffer.
2014-04-22 17:09:03 -06:00
Nathan Sobo
148a9f0248 Add DisplayBuffer::pixelPositionForScreenPosition
This bakes character width tracking into display buffer directly, which
moves us toward a world where all rendering decisions can be made in the
model to strictly control DOM reads.
2014-04-22 17:09:03 -06:00
Nathan Sobo
48e2302ccb Handle almost all editor commands in EditorComponent 2014-04-22 17:09:03 -06:00
Nathan Sobo
6327094696 Transfer focus from editor component to its hidden input 2014-04-22 17:09:03 -06:00
Nathan Sobo
c4fdb54650 Update editor component when a visible selection is removed 2014-04-22 17:09:03 -06:00
Nathan Sobo
a55c329226 💄 2014-04-22 17:09:03 -06:00
Nathan Sobo
e365e51a2b Render all visible cursors 2014-04-22 17:09:03 -06:00
Nathan Sobo
c44fd62eb1 Update cursor view when selection screen position changes 2014-04-22 17:09:03 -06:00
Nathan Sobo
9c2d321327 Break out selection, cursor, and input components 2014-04-22 17:09:02 -06:00
Nathan Sobo
70e5880b1d Start on cursor rendering 2014-04-22 17:09:02 -06:00
Nathan Sobo
61d9ff4ba4 Put the hidden input in the overlayer
The overlayer is absolutely positioned to exactly fill the scroll-view.
If we can retain this strategy and never give the input a position that
exceeds the bounds of the overlayer, we can guarantee that it never
forces the scroll position of the scroll view to change when it is
focused due to the browsers default behavior.
2014-04-22 17:09:02 -06:00
Nathan Sobo
e4c1bf10f5 Handle basic input 2014-04-22 17:09:02 -06:00
Nathan Sobo
c2858fcae2 Use overflow: hidden for editor 2014-04-22 17:09:02 -06:00
Nathan Sobo
fddd411279 Use className instead of class
Might as well go with the flow
2014-04-22 17:09:02 -06:00
Nathan Sobo
2dda577d7c Improve TokenizedLine::getScopeTree specs and fix bug 2014-04-22 17:09:02 -06:00
Nathan Sobo
958bc638d7 Improve scrolling performance 2014-04-22 17:09:02 -06:00
Nathan Sobo
33ed403818 Update editor with tokenized lines when it appears on screen. 2014-04-22 17:09:02 -06:00
Nathan Sobo
3c69fd2d49 Handle mouse wheel and make some tweaks to improve scroll performance 2014-04-22 17:09:02 -06:00
Nathan Sobo
a134a60ce8 Render the entire editor with React. Handle vertical scrolling.
The space-pen view is now a simple wrapper around the entire React
component to integrate it cleanly into our existing system. React
components can't adopt existing DOM nodes, otherwise I would just have
the react component take over the entire view instead of wrapping.
2014-04-22 17:09:02 -06:00
Nathan Sobo
9c49a2d970 Use reactionary helper for creating virtual DOM elements 2014-04-22 17:09:01 -06:00
Nathan Sobo
8cd9160ed5 Add space-pencil dependency 2014-04-22 17:09:01 -06:00
Nathan Sobo
8ad13d3045 Add a real spec for visible line rendering in the react editor view 2014-04-22 17:09:01 -06:00
Nathan Sobo
cc8ba2d679 Update the rendered lines when the screen lines change 2014-04-22 17:09:01 -06:00
Nathan Sobo
da36d5f40f Start experimenting with an EditorView that renders content with React 2014-04-22 17:09:01 -06:00
Kevin Sawicki
9904a9a197 Upgrade to pathwatcher 1.2 2014-04-22 14:40:13 -07:00
Kevin Sawicki
7250a9e407 Upgrade to base16-tomorrow-dark-theme@0.15.0 2014-04-22 11:19:17 -07:00
Kevin Sawicki
1a02b2ec98 Upgrade to atom-light-syntax@0.17.0 2014-04-22 11:06:32 -07:00
Kevin Sawicki
94c860e936 Upgrade to language-sass@0.10.0 2014-04-22 10:43:11 -07:00
Kevin Sawicki
1aeb32eb81 Upgrade to first-mate 1.5.2
Refs atom/language-make#6
2014-04-22 10:27:20 -07:00
Corey Johnson
e450e61248 Fix broken spec 2014-04-22 10:01:24 -07:00
Corey Johnson
fd7951b2c6 Remove focused spec 2014-04-22 09:51:15 -07:00
Kevin Sawicki
743e79b659 Look at first character instead of indexOf call 2014-04-22 09:35:30 -07:00
Kevin Sawicki
3d10c3856b Replace all periods with a single space
Refs atom/language-make#6
2014-04-22 09:33:17 -07:00