Commit Graph

845 Commits

Author SHA1 Message Date
Kevin Sawicki
75627f50a2 Normalize process.resourcesPath on load
This ensures the drive letter is consistent on Windows for when
package paths are compared to the resources path to determine
whether to use the metadata cache for a bundled package.

Closes #3932
2014-10-30 10:31:37 -07:00
Kevin Sawicki
0c590d6170 Load CoffeeScript when using a custom resource path
Load CoffeeScript early whenever the resource path a subdirectory
from process.resourcesPath

Close #3993
2014-10-29 10:21:23 -07:00
Ben Ogle
b94485eafd Set the heights of atom panels for location left and right. 2014-10-17 12:08:24 -07:00
Kevin Sawicki
6a6c7b1852 Calculate load time in index.js
Do it previously in window-bootstrap caused several things to not be
included such as requiring coffee script and atom shell modules.

Now it is a much more accurate representation of on load time.
2014-10-15 13:09:46 -07:00
Kevin Sawicki
289f17b119 Require coffee before module cache in dev mode 2014-10-15 13:09:46 -07:00
Kevin Sawicki
d745b9ef5f Register module cache as early as possible 2014-10-15 13:09:45 -07:00
Kevin Sawicki
934c0720d8 Require ipc when needed 2014-10-15 13:09:44 -07:00
Kevin Sawicki
41598af2b2 Add pre-resolved path to require('atom') 2014-10-15 13:09:44 -07:00
Kevin Sawicki
171411823f 🐎 Resolve uncached core dependencies
Trust modules under the resource path to be there without stat-ing and
verifying.
2014-10-15 13:09:43 -07:00
Kevin Sawicki
8a0755340f Remove extra ) 2014-10-15 13:09:43 -07:00
Kevin Sawicki
bdebe575b7 💄 Use regular require paths 2014-10-15 13:09:43 -07:00
Kevin Sawicki
d877872c71 Use right require path 2014-10-15 13:09:42 -07:00
Kevin Sawicki
0a297d7642 Load module cache in index.js 2014-10-15 13:09:42 -07:00
Nathan Sobo
014e2e6fce Make atom-workspace tag have ‘display: block’ style 2014-10-09 07:39:14 -07:00
Nathan Sobo
1eb3d8bf99 Use ‘atom-text-editor’ custom tag name for TextEditorElement 2014-10-09 07:39:14 -07:00
Nathan Sobo
8e06e88efa Use ‘atom-workspace-axis’ custom tag name instead of ‘div’ 2014-10-09 07:39:14 -07:00
Nathan Sobo
8941b97ed2 Use ‘atom-workspace’ custom tag name for WorkspaceElement 2014-10-09 07:39:14 -07:00
Nathan Sobo
eedf4894ae Use ‘atom-pane-container’ custom tag name for PaneContainerElement 2014-10-09 07:39:14 -07:00
Nathan Sobo
ddf36a013c Use ‘atom-pane-axis’ custom tag name for PaneAxisElement 2014-10-09 07:39:14 -07:00
Nathan Sobo
ee9284e228 Use ‘atom-pane’ custom tag name for PaneElement 2014-10-09 07:39:13 -07:00
Ben Ogle
b958286d22 Click to expand stack traces 2014-09-26 17:31:09 -07:00
postcasio
a615c3e081 Don't override antialiasing in markdown 2014-09-23 15:35:54 +01:00
Kevin Sawicki
ca9d05f6fa Remove notification stylesheet
These were currently undocumented in the styleguide, had hard-coded colors,
weren't being styled by the default light/dark UI themes, and were unused.

They were also causing conflicts with the notification token scope that
the Objective-C grammar uses.
2014-09-18 09:26:46 -07:00
Nathan Sobo
0bae432109 Revert "Merge the react and non-react editor styles"
This reverts commit 01c4fe5340.
2014-08-26 09:24:44 -06:00
Ben Ogle
01c4fe5340 Merge the react and non-react editor styles 2014-08-25 12:05:10 -07:00
Nathan Sobo
eabad3dcef Use opacity to blink cursor instead of visibility so blink can be styled 2014-08-14 13:20:43 -06:00
Ben Ogle
bbeb4be5b1 Fix the status bar nested inline blocks.
They were 1 - 2px too low due to nesting inline-blocks.
2014-08-13 13:42:46 -07:00
Ben Ogle
25601d691d Pull the mini editor styles out from react rule 2014-07-29 13:07:07 -07:00
Ben Ogle
23f21bcda2 Style the mini editors for a constant height
Adds an @input-font-size variable.
2014-07-29 12:31:34 -07:00
Ben Ogle
800d65e3de Absolutify the placeholder text in mini editors.
Fixes #3118
2014-07-29 12:19:16 -07:00
Nathan Sobo
c1ec87c41b Don't apply special styles React mini editors 2014-07-24 12:57:12 -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
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
Ben Ogle
c4204eb9e9 import the fallback variables in the base theme 2014-07-11 14:08:29 -07:00
Ben Ogle
cb0ee735be Default cursor on scrollbars.
Fixes #2876
2014-07-09 08:46:48 -07:00
Ben Ogle
5c5576c39d Use right margins for toolbar btn-groups rather than left.
Fixes #2830
2014-07-08 11:18:48 -07:00
Ben Ogle
1838ff2502 Use ‘flash’ class rather than ‘highlighted’.
Pull the flash into the base theme rather than the ui themes
2014-07-03 17:32:38 -07:00
Ben Ogle
168c6cdbca Revert "Move the find-and-replace marker css into the base theme "
This reverts commit 942041f214.
2014-07-03 14:22:58 -07:00
Ben Ogle
942041f214 Move the find-and-replace marker css into the base theme 2014-07-03 14:12:23 -07:00
Nathan Sobo
7c356d2592 Revert "Render highlights on their own layer to avoid GPU artifacts" 2014-06-21 01:58:11 -06:00
Nathan Sobo
df8d014e3c Add a dedicated underlayer to avoid GPU artifacts on wrap guide etc
Trying to make the .highlights layer double as the .underlayer was
causing GPU artifacts on the wrap guide when the last highlight was
removed. This puts it in its own layer to avoid that.
2014-06-20 16:33:08 -06:00
Nathan Sobo
4218e0a037 Render highlights on their own layer to avoid GPU artifacts
Previously, when the last highlight div was removed from the lines
layer, chunks of the lines would sometimes disappear. Since we've
discovered that giving the lines an opaque background doesn't help with
subpixel anti-aliasing anyway, I've found that rendering highlights on
their own layer behind the lines and making the lines layer transparent
avoids the arficacts.
2014-06-20 15:18:19 -06:00
Ben Ogle
63587abe97 Give fold markers a pointer on hover 2014-06-18 14:21:03 -07:00
Ben Ogle
e89e2141d7 Merge pull request #2605 from atom/bo-ns-highlights
Add highlight decorations
2014-06-17 17:42:18 -07:00
Ben Ogle
3790cdb262 Reset highlights so they don’t interfere with styleguide text.highlight 2014-06-17 17:08:53 -07:00
Kevin Sawicki
de8b498402 Add deprecations to spec runner 2014-06-17 11:28:01 -07:00
Ben Ogle
a3784500ec Fix editor-view tests 2014-06-17 11:13:15 -07:00
Ben Ogle
0312609e19 Make highlights render as absolute position 2014-06-16 15:57:23 -07:00
Corey Johnson
5e51445118 Update cursor z-index 2014-06-11 10:04:31 -07:00
Ben Ogle
d9e731c84a Update styles on the foldable icons 2014-06-09 14:04:23 -07:00
Nathan Sobo
fe3ea229a2 Prevent focus loss on double click without breaking single click focus
Previously, we stopped propagation on mousedown events to prevent
certain cases where focus was being lost after double clicking to select
a word.

Unfortunately, this also broke the ability to focus the editor by
clicking it. When investigating this, I noticed that whenever we lost
focus, the target of the mousedown event was always the cursor. So I
tried setting `pointer-events: none` on cursors and can no longer
reproduce the double-click issue.

/cc @probablycorey
2014-06-07 12:37:40 +09:00
Nathan Sobo
66661f2d10 Make cursor visible when .editor-contents is focused 2014-06-06 23:58:39 +09:00
Nathan Sobo
cae5cdc81c Put the .editor class on the wrapper, not the component
Things depend on the react editor wrapper having the .editor class,
but inside the editor, we can control the style. I changed the
component's div to be .editor-contents for now. We can eliminate this
extra style when we eliminate the wrapper.
2014-06-06 23:52:35 +09:00
Corey Johnson
56095187e6 Only show the first 10 lines of a spec failure and its stacktrace
It is difficult to scroll through stack traces when there are huge
failure messages. This limits the length to 10 lines, if you hover
over the message it will expand.

Somewhat related to #1173
2014-06-05 11:36:58 -07:00
Ben Ogle
d684911fce Make cursor visible when over indent guides 2014-05-27 12:11:24 -07:00
Nathan Sobo
2ae7cba452 Don't blink cursors with CSS animation
It seems to create intermittent lags when moving the cursor and typing.
2014-05-20 14:04:59 -06:00
Nathan Sobo
b000e8e4a2 Get selection specs passing again 2014-05-16 15:31:16 -06:00
Nathan Sobo
54cec0a5ff Hold the gutter's width with a dummy line number 2014-05-16 15:31:15 -06:00
Nathan Sobo
7dfe829fc8 Style lines with inline styles for performance 2014-05-16 15:31:15 -06:00
Nathan Sobo
d15fd34f7a Render selections on lines layer; don't put each line number on GPU 2014-05-16 15:31:14 -06:00
Nathan Sobo
a118cdd32b Put selections and lines on the GPU together in sibling divs 2014-05-16 15:31:14 -06:00
Nathan Sobo
070d239f41 Blink cursors with a CSS animation
Now that they're on their own layer, I don't think it affects the
repaint timing when typing on lines (if it ever did).
2014-05-16 15:31:13 -06:00
Nathan Sobo
f3efd7d60b Position cursors relative to scrollLeft and fix specs 2014-05-16 15:31:12 -06:00
Nathan Sobo
191bc115cf Use explicit descendant selector for styling lines 2014-05-16 15:31:12 -06:00
Nathan Sobo
a22480d857 Don't give lines a negative z-index
Removing the z-index makes them accessible via mouse in the inspector.
2014-05-16 15:31:12 -06:00
Nathan Sobo
a36163ce86 Manually set the gutter width to the width of a line number
We need to absolutely position line numbers to minimize repaints, but
the gutter needs to be wide enough to show them.
2014-05-16 15:31:11 -06:00
Nathan Sobo
e3d1a6aef8 Render each line number on its own layer 2014-05-16 15:31:11 -06:00
Nathan Sobo
bf9f8597a7 Give each line its own layer on the GPU 2014-05-16 15:31:11 -06:00
David Y. Ross
e3302b3f73 hide the cursor with cursor-hidden class rather than element.style 2014-05-15 19:20:32 -07:00
Nathan Sobo
ab1ede5fe6 Add a dummy scrollbar corner
Horizontal / vertical scrollbars render a 'corner' on the lower right
when they would otherwise overlap. I previously relied on drawing both
dummy scrollbars at their full width/height so the corner got rendered,
but that interfered with the display of the horizontal scrollbar in
certain circumstances because it was too wide to scroll. This commit
provides that behavior with an absolutely positioned div with the same
dimensions as the intersection of scrollbars when both are visible.
2014-05-09 11:33:04 -06:00
Nathan Sobo
dbd271f70a Don't obscure last character of long lines with vertical scrollbar
This entailed quite a few changes to dial in scrollbars. The scrollbars
are now adjusted in size to account for the width of the opposite
scrollbar. If the width or height are not explicitly constrained and we
are scrollable in the opposite direction that is constrained, we account
for the width of the opposite scrollbar in assigning a natural height
or width based on the content.
2014-05-09 11:33:04 -06:00
Nathan Sobo
e6df30e94c Respect horizontal scrollbar when rendering the vertical, and vice versa
We set overflow to hidden in the opposite scroll direction only if we
can't actually scroll in that direction, causing the white square where
neither scrollbar overlaps to appear at the lower right corner.
2014-05-09 11:33:03 -06:00
Nathan Sobo
c730e3c67e Ensure selections span the entire screen, even when lines are short
Also, pass scrollHeight and scrollWidth as props to child components
instead of calling the method to compute them in multiple components.
2014-04-22 17:10:22 -06:00
Nathan Sobo
22496ceeb1 WIP: Minimize paint when scrolling and composite lines with the GPU 2014-04-22 17:10:22 -06:00
Nathan Sobo
d566726b9f Use negative z-indices so attached views are visible in react editor 2014-04-22 17:10:21 -06:00
Nathan Sobo
8c266957f1 Isolate CSS changes to a single selector 2014-04-22 17:09:41 -06:00
David Graham & Nathan Sobo
48135a1e8d Update the horizontal scrollbar when scrollLeft changes in the model 2014-04-22 17:09:38 -06:00
Nathan Sobo
1162af61ed Render a basic gutter 2014-04-22 17:09:38 -06:00
Nathan Sobo
a931aaff53 Remove temporary cursor visibility styling 2014-04-22 17:09:38 -06:00
Nathan Sobo
3d3b72a954 Render selections 2014-04-22 17:09:04 -06:00
Nathan Sobo
70e5880b1d Start on cursor rendering 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
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
5e8213d45f Add atom.allowUnsafeEval loophole and disable unsafe-eval again
With Node.js baked in, there's no water-tight way to prevent users from
evaluating code at runtime, at least with CSP alone. This is because
node exposes a 'vm' module that allows scripts to be compiled. There's
also `module._compile`, etc.

I think a reasonable compromise is to protect users from eval'ing code
by accident. This commit adds an atom.allowUnsafeEval method which
re-enables eval in the dynamic scope of the given function.

I then use this to compile the keystroke grammar which saves us the
complexity of pre-compiling it during specs.

What do people think?
2014-03-05 09:57:08 -07:00
Patrick Toomey
fc543fc5a6 add unsafe-eval for now 2014-03-05 09:32:49 -06:00
Patrick Toomey
2e3aec81e7 initial attempt at CSP policy to see what breaks 2014-03-05 09:03:27 -06:00
Ben Ogle
705f77f5ba Comments 2014-02-28 17:38:08 -08:00
Ben Ogle
c71cbf2e09 Add variables for wrap-guide and indent-guide 2014-02-28 17:38:08 -08:00
Ben Ogle
33aba7b721 Update syntax color variables 2014-02-28 17:38:08 -08:00
Nathan Sobo
28d7db2371 Set overflow to 'hidden' on panes. I'm pretty sure this fixes #1594. 2014-02-26 18:19:07 -08:00
Kevin Sawicki
f9d70e5623 Make skipped specs yellowish 2014-02-11 16:19:46 -08:00
Kevin Sawicki
750e3565fd Remove unused margin styles 2014-02-11 09:06:13 -08:00
Kevin Sawicki
4c60c40eb8 Nest list-unstyled rule 2014-02-11 09:06:13 -08:00
Kevin Sawicki
830a8ddc03 Use bootstrap tooltips 2014-02-11 09:06:13 -08:00
Kevin Sawicki
6a408a3a55 Make symbol-header font size 18px 2014-02-11 09:06:13 -08:00
Kevin Sawicki
4b2e8f8713 Use fold/unfold octicons 2014-02-11 09:06:13 -08:00
Kevin Sawicki
6776fa4f0d Remove border from symbol area 2014-02-11 09:06:12 -08:00
Kevin Sawicki
8be5f7d6c8 Use bootstrap to style spec reporter 2014-02-11 09:06:12 -08:00
Kevin Sawicki
91bd852812 Use hyphen separated class names 2014-02-11 09:06:12 -08:00