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.
Fixes #195
This is an attempt at addressing #195. The demo app seems to work, but I had a couple issues I'll need help with:
ReactDOM.render()
to the newercreateRoot().render()
API to fix the deprecation warning, the initial attempt to drag a mosaic window didn't work. However, if I added a new tile before trying to drag, or just tried to drag twice, that did work as expected. Not sure what's going on there, but seems like it might be outside the scope of an upgrade so I left it asReactDOM.render()
for now.Changes proposed in this pull request:
useDrag
,useDrop
) andcontextTypes
->useContext
.??
token in a newer version of a dependency)Reviewers should focus on:
A couple minor changes to appease TypeScript, like
$set: null
->$set: undefined
, and addition of!
inmosaicActions.updateTree(createDragToUpdates(mosaicActions.getRoot()!, ownPath, destinationPath, position));
Changes to
export
ed components — some removals, and some changes from class to function components. Although some of these exports seem like they were only for HMR compatibility and not really intended to be part of the public API, this change may necessitate a major version bump to avoid breaking consumers who might've depended on them in some way.Screenshot
N/A