Commit Graph

1137 Commits

Author SHA1 Message Date
Antonio Scandurra
8077f46fdf Programmatically detect when mouse approaches the edge of a dock
Previously, we would assign dock elements a minimum width/height of 2
pixels so that we could detect when the mouse approached the edge of a
hidden dock in order to show the chevron buttons. This, however, was
causing confusion for users, who expected that extra space to be
clickable in order to scroll editors located in the center dock.

With this commit we will instead register a global `mousemove` event on
the window right when attaching the workspace element to the DOM (the
event handler is debounced, so this shouldn't have any performance
consequence). Then, when mouse moves, we will programmatically detect
when it is approaching to the edge of a dock and show the chevron button
accordingly. This allows us to remove the `min-width` property from the
dock container element, which eliminates the confusing behavior
described above.
2018-01-12 17:12:55 +01:00
simurai
cd7491bc46 Increase dock hover affordance 2017-12-20 19:59:35 +09:00
Wliu
4c02e96f2a Preserve whitespace 2017-11-01 13:59:02 +01:00
Antonio Scandurra
ac9cc72845 Merge pull request #15486 from atom/as-highlights-outside-of-tiles
Move highlight decorations outside of tiles
2017-08-31 11:26:15 +02:00
Antonio Scandurra
b486e3edda Move highlight decorations outside of tiles
As a consequence of https://github.com/atom/atom/pull/15378, we are now
able to render highlight decorations in a separate div, as opposed to
having an highlight container for each tile.

Code-wise this is much simpler, because highlights spanning multiple
tiles can be represented via a single region and don't need to be split
across the tiles they span anymore. As a byproduct, performance should
improve as well, because the number of nodes that need to be managed
should decrease significantly.

This also fixes https://github.com/atom/atom/issues/15449, and other
similar rendering artifacts, because highlight decoration DOM nodes
won't need to move between tiles anymore when their position changes.
2017-08-29 11:44:07 +02:00
simurai
b7a1443499 Merge pull request #14998 from atom/sm-dock-button-rendering
Fix dock button rendering issue
2017-08-29 10:01:21 +09:00
Antonio Scandurra
7267c5d269 Drop use of GPU tiles for lines and line numbers
At the cost of a very minimal reduction in layout performance, we gain
reliable rendering at all line heights and don't have to worry about
characters that extend above/below the footprint of a line.

Signed-off-by: Nathan Sobo <nathan@github.com>
2017-08-18 15:56:54 +02:00
Nathan Sobo
1584189962 Ensure custom decoration elements fill their container 2017-08-02 20:34:18 -06:00
Jason Rudolph
b72d8078dc Use relative positioning for gutters 2017-07-31 16:41:50 -04:00
simurai
1f21a51ddd Fix dock button rendering issue 2017-07-12 12:26:48 +09:00
Jason Rudolph
5048f46cd7 Update CSP to allow using eval from JavaScript
Signed-off-by: Antonio Scandurra <as-cii@github.com>
2017-06-12 12:04:22 -04:00
simurai
3425692b14 🎨 Rename "entity" to "type" 2017-06-01 22:51:46 +09:00
simurai
c1534d7d2d Use .icon class for atomicons 2017-06-01 20:57:57 +09:00
simurai
d9337a453a Capitalize font name 2017-06-01 17:19:45 +09:00
simurai
bae7b6c0de Update refined icons
Now they should snap to whole pixels
2017-06-01 14:22:46 +09:00
simurai
d4ff85f486 Add Atomicons 2017-05-27 18:09:48 +09:00
Antonio Scandurra
a7066e387f Fix lint errors
Signed-off-by: Nathan Sobo <nathan@github.com>
2017-05-19 11:07:38 +02:00
Antonio Scandurra
b9783b125e Don't 'contain: paint' line elements
This fixes
https://github.com/atom/atom/pull/13880#issuecomment-296623782 once
again.
2017-05-05 14:18:17 +02:00
Nathan Sobo
abfcfb3c9a Set overflow: hidden and contain: layout paint on lines 2017-05-05 09:30:08 +02:00
Nathan Sobo
44539b1dc6 Remove some redundant styling 2017-05-05 09:29:30 +02:00
Antonio Scandurra
efdb044ce6 Use cursor:text on atom-text-editor elements
Signed-off-by: Nathan Sobo <nathan@github.com>
2017-05-05 09:29:30 +02:00
Nathan Sobo
c338227dab Drop floats 2017-05-05 09:29:29 +02:00
Nathan Sobo
77f04c47d9 Consolidate editor style sheets 2017-05-05 09:29:29 +02:00
Antonio Scandurra
3d29db49a4 Use position: relative for .line-number elements
...because packages like `.git-diff` are relying on this behavior to
position their decorations. This didn't seem to degrade layout times, so
it makes sense to just add it to keep package breakage to a minimum.
2017-05-05 09:29:29 +02:00
Nathan Sobo
988118213d Don't use position: relative on atom-text-editor 2017-05-05 09:29:29 +02:00
Antonio Scandurra
6742025a02 Import octicon-mixins in static/text-editor.less 2017-05-05 09:29:29 +02:00
Nathan Sobo
1b1cffb32d ⬆️ etch to allow arbitrary objects as keys 2017-05-05 09:29:28 +02:00
Nathan Sobo
e15e7e3c96 Assign width and character dimensions on editor to update soft wraps 2017-05-05 09:29:27 +02:00
Nathan Sobo
c52d66377f Render hidden input and handle focus and blur 2017-05-05 09:29:27 +02:00
Nathan Sobo
9765d9dbcd Translate gutter so it remains visible when scrolling to the right
Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2017-05-05 09:29:27 +02:00
Nathan Sobo
aed4d8876f Use contain: strict on line number gutter and its tiles
This improves layout time of scrolling by limiting the extent of gutter re-layouts.

Signed-off-by: Antonio Scandurra <as-cii@github.com>
2017-05-05 09:29:27 +02:00
Nathan Sobo
f94144ff4b WIP 2017-05-05 09:29:27 +02:00
Nathan Sobo
f237d70357 WIP 2017-05-05 09:29:27 +02:00
Antonio Scandurra
0bd1255b15 Solve CSP issues for all media types 2017-05-03 14:21:24 +02:00
Antonio Scandurra
32db6a46dc Fix CSP for fonts 2017-05-03 14:21:24 +02:00
Nathan Sobo
549bce5637 Replace sampleBackgroundColors with background-color: inherit in CSS
Previously, the shadow boundary made this impossible, but the new CSS is
way simpler than the JS we’re replacing and removes another dependency
on DOM polling.
2017-05-03 14:21:24 +02:00
Matthew Dapena-Tretter
83efa4b918 Ensure dock mask has size of zero
This no longer seems to be an issue.
2017-04-13 15:53:37 -07:00
Matthew Dapena-Tretter
915931dddd 🐛 Make sure docks affordance can always be revealed 2017-04-13 15:52:05 -07:00
Matthew Dapena-Tretter
45806b19b7 Fix positioning of left dock toggle button when panel container has min-width 2017-04-12 11:39:39 -07:00
Max Brunsfeld
8b407bf48f Don't allow opening docks by clicking on the resize handle 2017-04-05 12:45:29 -07:00
Antonio Scandurra
0e1bc58310 ⬆️ electron-link 2017-04-04 11:36:49 +02:00
Matthew Dapena-Tretter
13f0c8a977 Docks: define handle size in CSS; measure in JS 2017-03-27 12:19:08 -07:00
Matthew Dapena-Tretter
d691c3e5aa Docks: Don't change inherited presentation styles 2017-03-27 10:48:27 -07:00
Max Brunsfeld
91780e6f18 Merge branch 'master' into fb-mdt-docks 2017-03-20 11:26:42 -07:00
Matthew Dapena-Tretter
bf39947eee Add Dock component 2017-03-18 15:31:51 -07:00
Antonio Scandurra
6722450b7e Merge pull request #14021 from atom/as-fix-snapshot-stack-traces
Use the generated snapshot source map in `source-map-support`
2017-03-17 18:05:42 +01:00
Antonio Scandurra
ccbb276bf5 Bake source maps into the snapshot 2017-03-17 13:25:00 +01:00
Antonio Scandurra
bade347e01 Revert "Upgrade to Babel 6 and apply fewer transformations when transpiling babel files" 2017-03-17 12:40:38 +01:00
Antonio Scandurra
b2983f63ba Replace backward with forward slashes when requiring files on Windows 2017-03-15 13:26:31 +01:00
Antonio Scandurra
3d40f55747 Fix lint errors 2017-03-10 10:00:09 +01:00