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

feat: Hackday: make beam modals draggable #951

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

bsholmes
Copy link
Contributor

using a custom selector using ids so that only the header is draggable which prevents issues when using input elements in the modal.

Lots of extraneous changes from linting

@bsholmes bsholmes reopened this Sep 18, 2023
Copy link
Contributor

@stephenh stephenh left a comment

Choose a reason for hiding this comment

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

Seems good to me! @bdow any concerns about pulling in react-draggable?

(Not saying we should re-implement the dragging natively, for sure we should use a package, but also just balancing "is dragging must have ask from UX atm?" vs. "yet another dependency in package.json".)

@bdow
Copy link
Contributor

bdow commented Sep 19, 2023

Seems good to me! @bdow any concerns about pulling in react-draggable?

I don't really have any concerns about react-draggable. I do see that react-aria has a (useDrag)[https://react-spectrum.adobe.com/react-aria/useDrag.html] hook, though I don't know much about it. Not sure if we could just use that? Maybe that's not enough right out of the box.

Copy link
Contributor

@bdow bdow left a comment

Choose a reason for hiding this comment

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

@bsholmes - did you get sign off from the Design team about this? I would like to get their feedback around the UX of this. Right now, there is no indication that this can be dragged, whether that is by having an explicit "drag handle", or changing the cursor to look like it can grab and is grabbing while dragging. Could be worth providing some user feedback.

@bsholmes
Copy link
Contributor Author

@bsholmes - did you get sign off from the Design team about this? I would like to get their feedback around the UX of this. Right now, there is no indication that this can be dragged, whether that is by having an explicit "drag handle", or changing the cursor to look like it can grab and is grabbing while dragging. Could be worth providing some user feedback.

I did not, I'm not sure this is functionality we should even have but I thought creating a PR would at least get some discussion going. I did try a drag handle design and decided against it since it was a design change and I wasn't sure about it. I like the cursor change idea. Will get some design feedback before proceeding.

Copy link
Contributor

@bdow bdow left a comment

Choose a reason for hiding this comment

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

@bsholmes - I noticed that there are 3 different elements with the id="draggable" on them. It doesn't appear to be causing issues with the react-draggable library, but we should not have duplicate id properties within the DOM.

Screenshot 2023-09-19 at 1 49 29 PM

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.

None yet

3 participants