The rationale being it's covering all of the cases while still having a good performance.
Tracking a non-standard URL is not a user experience problem in a way. It's embedded in a <a href> tag.
As of now, link-tracking creates link tracking for every <a> tag, no matter the href attribute. This commit only creates link tracking for valid URLs.
The reason I wrote a new regex instead of rewriting linkTagRegex is that this regex is used by message-list.
https://regex101.com/r/jD5zC7/3 vs https://regex101.com/r/cK0zD8/2Resolves: #1525
Summary:
- Also refactors the code a bit for testability and maintainability
- Fixes#1515
Test Plan: - Unit tests
Reviewers: evan, drew, bengotow
Reviewed By: bengotow
Differential Revision: https://phab.nylas.com/D2651
Summary:
This fixes a serious issue where drafts could appear to be sending if
they were located in the same index of the message list as a draft which was
previously sending.
Under the hood this was due to two bad programming choices:
1) State based on props in MessageContainer requires correct implementation of
componentWillReceiveProps. This is definitely an anti-pattern.
2) Using item index rather than clientId as the key for items in the MessageList
caused containers to be given a different message prop when one was inserted,
rather than just shifting the existing ones down and inserting a new one.
Test Plan: Not sure how to test this really...
Reviewers: drew, juan
Differential Revision: https://phab.nylas.com/D2673
Summary:
When we delete drafts, they can sometimes come back because we receive deltas about them,
find that they're not in the cache, and re-save them.
This diff fixes that by permanently incrementing the optimistic change count, which was also do
to prevent deltas from changing threads while we're in the middle of a request that will change
them further. (This may not actually be necessary anymore, because we'd ignore the delta anyway
due to it's out-of-date version?)
Test Plan: Run a couple new tests
Reviewers: drew, juan
Reviewed By: juan
Differential Revision: https://phab.nylas.com/D2665
Addresses #411
The `N1.sh` launch script fails to account for running from
`/usr/{local/}bin/nylas` where it would throw an error saying
it couldn't find the electron binary.
The Atom launch script works just fine and takes that into account.
The installed launch script here is a reflactored Atom launch script
that properly accounts for running the `nylas` executable and locates
the actual binary accordingly.
Summary:
By default, the messages in a thread are now filtered to exclude
ones moved to trash or spam. You can choose to view those messages by clicking
the new bar in the message list.
When you view your spam or trash, we only show the messages on those threads
that have been marked as spam/trash.
Test Plan: Run a couple new tests
Reviewers: juan, evan
Reviewed By: evan
Differential Revision: https://phab.nylas.com/D2662
Summary: Just new specs. Tested by manually breaking lots of things in SendDraft
Test Plan: Run new tests
Reviewers: juan, drew, evan
Reviewed By: evan
Differential Revision: https://phab.nylas.com/D2649
Summary: fix(account): allow users to reconnect accounts if auth has failed
Test Plan: manual
Reviewers: bengotow, juan
Differential Revision: https://phab.nylas.com/D2663
Updating Contributing guidelines to make note of the `env: custom` option so that a Sync Engine in a local environment may be accessed on an alternate IP.
Also APIRoot must contain quotes around the URL otherwise a config validation will be thrown.
Signed-off-by: Julien Chinapen <j.c@shogun.io>
Summary:
Previously we were storing sync cursors in config.cson. They were by
far the most frequently updated piece of data in config. To make things worse,
all the writing was happening in the worker window - the main window was just
seeing the changes on disk and reloading.
I believe there's an edge case which causes the main window to read the config
file when it's mid-write and empty. This causes the accounts array to become
empty in the AccountStore and lots of downstream issues. It's also then possible
for the main window to write a config change of it's own and empty the file
permanently.
Test Plan: A few new tests to make sure this is backwards compatible.
Reviewers: juan, evan
Reviewed By: juan, evan
Differential Revision: https://phab.nylas.com/D2642