Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add flex resizing for html eiting window #3388

Closed
wants to merge 4,228 commits into from
Closed

Add flex resizing for html eiting window #3388

wants to merge 4,228 commits into from

Conversation

jryio
Copy link

@jryio jryio commented Apr 14, 2017

Summary

Previously, when editing an email signature as HTML, the preview window
was extremely small (~ 168 x 90 px). The correct size should have been
that of its parent (.scroll-region-content-inner).

The textarea element created from the ContentEditable component is set
to flex: 1, which should result in it growing to its parent's size.

However because the immediate parent of the ContentEditable component
was not display: flex, the flex-grow attribute was not applied.

Before (Screenshot)

image

After (Screenshot)

image


Note: Although I had intended to run the test-suite using npm test initialization process didn't work and I have not been able to resolve the issue.

Mark Hahnenberg and others added 30 commits January 19, 2017 10:22
Summary:
The isSearchIndexed attribute gets bulk reset when we drop the search
index, however, the JSON values were not updated to reflect the new
column values. We don't care about notifications to this field, so in
order to make bulk clearing ok this diff adds a new loadFromColumn option to
Attributes which causes the value to be loaded from the SQL table column
rather than the JSON blob.

Test Plan:
Run locally, drop the search index, make sure we load from the
column rather than the JSON when re-indexing

Reviewers: juan, evan

Reviewed By: juan, evan

Differential Revision: https://phab.nylas.com/D3739
Summary:
- Add a new button to the sync error notification to "Debug" sync. This will open the activity window and dev tools in that window. Depends on D3736
- Update the "Contact Support" link in error notifications to prepopulate the support ticket with the sync error in the account
- Make the "Check Again" button react when clicking it

Test Plan: manual

Reviewers: evan, khamidou

Reviewed By: evan, khamidou

Differential Revision: https://phab.nylas.com/D3737
Summary:
We need people to manually drag into their /Applications folders due to
OSX gatekeeper protections.

Test Plan: manual

Reviewers: juan, khamidou

Reviewed By: khamidou

Differential Revision: https://phab.nylas.com/D3756
When handling unhandled promise rejections, our error reporter would
completely freeze the worker window when trying to send a Promise
through the ipc bridge, rendering the app unusuable

This fixes T7621
Normalized size of buttons across signature, accounts and mail rules preferences. Also make signature pane same size as other preference panels
Summary: See title

Test Plan: tested locally

Reviewers: juan, mark, evan

Reviewed By: juan, mark

Subscribers: juan

Differential Revision: https://phab.nylas.com/D3744
Summary:
When the search index got very big the queries we were running during
after keypress would cause jank in the UI which was very noticeable on
subsequent keypresses. This diff backgrounds these queries and adds a
LIMIT to the fts MATCH clauses to avoid having to send too much stuff
across the IPC bridge.

Test Plan: Run locally, make sure that typing is smooth while searching

Reviewers: juan, evan

Reviewed By: juan, evan

Differential Revision: https://phab.nylas.com/D3757
Summary:
This diff modifies the SearchIndexer class to handle limiting the search
index size. It does this by periodically re-evaluating the window of
the n most recent items in a particular index where n is the max size of
the index. It then unindexes the items which are marked as indexed but
are no longer in the window and indexes the things that are in the window
but aren't marked as indexed.

Test Plan:
Run locally with a reduced thread index size, verify that the index
includes the most recent items and that it is the correct size. Also verify that
the queries used properly use fast sqlite indices.

Reviewers: evan, juan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D3741
Summary:
This will solve T7579 for actions involving categories (folders/labels)
Depends on D3753

Test Plan: manual

Reviewers: halla, mark, khamidou, evan, spang

Reviewed By: evan, spang

Differential Revision: https://phab.nylas.com/D3754
Summary:
Previously, when adding an account, we waited for it to be completely loaded (which meant having fetched the folder list) before focusing it on the sidebar. This could take several seconds, so it made the app feel unresponsive or slow when adding an account.

Then, we changed the logic to wait an arbitrary amount of time to focus the newly added account in the sidebar, with the hope that it would be enough time to focus it correctly but that it wouldn't seem too long. This still caused the unwanted effect of focusing it before it had been fully loaded.

This commit changes the auth flow so that the onboarding shows a Success page until the newly added account is fully loaded, and only /then/ closes itself, focuses the main window, and allows the account to be correctly focused in the sidebar.

Test Plan: manual

Reviewers: halla, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D3751
Summary:
Adds the following new events:

- Threads Moved to Folder
  - isArchive
  - source
  - folderType
  - folderDisplayName
  - numThreads
  - numMessages
  - description
  - isUndo

- Threads Changed Labels
  - isArchive
  - source
  - labelTypesToAdd
  - labelTypesToRemove
  - labelDisplayNamesToAdd
  - labelDisplayNamesToRemove
  - numThreads
  - numMessages
  - description
  - isUndo

- Threads Starred
  - source
  - numThreads
  - description
  - isUndo

- Threads Unstarred
  - source
  - numThreads
  - description
  - isUndo

- Threads Marked as Read
  - source
  - numThreads
  - description
  - isUndo

- Threads Marked as Unread
  - source
  - numThreads
  - description
  - isUndo

Each new action has a "source" property that's one of the following:
- Category Picker: New Category
- Category Picker: Existing Category
- Toolbar Button: Message List
- Toolbar Button: Thread List
- Send and Archive
- Context Menu: Thread List
- Thread List Icon
- Quick Actions: Thread List
- Swipe
- Keyboard Shortcut
- Dragged Out of List
- Snooze Move
- Important Icon
- Label Remove Icon
- Thread Selected
- Mail Rules
- Dragged Into List

Test Plan: manual

Reviewers: juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D3760
jstejada and others added 25 commits February 14, 2017 18:25
Summary:
This will help us dry up exponential backoffs we have scattered in
several places

Test Plan: unit tests

Reviewers: mark, spang, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D3919
Summary:
This renames `SearchIndexer` to `SearchIndexScheduler`

It also moves it out of internal_packages and into src/ since this is now
used across packages (like in Salesforce).

It also makes the class a Singleton and exports that instead so we don't
need to pass it via `activate`. The `activate` method of many stores and
packages are designed to be argumentless.

Test Plan:
Boot up Nylas and ensure it's still indexing threads properly.
Also allows Salesforce to bootup with the SalesforceSearchIndexer

Reviewers: juan, mark

Reviewed By: mark

Differential Revision: https://phab.nylas.com/D3911
Summary:
This commit rewrites the offline status notification from scratch, using
the `is-online` module (https://github.com/sindresorhus/is-online). The
react component no longer manages all of the state internally, but
rather depends on a separate OnlineStatusStore that manages the online state
for that component.

The new online status system will:

- Check online status every 30 seconds
- If status switches to offline:
  - Show notification
  - Recheck online status using exponential backoff
  - Notification will show remaining seconds until next online status
  check (like slack) (upon initial inspection this seemed to have no cpu problems.)
- If status switches to online
  - Hide notification
  - Revert to checking online status every 30 seconds

Depends on D3919

Test Plan: manual

Reviewers: spang, mark, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D3920
Summary:
This adds a simple service to monitor whether the computer is plugged in
or not.

Test Plan: Run locally, verify that we correctly detect battery charging state

Reviewers: evan, spang, juan

Reviewed By: evan, spang, juan

Differential Revision: https://phab.nylas.com/D3937
Summary:
This re-enables NylasEnv spec and fixes a particularly tricky test
involving the Node event loop.

See the comments I left on process.unhandledRejection and the new spec

Test Plan: Manually run test in isolation and whole suite. All green!

Reviewers: juan, mark, halla, spang

Reviewed By: spang

Differential Revision: https://phab.nylas.com/D3942
Summary:
Get ready for some SFDC diffs! Hooray getting more eyeballs on SFDC. At
this stage it's a lot of FYI to hopefully start showing more people parts
of the SFDC plugin.

This is related to the form you use to create new Salesforce Objects with.

The form window basically looks like:
```
<SalesforceObjectFormWithWindowProps>
  <SalesforceObjectForm>
    <GeneratedForm>
      <GeneratedFieldset>
        <FormItem type="input" />
        <FormItem type="email" />
        ... (lots of FormItems)
        <SalesforceObjectPicker>
          <TokenizingTextField>
            <Menu>
              some placeholder that had an error fixed by this diff!!!
            </Menu>
          </TokenizingTextField>
        </SalesforceObjectPicker>
        <FormItem type="checkbox" />
      </GeneratedFieldset>
    </GeneratedForm>
  </SalesforceObjectForm>
</SalesforceObjectFormWithWindowProps>
```

The whole GeneratedForm is controlled by an obejct called `formData`. This
is documented in `GeneratedForm`.

This bug prevented me from properly using SalesforceObjectPickers inside
my form.

Test Plan: manual

Reviewers: mark, halla, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D3935
Need this in order to allow parallel installation of Nylas Pro and Nylas
Mail.
Previously, when editing an email signature as HTML, the preview window
was extremely small (~ 168 x 90 px). The correct size should have been
that of its parent (.scroll-region-content-inner).

The textarea element created from the ContentEditable component is set
to `flex: 1`, which should result in it growing to its parent's size.

However because the immediate parent of the ContentEditable component
was not `display: flex`, the `flex-grow` attribute was not applied.
@jstejada jstejada force-pushed the master branch 2 times, most recently from ef74afe to 6d2c2b2 Compare April 18, 2017 07:18
@benkahle
Copy link

I think this is an exact duplicate of #3238 :)

@jryio
Copy link
Author

jryio commented Apr 18, 2017

@benkahle Ahaha, I didn't even notice! I'll close this one out 👍

@jryio jryio closed this Apr 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.