Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Conversation

Copy link
Contributor

@muuvmuuv muuvmuuv commented Aug 14, 2025

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

Copy link
Contributor 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

muuvmuuv reacted with thumbs up emoji
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right. Fixed it.

Copy link
Member

adumesny commented Aug 15, 2025
edited
Loading

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
Copy link
Contributor 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

Copy link
Member

@adumesny adumesny left a comment

Choose a reason for hiding this comment

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

thanks for the feature. I will tweak it further...

muuvmuuv reacted with rocket emoji
@adumesny adumesny merged commit cf5c0c7 into gridstack:master Aug 30, 2025
@muuvmuuv muuvmuuv deleted the feature/allow-resizeable-handle-custom-element branch August 31, 2025 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@adumesny adumesny adumesny left review comments

+1 more reviewer

@alexandervlim43 alexandervlim43 alexandervlim43 approved these changes

Reviewers whose approvals may not affect merge requirements
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Custom resize handle position

AltStyle によって変換されたページ (->オリジナル) /