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

[6.x] Replace gridster with react-grid-layout (#13853) #14242

Merged

Conversation

stacey-gammon
Copy link
Contributor

@stacey-gammon stacey-gammon commented Oct 2, 2017

backports #13853

  • Initial check-in to replace gridster with react-grid-layout and reactify panels

  • This is a combination of 3 commits.

This is the 1st commit message:

Add margin of error to test determining panel widths

This is the commit message #2:

use real kibana version when creating panel data. Will make future conversions easier.

This is the commit message #3:

Fix lint errors

  • Add margin of error to test determining panel widths

use real kibana version when creating panel data. Will make future conversions easier.

Move default height and width to dashboard_constants so those that need it don't end up including extra stuff like ui/chrome

  • Remove unnecessary _.once when creating react directives in dashboard.js

  • Remove unnecessary constructors

  • Use componentDidMount instead of componentWillMount bc of async calls, and handle case where destroyEmbeddable is not defined.

  • Remove unnecessary null in classNames

  • Use loads defaultsDeep instead of Object.assign

  • use render* instead of get* for functions returning an element

  • use relative css paths

  • Use local import path

  • Switch to local imports and remove need for plugins path in jest tests

  • Improve accessibility of max/min panel toggle icon

  • remove unused css

Had to implement this via code

  • disable eslint rule for setState in componentDidMount

Am not aware of a better way to handle this, aside from switching to
redux, since it’s recommended not to put async calls in
componentWillMount. Since I plan to investigate redux next, disabling
for now. Open to other’s opinions on the matter.

  • Use native map instead of lodash

  • Have the grid handle setting the z-indexes of the right reactgriditem

  • Make the draggable handle the title, not the whole heading

Otherwise the drag event often takes over click events when trying to
open the panel options menu and it gets really annoying.

  • Change from click to mouse down detector in KuiOutsideClickDector so drags also close pop ups.

  • Fix mistaken commit

Code from the redux PR snuck into this one.

  • Run getEditPath and getTitle async calls in parallel - no need to wait on the return value of one before starting the others.

  • Fix tests: update snapshots, add promise returns.

  • version being added to panelData in the wrong spot caused isDirty flag to be true when it shouldn't be

  • Fix unmounting/mounting problem with panels due to view/edit mode switch

  • Fix bug where panels get squashed to one side when view mode is changed while a panel is expanded.

  • Update snapshots to match wrong view mode comparison

  • Improve naming of a variable

  • Fix issue with pop over hiding behind tile maps

  • Previous panel.js included ui/doc_table and ui/visualize - needed to include them in the chain for Dash only mode but not in that file.

  • Fix bad merge: remove baseline screenshots

* Initial check-in to replace gridster with react-grid-layout and reactify panels

* # This is a combination of 3 commits.
# This is the 1st commit message:
Add margin of error to test determining panel widths

# This is the commit message #2:

use real kibana version when creating panel data. Will make future conversions easier.

# This is the commit message #3:

Fix lint errors

* Add margin of error to test determining panel widths

use real kibana version when creating panel data. Will make future conversions easier.

Move default height and width to dashboard_constants so those that need it don't end up including extra stuff like ui/chrome

* Remove unnecessary _.once when creating react directives in dashboard.js

* Remove unnecessary constructors

* Use componentDidMount instead of componentWillMount bc of async calls, and handle case where destroyEmbeddable is not defined.

* Remove unnecessary null in classNames

* Use loads defaultsDeep instead of Object.assign

* use render* instead of get* for functions returning an element

* use relative css paths

* Use local import path

* Switch to local imports and remove need for plugins path in jest tests

* Improve accessibility of max/min panel toggle icon

* remove unused css

Had to implement this via code

* disable eslint rule for setState in componentDidMount

Am not aware of a better way to handle this, aside from switching to
redux, since it’s recommended not to put async calls in
componentWillMount.  Since I plan to investigate redux next, disabling
for now. Open to other’s opinions on the matter.

* Use native map instead of lodash

* Have the grid handle setting the z-indexes of the right reactgriditem

* Make the draggable handle the title, not the whole heading

Otherwise the drag event often takes over click events when trying to
open the panel options menu and it gets really annoying.

* Change from click to mouse down detector in KuiOutsideClickDector so drags also close pop ups.

* Fix mistaken commit

Code from the redux PR snuck into this one.

* Run getEditPath and getTitle async calls in parallel - no need to wait on the return value of one before starting the others.

* Fix tests: update snapshots, add promise returns.

* version being added to panelData in the wrong spot caused isDirty flag to be true when it shouldn't be

* Fix unmounting/mounting problem with panels due to view/edit mode switch

* Fix bug where panels get squashed to one side when view mode is changed while a panel is expanded.

* Update snapshots to match wrong view mode comparison

* Improve naming of a variable

* Fix issue with pop over hiding behind tile maps

* Previous panel.js included ui/doc_table and ui/visualize - needed to include them in the chain for Dash only mode but not in that file.

* Fix bad merge: remove baseline screenshots
@stacey-gammon
Copy link
Contributor Author

I think this is the same flaky test I've run into before with $scope.$watchMulti

Jenkins, test this

@stacey-gammon stacey-gammon merged commit b2ffeb7 into elastic:6.x Oct 2, 2017
@stacey-gammon stacey-gammon deleted the 6.x/react/replace-gridster branch October 2, 2017 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant