Skip to content

Node resizer#540

Merged
harbournick merged 15 commits intosuperdoc-dev:developfrom
johanneswilm:node-resizer
Jun 16, 2025
Merged

Node resizer#540
harbournick merged 15 commits intosuperdoc-dev:developfrom
johanneswilm:node-resizer

Conversation

@johanneswilm
Copy link
Copy Markdown
Contributor

I've tried a number of different things and finally found that this general solution should be the most versatile. By using the bounding box and placing the resizer controls somewhere else in the document, it should work with arbitrary element types. However, it does require for there to be size attributes on the node that is to change in size.

I have enabled it to be used on images in this PR. Field annotations seem to lack such size attributes for now. Should they be added @harbournick ?

@johanneswilm
Copy link
Copy Markdown
Contributor Author

I am not sure why these tests are failing. They don't seem to be directly related to this code.

If the overall approach of this is OK, I can try to add tests. I am not sure it will be possible to do the dragging with automatic tests. If it is not, I can make those tests be manual.

@harbournick harbournick requested a review from artem-harbour June 2, 2025 22:44
Comment thread packages/super-editor/src/extensions/image/image.js Outdated
Comment thread packages/super-editor/src/extensions/image/image.js Outdated
Comment thread packages/super-editor/src/extensions/resize-plugin/resize.css Outdated
Comment thread packages/super-editor/src/extensions/resize-plugin/index.js Outdated
Comment thread packages/super-editor/src/extensions/resize-plugin/resize-plugin.js Outdated
Comment thread packages/super-editor/src/extensions/resize-plugin/resize.css Outdated
Comment thread packages/super-editor/src/extensions/resize-plugin/resize-plugin.js Outdated
Comment thread packages/super-editor/src/extensions/resize-plugin/resize-plugin.js Outdated
Comment thread packages/super-editor/src/extensions/resize-plugin/resize-plugin.js Outdated
Comment thread packages/super-editor/src/extensions/resize-plugin/resize-plugin.js Outdated
@artem-harbour artem-harbour requested a review from harbournick June 3, 2025 13:17
Copy link
Copy Markdown
Contributor

@artem-harbour artem-harbour left a comment

Choose a reason for hiding this comment

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

Added my comments to the PR.

@harbournick - please review as well.

@harbournick harbournick changed the base branch from main to develop June 5, 2025 23:15
Copy link
Copy Markdown
Contributor

@artem-harbour artem-harbour left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Collaborator

@harbournick harbournick left a comment

Choose a reason for hiding this comment

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

LGTM

@harbournick harbournick merged commit a4c8612 into superdoc-dev:develop Jun 16, 2025
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.

3 participants