Skip to content
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

[FW][FIX] web_editor: move snippets only across visible ones #146667

Conversation

fw-bot
Copy link
Contributor

@fw-bot fw-bot commented Dec 18, 2023

Before this commit if invisible elements are in the DOM (e.g. device-visibility restricted) the arrows to move snippets (columns, sections) did show up and behave as if the neighbour elements were visible.

This commit hides arrows that would not visually move the snippet, and upon using the move arrow, it also moves the snippet beyond the first visible neighbour.

Steps to reproduce as of 16.0:

  • Drop a "Columns" snippet.
  • Make the center column hidden on desktop.
  • Move the first column to the right.

=> It did not move and an arrow to move to the left was displayed.

Steps to reproduce before 16.0:

  • Drop three snippets.
  • Make the second snippet conditionally visible.
  • Hide it using the eye icon in the "Invisible Elements" list.
  • Move the first block down.

=> It did not move and an arrow to move upwards was displayed.

task-3584947

Forward-Port-Of: #145895

@robodoo
Copy link
Contributor

robodoo commented Dec 18, 2023

Pull request status dashboard.

@fw-bot
Copy link
Contributor Author

fw-bot commented Dec 18, 2023

@bso-odoo @robinlej cherrypicking of pull request #145895 failed.

stdout:

Auto-merging addons/web_editor/static/src/js/editor/snippets.options.js
CONFLICT (content): Merge conflict in addons/web_editor/static/src/js/editor/snippets.options.js

stderr:

14:53:20.276824 git.c:463               trace: built-in: git cherry-pick c787878d8b6143517ee8994f1c1ede8483e0458d
error: could not apply c787878d8b61... [FIX] web_editor: move snippets only across visible ones
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
----------
status:

Either perform the forward-port manually (and push to this branch, proceeding as usual) or close this PR (maybe?).

In the former case, you may want to edit this PR message as well.

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

@C3POdoo C3POdoo added the RD research & development, internal work label Dec 18, 2023
@robodoo robodoo added forwardport This PR was created by @fw-bot conflict There was an error while creating this forward-port PR labels Dec 18, 2023
Before this commit if invisible elements are in the DOM (e.g.
device-visibility restricted) the arrows to move snippets (columns,
sections) did show up and behave as if the neighbour elements were
visible.

This commit hides arrows that would not visually move the snippet, and
upon using the move arrow, it also moves the snippet beyond the first
visible neighbour.

Steps to reproduce as of 16.0:
- Drop a "Columns" snippet.
- Make the center column hidden on desktop.
- Move the first column to the right.

=> It did not move and an arrow to move to the left was displayed.

Steps to reproduce before 16.0:
- Drop three snippets.
- Make the second snippet conditionally visible.
- Hide it using the eye icon in the "Invisible Elements" list.
- Move the first block down.

=> It did not move and an arrow to move upwards was displayed.

task-3584947

X-original-commit: d5a83de
@bso-odoo bso-odoo force-pushed the 16.0-16.0-fix_device_move_column-bso-PLdy-fw branch from af30947 to caa0f2b Compare December 19, 2023 07:58
@C3POdoo C3POdoo requested a review from a team December 19, 2023 07:59
@robinlej
Copy link
Contributor

@robodoo r+

robodoo pushed a commit that referenced this pull request Dec 19, 2023
Before this commit if invisible elements are in the DOM (e.g.
device-visibility restricted) the arrows to move snippets (columns,
sections) did show up and behave as if the neighbour elements were
visible.

This commit hides arrows that would not visually move the snippet, and
upon using the move arrow, it also moves the snippet beyond the first
visible neighbour.

Steps to reproduce as of 16.0:
- Drop a "Columns" snippet.
- Make the center column hidden on desktop.
- Move the first column to the right.

=> It did not move and an arrow to move to the left was displayed.

Steps to reproduce before 16.0:
- Drop three snippets.
- Make the second snippet conditionally visible.
- Hide it using the eye icon in the "Invisible Elements" list.
- Move the first block down.

=> It did not move and an arrow to move upwards was displayed.

task-3584947

closes #146667

X-original-commit: d5a83de
Signed-off-by: Robin Lejeune (role) <[email protected]>
@robodoo robodoo closed this Dec 19, 2023
@robinlej robinlej deleted the 16.0-16.0-fix_device_move_column-bso-PLdy-fw branch January 2, 2024 08:44
luanjubica pushed a commit to luanjubica/odoo-code that referenced this pull request Feb 14, 2024
Before this commit if invisible elements are in the DOM (e.g.
device-visibility restricted) the arrows to move snippets (columns,
sections) did show up and behave as if the neighbour elements were
visible.

This commit hides arrows that would not visually move the snippet, and
upon using the move arrow, it also moves the snippet beyond the first
visible neighbour.

Steps to reproduce as of 16.0:
- Drop a "Columns" snippet.
- Make the center column hidden on desktop.
- Move the first column to the right.

=> It did not move and an arrow to move to the left was displayed.

Steps to reproduce before 16.0:
- Drop three snippets.
- Make the second snippet conditionally visible.
- Hide it using the eye icon in the "Invisible Elements" list.
- Move the first block down.

=> It did not move and an arrow to move upwards was displayed.

task-3584947

closes odoo#146667

X-original-commit: d5a83de
Signed-off-by: Robin Lejeune (role) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conflict There was an error while creating this forward-port PR forwardport This PR was created by @fw-bot RD research & development, internal work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants