Summary: After importing an uneven csv (not all rows have the same number of columns e.g. rows: [[1,2][3,4,5]]), deleting the last column would improperly delete data in rows with fewer columns. This is because we were slicing each row based on row.length - 1 which is not the same for all rows. Fixed this by creating a new variable newNumColumns which is columns.length - 1.
Test Plan: Added new test data with uneven data and added a test in table-data-source-spec for removeLastColumn on this uneven set.
Reviewers: juan
Reviewed By: juan
Subscribers: juan
Differential Revision: https://phab.nylas.com/D3133
Summary:
See https://phab.nylas.com/D3112 for full description
- Update EditorAPI.insertCustomComponent to take a pre-generated
anchorId
Test Plan: Unit tests + manual
Reviewers: bengotow, halla, jackie
Reviewed By: jackie
Differential Revision: https://phab.nylas.com/D3113
Summary:
- Add some docs to Table components
- Updates Table components to use a TableDataSource instead of accessing arrays, cleans up code a bit
- Add enzyme lib to have a cleaner and simpler api to write tests for React Components
- Updates decorators to extend from the BaseComponent instead of vanilla Component, this way instance methods are still available on composed components
Test Plan: - Unit tests
Reviewers: evan, bengotow
Reviewed By: bengotow
Differential Revision: https://phab.nylas.com/D2941