- When prop specified to not allow empty selection it should also
prevent it from being cleared when pressing Esc while focusing the list
- Adds a default value to the edit item input
- Updates specs
- Updates styles
Summary:
Adds the new Account preferences page. This consists of two major React components,
PreferencesAccountList and PreferencesAccountDetails, both of which use EditableList.
I added a bunch of fixes and updated the API for EditableList, plus a bit of
refactoring for PreferencesAccount component, and a bunch of CSS so its a big diff.
The detailed changelog:
Updates to EditableList:
- Fix bug updating selection state when arrows pressed to move selection
- Add new props:
- allowEmptySelection to allow the list to have no selection
- createInputProps to pass aditional props to the createInput
- Add scroll region for list items
- Update styles and refactor render methods
Other Updates:
- Updates Account model to hold aliases and a label
- Adds getter for label to default to email
- Update accountswitcher to display label, update styles and spec
- Refactor PreferencesAccounts component:
- Splits it into smaller components,
- Removes unused code
- Splits preferences styelsheets into smaller separate stylesheet for
account page. Adds some updates and fixes (scroll-region padding)
- Update AccountStore to be able to perform updates on an account.
- Adds new Action to update account, and an action to remove account to
be consistent with Action usage
- Adds components for Account list and Aliases list using EditableList
Test Plan: - All specs pass, but need to write new tests!
Reviewers: bengotow, evan
Reviewed By: bengotow
Differential Revision: https://phab.nylas.com/D2332
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:
- Generic list component wich supports adding, editing and removing
string-like items or components
- Needs some css love
Test Plan: - Unit tests.
Reviewers: evan, bengotow
Reviewed By: bengotow
Differential Revision: https://phab.nylas.com/D2322
comment
Adding test harness
Using key strokes in main window test
Tests work now
Clean up argument variables
Rename list manager and get rid of old spec-helper methods
Extract out time overrides from spec-helper
Spectron test for contenteditable
fix spec exit codes and boot mode
fix(spec): cleanup N1.sh and make specs fail with exit code 1
Revert tests and get it working in window
Move to spec_integration and add window load tester
Specs pass. Console logs still in
Remove console logs
Extract N1 Launcher ready method
Make integrated unit test runner
feat(tests): adding integration tests
Summary:
The /spectron folder got moved to /spec_integration
There are now unit tests (the old ones) run via the renamed
`script/grunt run-unit-tests`
There are now integration tests run via the command `script/grunt
run-integration-tests`.
There are two types of integration tests:
1. Tests that operate on the whole app via Selenium/Chromedriver. These
tests have access to Spectron APIs but do NOT have access to any JS object
running inside the application. See the `app-boot-spec.es6` for an example
of these tests. This is tricky because we want to test the Main window,
but Spectron may latch onto any other of our loading windows. Code in
`integration-helper` give us an API that finds and loads the main window
so we can test it
2. Tests that run in the unit test suite that need Spectron to perform
integration-like behavior. These are the contentedtiable specs. The
Spectron server is accessed from the app and can be used to trigger
actions on the running app, from the app. These tests use the
windowed-test runner so Spectron can identify whether the tests have
completed, passed, or failed. Unfortunately Spectron can't access the logs
, nor the exit code of the test script thereby forcing us to parse the
HTML DOM. (Note this is still a WIP)
I also revamped the `N1.sh` file when getting the launch arguments to work
properly. It's much cleaner. We didn't need most of the data.
Test Plan: new tests
Reviewers: juan, bengotow
Differential Revision: https://phab.nylas.com/D2289
Fix composer specs
Tests can properly detect when Spectron is in the environment
Report plain text output in specs
fixing contenteditable specs
Testing slow keymaps on contenteditable specs
Move to DOm mutation
Spell as `subtree` not `subTree`
Summary: This uses DOM mutation observers instead of `onInput`
Test Plan: manual and new integration tests
Reviewers: bengotow, juan
Differential Revision: https://phab.nylas.com/D2291
feat(contenteditable): add bold, underline, etc keymaps
Moving button extensions out of toolbar
Extracted floating toolbar buttons
Convert ContenteditableExtension to new spec
Update packages to use new callback signature
Fix specs
Summary:
- Fixes T5819 issues
- Adds ContenteditbalePlugin mechanism to allow extension of Contenteditable
functionality, and completely removes lifecycleCallbacks from Contenteditable
- Refactors list functionality outside of Contenteditable and into a plugin
- Updates ComposerView to apply DraftStoreExtensions through a ContentEditablePlugin
- Moves spell checking logic outside of Contenteditable into the spellcheck package
Fixes T5824 (atom.assert)
Fixes T5951 (shift-tabbing) bullets
Test Plan: - Unit tests and manual
Reviewers: evan, bengotow
Reviewed By: bengotow
Maniphest Tasks: T5951, T5824, T5819
Differential Revision: https://phab.nylas.com/D2261
Summary:
ignores composition event commands until they're done. We then simply
update the new state after that happens.
Some additional refactoring:
- The <Contenteditable /> prop is 'value' instead of 'html' to make it
look more like a standard React controlled input
- Removed `filters` prop and `footerElements` prop from Contenteditable.
These could easily be moved into the composer (where they belong).
- Moved contenteditable and a few of its helper classes into their own
folder.
- Moved `UndoManager` up out of the `flux` folder into `src`. Currently
undo/redo is only in the composer when all contenteditables should have
the basic funcionality. Will refactor this later.
- Fix tests
Test Plan: manual
Reviewers: bengotow
Reviewed By: bengotow
Differential Revision: https://phab.nylas.com/D2211
Summary:
Adding signature support in preferences
Extracting out DraftStore extensions from the Contenteditable component
Moved Contenteditable to the nylas component kit
Build react remote window selection synchronization.
Test Plan: todo
Reviewers: bengotow
Reviewed By: bengotow
Differential Revision: https://phab.nylas.com/D2204