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

Resize #17

Closed
argyleink opened this issue Aug 8, 2018 · 9 comments · Fixed by #569
Closed

Resize #17

argyleink opened this issue Aug 8, 2018 · 9 comments · Fixed by #569
Labels
⚡️ feature New tricks for the tool-palette

Comments

@argyleink
Copy link
Collaborator

height/width/intrinsic/extrinsic

@argyleink argyleink added the ⚡️ feature New tricks for the tool-palette label Aug 8, 2018
@argyleink
Copy link
Collaborator Author

@argyleink
Copy link
Collaborator Author

Spent 5 minutes trying out resize and i think with a few ux tweaks it could be super viable. need to try it out more, make a branch and give it a shot.

  • remove transition: all while dragging
  • remove hover listeners while dragging

https://www.w3schools.com/cssref/css3_pr_resize.asp

resize

@mayank99
Copy link
Contributor

mayank99 commented Sep 21, 2022

Hey Adam! Did you ever get around to playing with this a bit more? Would love to try my hand at this (and maybe open a PR?) if you can point me in the right direction. 🤓

@argyleink
Copy link
Collaborator Author

I didnt no, though I think about it often!

Here's some leads to help you kick it off:

  • selected elements are given the [data-selected="true"] attribute and could have the resize styles added to here
  • here's where selected elements are given that attribute
  • here's where hover guards are, so elements bind the cursor dont highlight while resizing
  • could add a mousedown or pointerdown event listener here to try and infer if the element is being resized?
  • adding overflow: hidden is a bummer, it'll probably have side effects in some ways. the betters solution is likely to put events on the handle dots of the pink bounding box. then we could lock the axis they're dragging, complete the visual cues (like those circles look like handles already..), and ultimately give the design like experience instead of the resize: both experience.

lemme know how serious you are in doing this! i could video chat with you, walk you through a few things, and help you along 🙂

@mayank99
Copy link
Contributor

Thanks for the response! The code actually looks much more than approachable than I was expecting 👀 and I agree custom events would be better than resize.

I'm down for a chat some time in the next few days. What would be the best place to reach out?

@EllyLoel
Copy link

This may be user error but when trying to resize elements nothing seems to happen. I've tried with different tools (position, measure, etc.), I've tried both in the playground and with the extension, and I've also tried in different browsers. Oh and I also tried with an external mouse and the built in trackpad on my MacBook.

A screen capture demonstrating the VisBug resize feature not working

@mayank99
Copy link
Contributor

@EllyLoel You're right, it's not working for me either 😕 must be a recent regression because I remember using it fairly recently.

@argyleink
Copy link
Collaborator Author

hm, thanks for logging the error! a recent build went out with a new plugin, and the build was uploaded by a github action (which was broken for a bit while an api shifted around). maybe something around that happened?

looking at the console:

const handlesEl = e.path.find(el => el.tagName === 'VISBUG-HANDLES')
// e.path is undefined, so find can't be called/found

i'll check more later, but that's what i can see now.

@argyleink
Copy link
Collaborator Author

fixed it, built deploying

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚡️ feature New tricks for the tool-palette
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants