Skip to content

[FIX] figure: anchor move when resizing with keepSize #6250

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

fdamhaut
Copy link
Contributor

When resizing image with keepSize active, anchor is moved when it shouldn't.

Task: 4755818

Description:

description of this task, what is implemented and why it is implemented that way.

Task: 4755818

review checklist

  • feature is organized in plugin, or UI components
  • support of duplicate sheet (deep copy)
  • in model/core: ranges are Range object, and can be adapted (adaptRanges)
  • in model/UI: ranges are strings (to show the user)
  • undo-able commands (uses this.history.update)
  • multiuser-able commands (has inverse commands and transformations where needed)
  • new/updated/removed commands are documented
  • exportable in excel
  • translations (_t("qmsdf %s", abc))
  • unit tested
  • clean commented code
  • track breaking changes
  • doc is rebuild (npm run doc)
  • status is correct in Odoo

@robodoo
Copy link
Collaborator

robodoo commented Apr 29, 2025

Pull request status dashboard

@@ -320,6 +320,82 @@ describe("figures", () => {
expect(model.getters.getFigure(sheetId, figureId)).toMatchObject(expectedSize);
});

test.each([
Copy link
Collaborator

Choose a reason for hiding this comment

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

The tests seem very extensive, but they pass without the fix :/
DId you stumble upon some issues to reproduce the issue?

Copy link
Contributor Author

@fdamhaut fdamhaut May 13, 2025

Choose a reason for hiding this comment

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

Indeed this test suite was already able to pass before the fix but while creating the other test suite I figured I might as well test both behaviour (the change in offset and the change in size, which was not broken) as neither was tested (for the keepSize parameter) and adding this specific test only took me a few minutes.

Edit: It's true for the 1st test but the 2nd should fail without the fix, It didn't because the movement of the anchor was too small vs the figure size, it has been fixed and now fail without the fix

When resizing image with keepSize active, anchor is moved
when it shouldn't.

Task: 4755818
@fdamhaut fdamhaut force-pushed the saas-18.3-fix-figure-component-resize-keepsize-flda branch from 803cd53 to fba4652 Compare May 13, 2025 14:22
@rrahir
Copy link
Collaborator

rrahir commented May 16, 2025

@robodoo r+

robodoo pushed a commit that referenced this pull request May 16, 2025
When resizing image with keepSize active, anchor is moved
when it shouldn't.

closes #6250

Task: 4755818
Signed-off-by: Rémi Rahir (rar) <[email protected]>
@robodoo robodoo closed this May 16, 2025
@fw-bot fw-bot deleted the saas-18.3-fix-figure-component-resize-keepsize-flda branch May 23, 2025 06:04
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