[6.x] Replace gridster with react-grid-layout (#13853) #14242
Merged
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.
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
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
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