Skip to content

Conversation

@jkorn8
Copy link
Contributor

@jkorn8 jkorn8 commented Aug 19, 2024

Describe your changes

Added a draggable property to modal screens allowing you to move modals around the screen

Screenshots [Optional]

Issue ticket number and link:

Issue #740

Closes #740

Checklist before requesting a review

  • [✅] I have performed a self-review of my code
  • [✅] I have added tests
  • [✅] I have added a changeset pnpm changeset add
  • [✅] I have added example usage in the kitchen sink app

@jkorn8 jkorn8 linked an issue Aug 19, 2024 that may be closed by this pull request
@changeset-bot
Copy link

changeset-bot bot commented Aug 19, 2024

🦋 Changeset detected

Latest commit: 2b87085

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@ensembleui/react-framework Patch
@ensembleui/react-kitchen-sink Patch
@ensembleui/react-preview Patch
@ensembleui/react-starter Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

Visit the preview URL for this PR (updated for commit 2b87085):

https://react-kitchen-sink-dev--pr793-740-implement-dragga-mvpuq0xf.web.app

(expires Mon, 26 Aug 2024 20:45:16 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 6267897ade2ba783b6db70a53a60fc3946d625e9

Comment on lines +60 to +61
"dependencies": {
"react-draggable": "^4.4.6"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move to dev dependencies

Comment on lines +321 to +325
setBounds({
left: -targetRect.left + uiData.x,
right: clientWidth - (targetRect.right - uiData.x),
top: -targetRect.top + uiData.y,
bottom: clientHeight - (targetRect.bottom - uiData.y),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this do? Would be nice to have a comment here.

<Draggable
bounds={bounds}
disabled={false}
nodeRef={draggleRef}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if you have multiple draggable modals?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement draggable on modal

2 participants