Skip to content

Allow custom element resize handler #3142

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

muuvmuuv
Copy link

Description

This changes searches for a resize handler inside the widget host and uses it instead of creating one. I have tested that in our app and it works perfectly (currently patched our version).

I can extend the readme if you point me out where to add that.

Tests fail with this, which I think is an issue with how you setup the repo:

; yarn test
yarn run v1.22.22
$ yarn lint && vitest run
$ tsc --noEmit && eslint src/*.ts

Oops! Something went wrong! :(

ESLint: 8.38.0

ESLint couldn't find the config "@roots/eslint-config" to extend from. Please check that the name of the config is correct.

The config "@roots/eslint-config" was referenced from the config file in "/Users/marvin/Developer/_TMP/.eslintrc.cjs".

If you still have problems, please stop by https://eslint.org/chat/help to chat with the team.

error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Checklist

  • Created tests which fail without the change (if possible)
  • All tests passing (yarn test)
  • Extended the README / documentation, if necessary

closes: #3104

@muuvmuuv
Copy link
Author

I have no idea why it shows so many changes in types.ts

: this.host.querySelector(this.option.element)
} else {
this.el = document.createElement('div');
this.el.classList.add('ui-resizable-handle');
Copy link
Member

Choose a reason for hiding this comment

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

you probably should always do this. also if querySelector() fails, you still want to create our own div flow

Copy link
Author

Choose a reason for hiding this comment

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

Right. Fixed it.

@adumesny
Copy link
Member

adumesny commented Aug 15, 2025

I have no idea why it shows so many changes in types.ts

looks like line ending formatting change (ignore white space shows just the few lines you added). I used to be on windows and likely the difference (I assume you're on mac ? )

@adumesny adumesny changed the title Allow nested resize handler Allow custom element resize handler Aug 15, 2025
@muuvmuuv
Copy link
Author

I have no idea why it shows so many changes in types.ts

looks like line ending formatting change (ignore white space shows just the few lines you added). I used to be on windows and likely the difference (I assume you're on mac ? )

Yes, yeah my VS Code and git is configured to Force LF endings. I can change that later

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.

Custom resize handle position
3 participants