Summary:
- Separate gmail's remove-from-view and delete behaviors and write logic
for each of those
- Remove MailboxPerspective::{canArchiveThreads, canTrashThreads,
removeThreads} and some unecessary code in TaskFactory
- Instead, add MailboxPerspective::tasksForRemovingFromPerspective (I
know its a bit of a mouthful)
- I initially tried to put all of the logic for each execution path
inside the TaskFactory by checking perspective types, but it made
more sense to use the polymorphism already in place for the different
perspective types.
- There is a default delete/remove-from-view behavior which is
configurable via simple ruleset objects. The gmail behavior is
configured in this way.
- Update swipe css classes based on destination of threads
- Fixes#1460:
- Update logic to display archive/trash buttons and context menu options correctly
when selected threads can be archived/trashed (not based on
perspective)
- Same for swiping
- Add a bunch of specs
- Convert some code to ES6
- TODO write some docs for new functions
Test Plan: Unit tests
Reviewers: drew, evan, bengotow
Reviewed By: bengotow
Differential Revision: https://phab.nylas.com/D2682
Summary:
This is a refactor of the toolbar in the contenteditable. Goals of this
are:
1. Allow developers to add new buttons to the toolbar
2. Allow developers to add other component types to the floating toolbar (like the LinkEditor)
3. Make the toolbar declaratively defined instead of imperatively set
4. Separate out logical units of the toolbar into individual sections
5. Clean up `innerState` of the Contenteditable
The Floating Toolbar used to be an imperative mess. Doing simple
functionality additions required re-understanding a very complex set of
logic to hide and show the toolbar and delecately manage focus states.
There also was no real capacity for any developer to extend the toolbar.
It also used to be completely outside of our `atomicEdit` system and was a
legacy of having raw access to contenteditable controls (since it all used
to be directly inside of the contenteditable)
Finally it was difficult to declaratively define things because the
`innerState` of the Contenteditable was inconsistently used and its
lifecycle not properly thought through. This fixed several lifecycle bugs
with that.
Along the way several of the DOMUtils methods were also subtly not
functional and fixed.
The Toolbar is now broken apart into separate logical units.
There are now `ContentedtiableExtension`s that declare what should be
displayed in the toolbar at any given moment.
They define a method called `toolbarComponentData`. This is a pure
function of the state of the `Contenteditable`. If selection and content
conditions look correct, then that method will return a component to
render. This is how we declaratively define whether a toolbar should be
visible or not instead of manually setting `hide` & `show` bits.
There is also a `toolbarButtons` method that declaratively defines buttons
that can go in the new `<ToolbarButtons>` component.
The `ToolbarButtonManager` takes care of extracting these and binding the
correct editorAPI context.
Now the `<LinkEditor>` is a separate component from the `<ToolbarButtons>`
instead of being smashed together.
The `LinkManager` takes care of declaring when the `LinkEditor` should be
displayed and has properly bound methods to update the `contenteditable`
through the standard `atomicEdit` interface.
If users have additional contenteditable popup plugins (like displaying
extra info on a name or some content in the composer), they can now
implement the `toolbarComponentData` api and declaratively define that
information based on the state of the contenteditable.
Test Plan: TODO
Reviewers: bengotow, juan
Reviewed By: bengotow
Differential Revision: https://phab.nylas.com/D2442
Summary:
Related to #320, #494, #515, #553
Ignore newlines and returns in HTML, they can be inside tags
Allow all attributes so that paste from excel looks nice
Never let someone paste a `contenteditable` attribute
Update specs
Test Plan: Run new specs
Reviewers: juan, evan
Reviewed By: evan
Differential Revision: https://phab.nylas.com/D2309
Summary:
- Adds button inside the message list to print the thread
- Adds cmdctrl-p binding to print thread
- Adds new action and new internal_package to listen to this action.
- Creates a standalone browser window with current thread html, and removes all
collapsed messsages from the print view
Test Plan: - Manual
Reviewers: evan, bengotow
Reviewed By: bengotow
Differential Revision: https://phab.nylas.com/D2310
- Reload the menu after changing keymap sets
- Do not allow accelerators in the menu like "z", because they do not go through selector-based command matching and always fire into the window.
- Do not match `cmdctrl` to both `cmd` and `ctrl` on the Mac. Just `cmd`
- Re-order `shift-delete` mapping to `core:cut`, because it causes the menu to have no binding on Mac OS X
Summary:
Can select all, deselect-all, read, unread, starred, unstarred.
Yes, it's not REALLY select "all", but it uses the items in the current
`retainedRange`. This is actually similar to what gmail does (only selects
on the first page of a 100).
Test Plan: new test
Reviewers: juan, bengotow
Reviewed By: bengotow
Differential Revision: https://phab.nylas.com/D2241
Summary:
Refactor keymaps to wrap components with a <KeymapHandlers /> component.
This more Reactful way of declaring keyback handlers prevents us from
needing to subscribe to `atom.commands`
Test Plan: new tests
Reviewers: bengotow, juan
Reviewed By: bengotow
Differential Revision: https://phab.nylas.com/D2226
Summary:
Move sync workers and Edgehill token checks to work window
Move the task queue and database setup to the work window
Move ContactStore background refresh to work window
Store the task queue in the database
WIP
The TaskQueue now puts tasks in the database instead of in a file, which also means it can be observed
Move all delta sync and initial sync to a package, make NylasSyncStore which exposes read-only sync state
DraftStore no longer reads task status. Once you set the "sending" bit on a draft, it never gets unset. But that's fine actually.
If your package lists windowTypes, you *only* get loaded in those windowTypes. If you specify no windowTypes, you get loaded in the root window.
This means that onboarding, worker-ui, worker-sync, etc. no longer get loaded into the main window
ActivitySidebar has a special little store that observes the task queue since it's no longer in the window
Move "toggle component regions" / "toggle react remote" to the Developer menu
Move sync worker specs, update draft store specs to not rely on TaskQueue at all
Test Plan: Run existing tests, all pass
Reviewers: dillon, evan
Reviewed By: evan
Differential Revision: https://phab.nylas.com/D1936
Summary:
Things still to come:
- General tab
- Signatures tab (potentially remove and land)
Adding emacs things to gitignore
Adding progress. iterating on html/css is incredibly painful
Added layout for accounts page.
Adding layout for appearance page
layout for shortcuts preferences page
adding layount for notifications menu
Adding signatures layout
WIP
WIP - tab switching, accounts tab
WIP ALL THE THINGS
Keymap template support (Gmail / outlook, etc.)
Test Plan: No tests atm
Reviewers: evan
Differential Revision: https://phab.nylas.com/D1890
Summary:
The TokenizingTextField has several new optional props, including onEdit, which enables
editing of the tokens and tokenIsInvalid, which allows you to make tokens red, while still
accepting them as tokens.
When you go to send a message with invalid recipients it won't let you until you remove/
edit them.
Hotloading
Edit chips, keymappings not through command registry, 7 new tests for editing chips
Test Plan: Run 7 new tests
Reviewers: evan
Reviewed By: evan
Differential Revision: https://phab.nylas.com/D1825
Summary:
The popover class now will adjust itself until it fits within the window
frame. You don't see the intermediate state in the double render.
Test Plan: edgehill --test
Reviewers: bengotow
Reviewed By: bengotow
Differential Revision: https://phab.nylas.com/D1795
Summary:
The new, styled folder and label picker!
Some highlights:
- Folder picker has custom icons and a divider
- Label picker has checkboxes with off, checked, and intermediate state
- Extracted LabelColorizer out of mail-label
- Search will bold the results it found
- Fixes to Tooltip to prevent it displaying at invalid moments
- Keyboard UX improvements to Menu
Test Plan: coming soon
Reviewers: bengotow
Reviewed By: bengotow
Differential Revision: https://phab.nylas.com/D1790
Summary:
This is the initial diff for the label picker UI. This is all of the
functionality and none of the CSS.
Test Plan: todo
Reviewers: bengotow
Reviewed By: bengotow
Subscribers: sdw
Differential Revision: https://phab.nylas.com/D1761
Summary:
Adding spec for message list star. Fixing multi-select in 3-pane starring
I didn't write a spec for thread-list because the thread-list-spec appears to be broken (returns immedietly at the top). I spent ~15 minutes attempting to fix but didn't make much progress
Test Plan: Added spec to message list
Reviewers: bengotow
Reviewed By: bengotow
Maniphest Tasks: T1957
Differential Revision: https://phab.nylas.com/D1697
Summary:
- We now make verbose log files continuously as you use the app
- We ship the logs to LogStash via S3 when an exception occurs
- We log the DatabaseStore, ActionBridge and Analytics packages
- We are now on the latest version of Electron 0.26.0
- We are now on Chrome 42 and io.js 1.4.3
- We should be setup to use ASAR soon.
Update atom.sh to reflect that we're now electron
oniguruma was unnecessary
correctly find log files that haven't been shipped yet
Fix a small issue with nodeIsVisible after upgrade to Chrome 42
Delete old logs, better logging from database store, don't ship empty logs
Test Plan: Run existing tests
Reviewers: evan
Reviewed By: evan
Differential Revision: https://phab.nylas.com/D1531
Summary:
Focused Content Store should notify observers when focused items change, not just when they're reassigned
Popovers should have a `direction` and optional event onOpened
Menu divider documentation was wrong, menus should support checked items by default
Pressing escape in a popover's input should dismiss the popover
Other changes
Remove specs that make no sense anymore
Small tweak to report build breaking. Shouldn't happen often ;)
Test Plan: Run tests, which will now phone home if they break
Reviewers: evan
Reviewed By: evan
Differential Revision: https://review.inboxapp.com/D1493
Summary:
tests on the schemas
build input elements
form builder pulls data
grouping by row
salesforce object store
salesforce api logic
successfully pulling salesforce objects into db
object store saving to db
refactoring tokenizing text field
full documented tokenizing text field with specs
linking in object picker component
converting generated form to a controlled input
form change handlers for controlled inputs
Salesforce object creator store
new way of opening windows
removed atom.state.mode
create new salesforce object creator in new window
form creator loading in popup with generated form
generated form renders select and multiselcet and textarea
add checkbox
creating related objects
windnows know when others close
remove debugger statements
form submission
converting data for salesforce posting
hot window loading
new hot window registration
hot loading windows
actions for listening to salesforce objects created
generated form errors
error handling for salesforce object creator
rename saleforce object form store
display errors to form
submitting state passed through
properly posts objects to Salesforce
change name to salesforce object form
add deep clone
use formItemEach
styling for Salesforce form creator
salesforce required fields come back and populate form
generated form loads related objects into fields
remove console logs and fix sales schema adapter test
fix task queue and formbuilder specs
fix action bridge spec
fix tokenizing text field spec
fix draft store and tokenizing proptypes
fix linter issues
fix tokenizing text field bug
rename to refresh window props
remove console.log
Test Plan: edgehill --test
Reviewers: bengotow
Reviewed By: bengotow
Differential Revision: https://review.inboxapp.com/D1425
Summary:
This diff provides multi-selection in the thread list powered by a new ModelList component that implements selection on top of ListTabular (or soon another List component). It includes business logic for single selection, shift selection, command-click selection, etc.
This diff also improves the performance of DatabaseView by assessing whether updates are required based on specific database changes and skipping queries in many scenarios.
WIP
WIP
Move selection into modelView instead of store
WIP
Preparing to convert to ModelList mixin
Make ThreadStore => ThreadListStore
Break the DraftStore in two (new DraftListStore) to avoid keeping all drafts in all windows
Get rid of unread instance variable in favor of getter that falls through to isUnread()
Much smarter logic in DatabaseView to prevent needless queries (especially counts and full invalidation of retained range)
Squashed commit of the following:
commit 486516b540e659735675765ca8b20d8a107ee2a9
Author: Ben Gotow <bengotow@gmail.com>
Date: Tue Apr 7 17:30:23 2015 -0700
Invalidate the retained range debounced
commit 7ac80403f52d108696c555f79c4c687d969f0228
Author: Ben Gotow <bengotow@gmail.com>
Date: Tue Apr 7 17:30:16 2015 -0700
Wait until after the view updates to move focus
commit 88d66eb19a9710847ff98bea22045bb686f30cc6
Author: Ben Gotow <bengotow@gmail.com>
Date: Tue Apr 7 17:28:01 2015 -0700
Bail out early when loading data if a reload has been requested
commit a49bedc44687040f7c675ff298376917a0b5fdcb
Author: Ben Gotow <bengotow@gmail.com>
Date: Tue Apr 7 16:38:58 2015 -0700
Log query data when in a query is being logged
commit c64a9e02f9072fd30edb98c45be581d6ac00c48a
Author: Ben Gotow <bengotow@gmail.com>
Date: Tue Apr 7 16:38:45 2015 -0700
Mark thread and messages as read in parallel instead of in sequence
commit 4b227100a795e20257cda0d60b00cc75b0000b0f
Author: Ben Gotow <bengotow@gmail.com>
Date: Tue Apr 7 16:38:32 2015 -0700
Don't load tags with hardcoded IDs from the database, and load them in parallel instead of in sequence
commit aeb7f1d646786cfa1c247fe78ce5467da07c4446
Author: Ben Gotow <bengotow@gmail.com>
Date: Tue Apr 7 16:37:54 2015 -0700
Pass objects instead of ids to thread methods—since we always have the most current thread anyway, this makes things a bit faster
commit e70889d1d05ece81a081b8b3f27b62491429b6f9
Author: Ben Gotow <bengotow@gmail.com>
Date: Mon Apr 6 16:41:49 2015 -0700
[icon] Paper airplanes
Restyle account sidebar, optimize tag count queries a bit more
Fix initialization issue with webkit image mask
Can't compare dates with is/isnt
Assets for check boxes
Bug fixes
Wrap ModelList instead of providing props
Verbose mode for database view
Fix existing specs
Six new specs covering invalidateIfItemsInconsistent
Test Plan: Run 40+ new tests
Reviewers: evan
Reviewed By: evan
Differential Revision: https://review.inboxapp.com/D1410
Summary:
add more Salesforce states
more salesforce sidebar
extract focused contacts into its own store
fullcontact store fixes
extract thread participants to own module
typo
Test Plan: edgehill --test
Reviewers: bengotow
Reviewed By: bengotow
Differential Revision: https://review.inboxapp.com/D1326
Summary:
fix(keymappings): Enter to focus item, logout works now
Minor fix for some problems with activity bar
Fix tabindex = 1 where tabindex should be =-1
Remove idgen that was causing footers to be replaced
WIP
Draft store extension hooks
Test Plan: Run tests
Reviewers: evan
Reviewed By: evan
Differential Revision: https://review.inboxapp.com/D1320
Summary:
feat(mode-switch): almost working
Remove SheetStore in favor of bigger WorkspaceStore
Back button for mode switching
Test Plan: Tests WIP
Reviewers: evan
Reviewed By: evan
Differential Revision: https://review.inboxapp.com/D1292
Summary: Adds the draft list using a refactored list-tabular class. Also fixes several draft bugs that appeared after allowing editing.
Test Plan: Run tests (need to test new ListTabular component ASAP)
Reviewers: evan
Reviewed By: evan
Differential Revision: https://review.inboxapp.com/D1272