-
Notifications
You must be signed in to change notification settings - Fork 385
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
Add more resizing handles #3023
Conversation
@miina I think this is a good opportunity to extract the |
Sounds good to me! It is getting quite large, especially when we'll add more calculations for additional handles. By "Rotation handles" in the title, do you mean "resizing handles"? Or is the plan to add more rotation handles as well? |
Imagine additional rotation handles at every blue dot 😄 Yes, I meant resizing handles. |
@miina In case you wanna tackle this one, that would be greatly appreciated 😄 It would probably take me way longer to dig through the logic there. |
I can try 😄 |
Note: |
Alright! That one's on my list for reviewing today anyway 🙂 |
…-wp into add/more-rotation-handles
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
@googlebot I consent. |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
The corners are working OK now as well, however, now there's a bug with the block still continuing to change the position when moving the mouse even when it's not resizing anymore due to the minimum size limit. Looking into this now. |
The issue mentioned above is fixed now as well, will add e2e tests and should be done. Actually, will check also if this can be fixed: amp-wp/assets/src/stories-editor/components/resizable-box/index.js Lines 214 to 219 in cc10a5d
^ It's a bit more noticeable now with the corner handles. If it seems to remain a mystery then will create a separate issue for it. |
assets/src/stories-editor/components/resizable-box/tests/getResizedWidthAndHeight.js
Outdated
Show resolved
Hide resolved
Just for information that dragging from the resizing handles seems to work as expected in e2e tests, started adding those, will finish tomorrow. |
E2e tests are added now. The resizing part should be ready for testing/reviewing. |
* e2e tests should be in a `specs` folder, or have a `spec.js` suffix * unit tests should be in a `test` or `__tests__` folder, or have a `test.js` suffix This change makes sure that there is no overlap between the two configs, and that previously ignored unit tests are actually run.
Blame my IDE
Ah, will need to fix the merge conflict first. Doing that tomorrow. And for #2992 I'll just rebase it on this branch. That seems to work fine. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing the tests folder name, too.
* tag '1.2.1': (434 commits) Bump 1.2.1 Adjust block inserter style. (#3075) Update dependency eslint-plugin-jest to v22.15.2 Fix flaky CTA test (#3057) Add more resizing handles (#3023) Bump version to 1.2.1-RC1 Improve story page background media with image srcset, reduced image size, and a11y text (#3006) Wait until content loaded before calculating font size. (#3052) Harden logic for normalizing image metadata before adding story images (#3049) Update dependency uuid to v3.3.3 (#3046) Inline color support (#3033) Update dependency webpack-cli to v3.3.7 (#3040) Tiny prop-types fix Update dependency babel-jest to v24.9.0 (#3037) Update e2e test setup (#3031) Include amp-script among dynamic_element_selectors in tree shaking Another try to fix tests. Ensure selecting the first page before removing the block. Move setting input selection to the end to helpers. Fix editor test. ...
To do
Fixes #2985.