Summary:
It seems that #2518 was being caused because `fs.writeFileSync` ocasionally failed and ended up writing an empty config.json file, effectively blowing away your N1 settings. The most common cause of failure for `writeFileSync` seems to be EBUSY error on win32, according to Sentry. The reason as to why EBUSY is happening so frequently on win32 is still unclear.
This commit:
- Adds an `atomicWriteFileSync` helper which writes to a temporary file first, and then renames the file. If writing to the temp file fails, we wont blow away our actual config.json. Also, renaming seems to be atomic across all platforms.
- Adds more robust error handling and messaging to both loading and writing the file, and report them to Sentry
- Automatically retries saving the file 3 times before telling the user.
- Fixes https://sentry.nylas.com/sentry/edgehill/group/43112/
Test Plan: Manual
Reviewers: evan, bengotow
Reviewed By: bengotow
Differential Revision: https://phab.nylas.com/D3245
Summary: Future services that require OAuth get a cute new component that lets them connect more easily.
Test Plan: Tested manually.
Reviewers: juan, evan
Reviewed By: evan
Differential Revision: https://phab.nylas.com/D3186
Summary:
- There are some cases in which constantly retrying send can cause unexpected bugs like sending multiple times, so don't retry send at all
- Make 429 a permanent error code
Test Plan: Manual
Reviewers: jackie, evan
Reviewed By: jackie, evan
Differential Revision: https://phab.nylas.com/D3177
Summary:
Adds a new notification bar for mac users only that warns you if N1 is not
in your /Applications folder. Gives you the option to move it to your
/Applications folder.
Test Plan: manual
Reviewers: juan, jackie
Reviewed By: juan, jackie
Differential Revision: https://phab.nylas.com/D3166
Summary:
See edgehill revision: https://phab.nylas.com/D3160
- CustomContenteditableComponents.get now takes a single component to register as an overlaid component, and this component will be passed a prop `{isPreview: true}` when it is meant to be rendered as a preview. Update scheduler and mail-merge to use this new api.
- This prevents the mail merge state from being incorrectly updated when we toggled preview mode -- previously, it believed that the tokens had been unmounted when toggling preview, so they were incorrectly removed from the mail merge state.
- Additionally, makes sure that tokens are correctly added to the mail merge state whenever a token is rendered via componentDidMount -- previously, we only added the token to state when a token was dropped on the contenteditable, however, a token might be pasted or an anchor node might be added by any other means, in which case we want the mail merge state to reflect that. (Adds docs about this)
Test Plan: Manual
Reviewers: jackie, evan
Reviewed By: jackie, evan
Differential Revision: https://phab.nylas.com/D3161
Summary:
fix(subject-field): Fix subject text field focus
Before, if you clicked a mailto link, once the composer loaded, the subject field (which was focused in composer-preload) blurred. This was not ideal as users would want to type once the popout loaded and instead they would have to click first. We identified that this was coming from the composer header _renderSubject injected component. We fixed the focus within mail merge subject text field and additionally added the onComponentDidChange method to injected component. This allowed us to only update the component when the header field changed.
Test Plan: tested on my machine for mailto links
Reviewers: juan
Reviewed By: juan
Subscribers: juan
Differential Revision: https://phab.nylas.com/D3150
Summary: When you would click outside the contenteditable in the composer, it would focus to the absolute end. Not ideal. I added a check if the click is above the top of the content editable -- if you click the top padding of it -- then focus at the beginning.
Test Plan: is this something i should test?
Reviewers: juan
Reviewed By: juan
Subscribers: juan
Differential Revision: https://phab.nylas.com/D3139
Summary:
Fix to pass N1 ID auth through to edgehill-server for remaining services
(clearbit and keybase) that request authing against the Nylas API. We need
to pass along the N1 ID.
This also requires an Edgehill Server patch here:
https://phab.nylas.com/D3149
Test Plan: Manual.
Reviewers: bengotow, juan
Differential Revision: https://phab.nylas.com/D3151
Summary: Ran into issues with the selected tag having different styles associated with it in taiga and in darkside. Fixed these.
Test Plan: Tested on my machine
Reviewers: jackie
Reviewed By: jackie
Subscribers: jackie
Differential Revision: https://phab.nylas.com/D3144