-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
React 16 upgrade #1116
Merged
Merged
React 16 upgrade #1116
Changes from 33 commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
bbce3f9
upgrade react context menu to v2.9
6ff153f
Merge branch 'master' into ql-context-menu-upgrade
874819f
add unit tests
c9f0e55
update unit test
c792018
remove unecessary id set
5045270
remove unnecessary function
19c825d
update migration doc
c82e21a
catchup master
82a0020
Merge branch 'ql-context-menu-upgrade' into am-react-16
amanmahajan7 656f3cb
Upgrade dependencies
amanmahajan7 12d2c11
Fix example list on the home page
amanmahajan7 239e7bc
Fix Navbar URL
amanmahajan7 2449ad1
Remove react-addons-perf
amanmahajan7 502c456
Delete separate documentation and example page. A single page is now …
amanmahajan7 b0adbfe
Update peer dependencies
amanmahajan7 5422d43
Upgrade enzyme to 3.x
amanmahajan7 7ad6892
Remove examples and documentation entries
amanmahajan7 acca333
Upgrade jasmine-enzyme to the latest version
amanmahajan7 743b357
Upgrade react-input-autosize to the latest version
amanmahajan7 a210eaf
Cleanup navigation links
amanmahajan7 b1b9005
Fix unit tests
amanmahajan7 0b8da0b
Do not use private node prop
amanmahajan7 cbe9bf8
Fix more unit tests
amanmahajan7 c9d1764
Upgrade react-select to the latest version
amanmahajan7 8a85e67
Remove explicit react-input-autosize dependency
amanmahajan7 5c4782b
update react-dnd
amanmahajan7 f66c8d3
Fix component docs
amanmahajan7 c108d39
Fix invalid markup
amanmahajan7 7f4a2a2
Resolve conflicts after next catchup
amanmahajan7 ed78e6e
Deleted performance tests as react-addons-perf is no longer supported
amanmahajan7 a1b9c6a
Cleanup routes and fix key warnings
amanmahajan7 475a4ac
Fix unit tests - find cell again after each operation as caching does…
amanmahajan7 431316b
Temporarily disable failing test
amanmahajan7 50af34d
Remove unsupported exact prop
amanmahajan7 0a2be3a
Use minified react scripts
amanmahajan7 d8dedd8
Use path prop to create nested routes
amanmahajan7 a94e2aa
Removed incorrect test
amanmahajan7 8016c00
Remove unused imports
amanmahajan7 3c75949
Use keymirror package instead of fbjs/lib/keyMirror
amanmahajan7 a4b3c87
Use shallowequal package instead of fbjs/lib/shallowEqual
amanmahajan7 305367b
Add html5DragDropContext to initilize HTML5Backend only once
amanmahajan7 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# EditorConfig helps developers define and maintain consistent | ||
# coding styles between different editors and IDEs | ||
# http://editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
|
||
# Change these settings to your own preference | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
# We recommend you to keep these unchanged | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -86,7 +86,7 @@ describe('Grid', function() { | |
}; | ||
|
||
this.componentWrapper = this.createComponent(); | ||
this.component = this.componentWrapper.node; | ||
this.component = this.componentWrapper.instance(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
}); | ||
|
||
it('should create a new instance of Grid', function() { | ||
|
@@ -109,7 +109,7 @@ describe('Grid', function() { | |
describe('for defaults props', function() { | ||
beforeEach(function() { | ||
const ToolBarStub = new StubComponent('Toolbar'); | ||
this.component = this.createComponent({ toolbar: <ToolBarStub /> }).node; | ||
this.component = this.createComponent({ toolbar: <ToolBarStub /> }).instance(); | ||
this.toolbarInstance = TestUtils.findRenderedComponentWithType(this.component, ToolBarStub); | ||
this.toolbarInstance.props.onToggleFilter(); | ||
this.baseGrid = this.getBaseGrid(); | ||
|
@@ -131,7 +131,7 @@ describe('Grid', function() { | |
describe('for a given row height prop', function() { | ||
beforeEach(function() { | ||
const ToolBarStub = new StubComponent('Toolbar'); | ||
this.component = this.createComponent({ toolbar: <ToolBarStub />, rowHeight: 40 }).node; | ||
this.component = this.createComponent({ toolbar: <ToolBarStub />, rowHeight: 40 }).instance(); | ||
this.toolbarInstance = TestUtils.findRenderedComponentWithType(this.component, ToolBarStub); | ||
this.toolbarInstance.props.onToggleFilter(); | ||
this.baseGrid = this.getBaseGrid(); | ||
|
@@ -153,7 +153,7 @@ describe('Grid', function() { | |
describe('for given row and header height props', function() { | ||
beforeEach(function() { | ||
const ToolBarStub = new StubComponent('Toolbar'); | ||
this.component = this.createComponent({ toolbar: <ToolBarStub />, rowHeight: 40, headerRowHeight: 50, headerFiltersHeight: 60 }).node; | ||
this.component = this.createComponent({ toolbar: <ToolBarStub />, rowHeight: 40, headerRowHeight: 50, headerFiltersHeight: 60 }).instance(); | ||
this.toolbarInstance = TestUtils.findRenderedComponentWithType(this.component, ToolBarStub); | ||
this.toolbarInstance.props.onToggleFilter(); | ||
this.baseGrid = this.getBaseGrid(); | ||
|
@@ -176,7 +176,7 @@ describe('Grid', function() { | |
describe('if passed in as props to grid', function() { | ||
beforeEach(function() { | ||
const ToolBarStub = new StubComponent('Toolbar'); | ||
this.component = this.createComponent({ toolbar: <ToolBarStub /> }).node; | ||
this.component = this.createComponent({ toolbar: <ToolBarStub /> }).instance(); | ||
this.toolbarInstance = TestUtils.findRenderedComponentWithType(this.component, ToolBarStub); | ||
}); | ||
|
||
|
@@ -207,7 +207,7 @@ describe('Grid', function() { | |
rowGetter: this.rowGetter, | ||
rowsCount: this._rows.length, | ||
width: 300 | ||
}).node; | ||
}).instance(); | ||
}); | ||
|
||
it('grid should be initialized with selected state of {rowIdx : -1, idx : -1}', function() { | ||
|
@@ -217,7 +217,7 @@ describe('Grid', function() { | |
|
||
describe('When row selection enabled', function() { | ||
beforeEach(function() { | ||
this.component = this.createComponent({ enableRowSelect: true}).node; | ||
this.component = this.createComponent({ enableRowSelect: true}).instance(); | ||
this.baseGrid = this.getBaseGrid(); | ||
this.selectRowCol = this.baseGrid.props.columnMetrics.columns[0]; | ||
}); | ||
|
@@ -302,7 +302,7 @@ describe('Grid', function() { | |
describe('Cell Navigation', function() { | ||
describe('when cell navigation is configured to default, none', function() { | ||
beforeEach(function() { | ||
this.component = this.createComponent({enableCellSelect: true}).node; | ||
this.component = this.createComponent({enableCellSelect: true}).instance(); | ||
}); | ||
|
||
describe('when on last cell in a row', function() { | ||
|
@@ -336,7 +336,7 @@ describe('Grid', function() { | |
|
||
describe('when cell navigation is configured to change rows', function() { | ||
beforeEach(function() { | ||
this.component = this.createComponent({cellNavigationMode: 'changeRow', enableCellSelect: true}).node; | ||
this.component = this.createComponent({cellNavigationMode: 'changeRow', enableCellSelect: true}).instance(); | ||
}); | ||
|
||
describe('when on last cell in a row that\'s not the last', function() { | ||
|
@@ -388,7 +388,7 @@ describe('Grid', function() { | |
|
||
describe('when cell navigation is configured to loop over cells in row', function() { | ||
beforeEach(function() { | ||
this.component = this.createComponent({cellNavigationMode: 'loopOverRow', enableCellSelect: true}).node; | ||
this.component = this.createComponent({cellNavigationMode: 'loopOverRow', enableCellSelect: true}).instance(); | ||
}); | ||
|
||
describe('when on last cell, looping enabled', function() { | ||
|
@@ -445,7 +445,7 @@ describe('Grid', function() { | |
const extraProps = { onCellSelected: this.noop, onCellDeSelected: this.noop }; | ||
spyOn(extraProps, 'onCellSelected'); | ||
spyOn(extraProps, 'onCellDeSelected'); | ||
this.component = this.createComponent(extraProps).node; | ||
this.component = this.createComponent(extraProps).instance(); | ||
}); | ||
|
||
describe('cell is selected', function() { | ||
|
@@ -489,7 +489,7 @@ describe('Grid', function() { | |
onRowsDeselected: function(deselectedRows) { | ||
self._deselectedRows = deselectedRows; | ||
} | ||
}}).node; | ||
}}).instance(); | ||
this.baseGrid = this.getBaseGrid(); | ||
this.selectRowCol = this.baseGrid.props.columnMetrics.columns[0]; | ||
}); | ||
|
@@ -550,7 +550,7 @@ describe('Grid', function() { | |
onRowsDeselected: function(deselectedRows) { | ||
self._deselectedRows = deselectedRows; | ||
} | ||
}}).node; | ||
}}).instance(); | ||
|
||
this.baseGrid = this.getBaseGrid(); | ||
this.selectRowCol = this.baseGrid.props.columnMetrics.columns[0]; | ||
|
@@ -587,7 +587,7 @@ describe('Grid', function() { | |
onRowsDeselected: function(deselectedRows) { | ||
self._deselectedRows = deselectedRows; | ||
} | ||
}}).node; | ||
}}).instance(); | ||
|
||
this.baseGrid = this.getBaseGrid(); | ||
this.selectRowCol = this.baseGrid.props.columnMetrics.columns[0]; | ||
|
@@ -656,7 +656,7 @@ describe('Grid', function() { | |
beforeEach(function() { | ||
const editableColumn = Object.assign({ editable: true }, this.columns[1]); | ||
this.columns[1] = editableColumn; | ||
this.component = this.createComponent({ columns: this.columns }).node; | ||
this.component = this.createComponent({ columns: this.columns }).instance(); | ||
}); | ||
|
||
describe('copy a cell value', function() { | ||
|
@@ -679,7 +679,7 @@ describe('Grid', function() { | |
const vCharacterKeyCode = 118; | ||
spyOn(this.testProps, 'onCellCopyPaste'); | ||
wrapper.setProps({ onCellCopyPaste: this.testProps.onCellCopyPaste }); | ||
this.component = wrapper.node; | ||
this.component = wrapper.instance(); | ||
this.component.setState({ | ||
textToCopy: 'banana', | ||
selected: { idx: 1, rowIdx: 5 }, | ||
|
@@ -801,7 +801,7 @@ describe('Grid', function() { | |
let wrapper = this.createComponent(); | ||
spyOn(this.testProps, 'onCellsDragged'); | ||
wrapper.setProps({ onCellsDragged: this.testProps.onCellsDragged }); | ||
this.component = wrapper.node; | ||
this.component = wrapper.instance(); | ||
this.component.setState({ | ||
selected: { idx: 1, rowIdx: 2 }, | ||
dragged: { idx: 1, rowIdx: 2, value: 'apple', overRowIdx: 6 } | ||
|
@@ -834,7 +834,7 @@ describe('Grid', function() { | |
const newColumns = Object.assign([], this.columns); | ||
newColumns.splice(2, 0, newColumn); | ||
wrapper.setProps({ columns: newColumns }); | ||
this.component = wrapper.node; | ||
this.component = wrapper.instance(); | ||
this.columns = this.component.state.columnMetrics.columns; | ||
}); | ||
|
||
|
@@ -853,7 +853,7 @@ describe('Grid', function() { | |
const newColumns = Object.assign([], this.columns); | ||
newColumns.splice(1, 1); | ||
wrapper.setProps({ columns: newColumns }); | ||
this.component = wrapper.node; | ||
this.component = wrapper.instance(); | ||
this.columns = this.component.state.columnMetrics.columns; | ||
}); | ||
|
||
|
@@ -921,7 +921,7 @@ describe('Grid', function() { | |
let wrapper = this.createComponent(); | ||
spyOn(this.testProps, 'onRowUpdated'); | ||
wrapper.setProps({ onRowUpdated: this.testProps.onRowUpdated }); | ||
this.component = wrapper.node; | ||
this.component = wrapper.instance(); | ||
this.component.setState({ selected: { idx: 3, rowIdx: 3, active: true } }); | ||
this.getCellMetaData().onCommit(this.buildFakeCellUodate()); | ||
}); | ||
|
@@ -1007,7 +1007,7 @@ describe('Grid', function() { | |
const editableColumn = Object.assign({ editable: true }, this.columns[0]); | ||
this.columns[0] = editableColumn; | ||
wrapper.setProps({ columns: this.columns }); | ||
this.component = wrapper.node; | ||
this.component = wrapper.instance(); | ||
}); | ||
|
||
it('should keep original metric information', function() { | ||
|
@@ -1025,7 +1025,7 @@ describe('Grid', function() { | |
|
||
beforeEach(function() { | ||
wrapper = this.createComponent(); | ||
this.component = wrapper.node; | ||
this.component = wrapper.instance(); | ||
this.tableElement = ReactDOM.findDOMNode(this.component); | ||
}); | ||
|
||
|
@@ -1036,7 +1036,7 @@ describe('Grid', function() { | |
describe('providing table width as prop', function() { | ||
beforeEach(function() { | ||
wrapper.setProps({ minWidth: 900 }); | ||
this.component = wrapper.node; | ||
this.component = wrapper.instance(); | ||
}); | ||
|
||
it('should set the width of the table', function() { | ||
|
@@ -1060,7 +1060,7 @@ describe('Grid', function() { | |
this.component = this.createComponent({rowsCount: this.rows.length, rowGetter: rowGetter, columns: columns, onRowClick: function(rowIdx, row, column) { | ||
self.rowClicked = {row, column}; | ||
self.rowClicks++; | ||
}}).node; | ||
}}).instance(); | ||
}); | ||
|
||
it('calls handler when row (cell) clicked', function() { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A single index page is now being used instead of three separate pages (index, examples, and documentation)