Commit Graph

9067 Commits

Author SHA1 Message Date
Kevin Sawicki
f447781e01 Allow any bundled theme when in safe mode
Check enabled names against the bundled names and ensure
one bundled UI and one bundled syntax theme are enabled,
defaulting to the dark themes when necessary.
2014-08-11 15:24:49 -07:00
Kevin Sawicki
070d9d0b46 Merge pull request #3186 from maschs/ms-safeModeThemes
Load the default themes in safe mode
2014-08-11 14:51:14 -07:00
Luca Moser
28a0e94bb9 Fixes unexecutable commands on win32 in BP
Signed-off-by: Luca Moser <moser.luca@gmail.com>
2014-08-11 20:24:57 +02:00
Nathan Sobo
84064a811c :non_potable_water: Unsubscribe from window resize in EditorComponent
This fixes a major memory leak
2014-08-07 04:59:02 -06:00
Maximilian Schüßler
b463d9d876 Load the default themes in safe mode 2014-08-05 13:32:16 +02:00
Desmond Brand
d5e30e83f6 Don't use project path as fallback icon for item with no path
Stops the project folder icon appearing in places that don't make sense
like settings and new files.

Test Plan:

  * Opened settings and didn't see the project folder icon
  * Closed all tabs and saw the project folder icon
2014-08-04 20:51:37 -07:00
Desmond Brand
d16c0e9e41 Implement setDocumentEdited too
As requested by @philipgiuliani

Test Plan:
Opened an existing file and made a modification. The icon fades at the same
time the tab close button changes to a circle. Undo makes the icon opaque
again.
2014-08-04 20:45:24 -07:00
Desmond Brand
bd8ac3bb32 path -> proxyIconPath
Test plan:
Crossed fingers
2014-08-04 11:28:29 -07:00
Nathan Sobo
7e45ffa4c3 Center around the cursor in Editor::scrollToCursorPosition by default
Fixes #3131
2014-08-04 11:58:07 -06:00
Desmond Brand
e1f4b7415a Add OS X proxy icon to title bar
Fixes #1891.

Test Plan:

  * Opened Atom window in directory, verified directory icon shows up
  * Opened a file and verified icon changed
  * Right clicked icon, verified menu appears
  * Drag file to terminal and it pastes the file path (yay)
  * Opened a new Atom window and opened some files in that to make sure that
    it didn't change the original window

I didn't add any specs for this - advice welcome here. I also haven't tested
on Windows or Linux but it looks like `setRepresentedFilename` is a noop on
those platforms.
2014-08-03 17:14:17 -07:00
Nathan Sobo
6e72627e9e Stop propagation of keydown/textInput events to prevent React handler
React's global synthetic event handler is somewhat expensive. This
prevents it from being invoked on every keystroke, saving ~1ms.
2014-07-31 15:11:06 -06:00
Kevin Sawicki
18016ae9df 💄 Use unless instead of if not 2014-07-31 08:33:36 -07:00
Maximilian Schüßler
62b52cb70a In devmode do not load incompatible from cache 2014-07-31 16:24:29 +02:00
Nathan Sobo
0f77a2eef9 Only unmount ReactEditorView's component before removing if its mounted
Fixes #3108

Unmounting the component the first time can cause a focusout event,
which leads to a redundant removal and an attempt to unmount again. This
protects against that.
2014-07-29 20:02:01 -06:00
Nathan Sobo
f8e2231dfc Increase overdraw margin to avoid intermittent full screen repaints
On Chromium 35, the screen seems to be full-screen painting on a Cinema
Display every few frames, causing frame rates to drop from 60 to 30 when
autoscrolling with the cursor. Increasing the overdraw avoids this.
2014-07-28 21:57:06 -06:00
Nathan Sobo
4f3570b56b Merge pull request #3106 from atom/ns-react-css-font-styling
Apply React editor font styles via CSS instead of inline styles
2014-07-28 21:08:51 -06:00
Nathan Sobo
8918a42b3b Merge pull request #3104 from dmnd/react-dev-mode
Show detailed React errors/warnings in devMode
2014-07-28 21:02:11 -06:00
Nathan Sobo
bd77a02207 Measure DOM in EditorComponent when a stylesheet is updated 2014-07-28 21:00:15 -06:00
Nathan Sobo
eebbb99fc8 Handle editor font config options with a global stylesheet
Previously, each editor observed font-related config values on its own
and applied inline styles to honor them. This made it difficult to style
the editor like a normal element with CSS.

Moving this to a global stylesheet that targets editors via the .editor
selector means that the font size setting can be overridden in specific
contexts, such as when using mini editors.
2014-07-28 21:00:15 -06:00
Nathan Sobo
2b27c0b440 Only handle stylesheet changes after initial measurement 2014-07-28 20:59:28 -06:00
Nathan Sobo
8e69b0c4a0 Base font styling on the computed style of the editor element
Previously, font styling was always explicitly assigned via the config.
This commit is the first step in basing the font styling of the editor
on the styles assigned via CSS. This will allow the editor's
font-family, font-size, and line-height to be assigned via CSS just like
they are for any other element, which will make it easier to style mini
editors.

We still need to switch the font settings to adjust a global stylesheet
rather than updating inline styles on each editor individually.
2014-07-28 20:59:28 -06:00
Kevin Sawicki
02c47ba1ea 💄 2014-07-28 16:49:08 -07:00
Kevin Sawicki
f6cb59be47 Merge pull request #3062 from ehuss/win32-sourcemaps
Fix source maps for CoffeeScript on Windows.
2014-07-28 16:44:06 -07:00
Kevin Sawicki
431555195a Merge branch 'master' into chrome35
Conflicts:
	package.json
2014-07-28 14:40:14 -07:00
Nathan Sobo
7f882b00f5 Don't allow updates to be requested for unmounted components
In 444c18be34, I stopped polling the DOM
when an update was pending to prevent delay of the next animation frame.

Unfortunately, we rely on synchronously polling the DOM when an editor
view is attached to perform the initial measurement of the default char
width, which is required to position the wrap guide.

In componentWillMount, observing the config was requesting an update,
causing us to skip this synchronous update at attachment time and
position the wrap guide wrong.

This prevents update requests that occur before mount from pausing the
polling that we perform on attachment, restoring correct function to the
wrap guide.
2014-07-28 14:42:35 -06:00
Nathan Sobo
3a9aa80914 Add ReactEditorView::lineElementForScreenRow shim 2014-07-28 11:36:40 -06:00
Kevin Sawicki
7e415ffdb7 Merge branch 'master' into chrome35
Conflicts:
	package.json
2014-07-28 09:02:38 -07:00
Desmond Brand
65ffd21574 Show detailed React errors/warnings in devMode
Fixes #3099.

React development mode has a lot of useful warnings and exceptions. These don't
show up in production mode. This change puts React into dev mode when Atom is
run via `atom --dev`.
2014-07-27 16:10:47 -07:00
Nathan Sobo
393552a4b6 Take cursors off the GPU and position them on the lines layer
The compositor overhead is not worth it.
2014-07-27 11:47:33 -06:00
Nathan Sobo
444c18be34 Stop polling when an update is pending 2014-07-27 11:46:22 -06:00
Nathan Sobo
dca096b8e3 Use requestAnimationFrame to batch updates in Chrome 35
In Chrome 31, setImmediate was yielding better behavior. But now Chrome
35 seems to behave more smoothly when we use requestAnimationFrame, and
the delay for keystrokes is non-existent.
2014-07-27 11:46:22 -06:00
Nathan Sobo
57a03e7884 Kill dummy highlight component now that Chrome 35 fixes render artifact
Previously, removing the last highlight caused rendering artifacts.
Chrome 35 no longer exhibits this problem so we can remove this
workaround.
2014-07-27 11:46:22 -06:00
Marc Bachmann
9ae007a6d7 Remove duplicate addUrlToOpen() in browser/main.coffee
I don't think that this was the desired behaviour.
I do not know if that caused a bug.
2014-07-26 10:54:15 +02:00
Kevin Sawicki
9dc59b9807 💄 2014-07-25 17:12:03 -07:00
Kevin Sawicki
15689ebfb5 📝 2014-07-25 17:11:33 -07:00
Kevin Sawicki
6250419fcb containsNativeModule -> isNativeModule 2014-07-25 17:09:46 -07:00
Kevin Sawicki
70621afe62 📝 2014-07-25 17:08:10 -07:00
Kevin Sawicki
7b07d7116b Store string in local storage 2014-07-25 16:06:35 -07:00
Kevin Sawicki
f175086865 Always return boolean from Package::isCompatible 2014-07-25 15:56:09 -07:00
Kevin Sawicki
c6071a9802 Don't throw incompatible error, log instead 2014-07-25 15:49:34 -07:00
Kevin Sawicki
ac138c1dc8 Throw error when activating incompatible package 2014-07-25 15:46:35 -07:00
Kevin Sawicki
85b7261d31 Don't store incompatible packages in custom object
The info is on the Package object itself to the loaded/activated
packages can just be iterated over.
2014-07-25 15:36:09 -07:00
Kevin Sawicki
d47348e8f9 Cache incompatible modules in local storage 2014-07-25 15:34:03 -07:00
Kevin Sawicki
1ea909d4db Check installed packages for working native modules
Test require each native module in each installed package to make sure
it can be required successfully in Atom.
2014-07-25 15:19:16 -07:00
Ben Ogle
c748fc49bb Fix split-selection-into-lines
Don’t create cursor on last row when selection on row is empty


Fixes #1704
Closes #3080
2014-07-25 11:29:40 -07:00
Nathan Sobo
a3d82e9414 Merge branch 'master' into chrome35
Conflicts:
	package.json
2014-07-24 18:14:11 -07:00
Nathan Sobo
37165f3293 Invoke pollDOM after attach so character width is calculated
Now that we mount the react component in the constructor of the wrapper
view, it's never actually visible at the time of mount. By invoking
pollDOM manually after attaching and before emitting the attach event,
the character width is available for the wrap guide to calculate its
initial position.
2014-07-24 18:12:02 -07:00
Nathan Sobo
7515fd94ba Merge branch 'master' into chrome35
Conflicts:
	package.json
2014-07-24 17:40:37 -07:00
Nathan Sobo
85363f8eaa Resample background colors whenever stylesheets change
This prevents a flicker that occurred on theme changes when we just
detected this via polling. I'm going to leave the polling as a catch-all
in case the editor is styled inline in some way.
2014-07-24 17:25:04 -07:00
Nathan Sobo
7738eeeacc Give the line-numbers div an opaque background for better GPU perf
We sample both the background color of the editor and the gutter. If the
gutter has an actual background color, we use it. Otherwise we fall back
to the same background as the editor.
2014-07-24 17:23:04 -07:00