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

Added the draggable property to modals #793

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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
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

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