-
Notifications
You must be signed in to change notification settings - Fork 30.2k
[FIX] website, web_editor: block background video/image border layer fix #201200
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
[FIX] website, web_editor: block background video/image border layer fix #201200
Conversation
aac7773 to
441cf4f
Compare
441cf4f to
fc13ca1
Compare
b6d5f4a to
189680f
Compare
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.
Multiples bugs: can't there be multiple commits please? 🙏
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.
Are all of those CSS rules duplicated? 🤔 Can't they not be? 🤔
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.
Removed the duplicate
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.
I don't think you did: I think you need a third commit (to be the first one of your PR), to remove the duplication. The CSS rules for o_bg_img_opt_repeat, o_bg_img_center, ... seems to be duplicated for no reason: they should be in web_editor only.
Then you add a new one in this commit, which should also be defined in web_editor, not website since your JS code is using it in web_editor, not website 👍
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.
- Again: duplicated CSS rules -> no
- I don't want this class, the
borderclass of Bootstrap should be enough: why is it not? 🙏
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.
The border class of bootstrap takes $border-color which is transparent, so I thought to override it with a custom class that takes currentColor as parameter instead: this also has the benefit of setting a default border color that changes according to the chosen theme instead of the default gray-300.
Will remove the duplicates
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.
The border class of bootstrap takes $border-color which is transparent
I don't think it ever was no (you are saying yourself: "instead of the default gray-300") 🤔 Plus I just retested in 16.0 and 18.0, I don't have that transparent bug anymore somehow 🤷 Could you double check?
so I thought to override it with a custom class that takes currentColor as parameter instead
It's already the default behavior of the border class in at least 18.0 😉 And since in 16.0 it does not seem buggy anymore (or did I test it wrong?), I don't think we need to change the behavior of the option, could you double check?
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.
189680f to
ca2ed58
Compare
|
@qsm-odoo Reorganized and split the PR into two commits, one for the background image bug, one for the background video bug |
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.
Ping me once latest adaptations done :)
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.
I don't think you did: I think you need a third commit (to be the first one of your PR), to remove the duplication. The CSS rules for o_bg_img_opt_repeat, o_bg_img_center, ... seems to be duplicated for no reason: they should be in web_editor only.
Then you add a new one in this commit, which should also be defined in web_editor, not website since your JS code is using it in web_editor, not website 👍
ca2ed58 to
9048a1d
Compare
|
@qsm-odoo Added a third commit removing the duplicate classes and split the comment to respect the 80 characters limit |
This commit fixes issues with the border of blocks that have images as background. - If a block that has an image selected as background is given a border, its background image will fit awkwardly in the surrounding border. - If a backround image for a block is positioned all the way to any edge, it does not cover all the block. Steps to reproduce: - Add a masonry block/big boxes block - Add a background image to an element of the masonry/big boxes - Add a big border => The background image overflows on the border randomly - Make the border translucent if it isn't already - Shift the background image all the way to the left/top => The image does not cover all the border/box After the change the image background completely covers its block, even when resized or when a border is applied. task-4174638
If a video is selected as background for a block, the video does not always fill the block, especially when editing and resizing the block. Steps to reproduce: - Add a masonry block/big boxes block - Add a video background - Resize the block => The video does not always fill the box, especially when the window gets resized After the change video background completely covers its block, even when resized. task-4174638
9048a1d to
b521ff1
Compare
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.
@dabo-odoo In fact, my bad, we don't remove dead code (duplicated CSS here) in stable. So I removed the first commit and I am opening a new PR with it for master 👍
Let's move forward with the rest 💪
@robodoo rebase-ff r+
|
Merge method set to rebase and fast-forward. |
This commit fixes issues with the border of blocks that have images as background. - If a block that has an image selected as background is given a border, its background image will fit awkwardly in the surrounding border. - If a backround image for a block is positioned all the way to any edge, it does not cover all the block. Steps to reproduce: - Add a masonry block/big boxes block - Add a background image to an element of the masonry/big boxes - Add a big border => The background image overflows on the border randomly - Make the border translucent if it isn't already - Shift the background image all the way to the left/top => The image does not cover all the border/box After the change the image background completely covers its block, even when resized or when a border is applied. task-4174638 Part-of: #201200 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
If a video is selected as background for a block, the video does not always fill the block, especially when editing and resizing the block. Steps to reproduce: - Add a masonry block/big boxes block - Add a video background - Resize the block => The video does not always fill the box, especially when the window gets resized After the change video background completely covers its block, even when resized. task-4174638 closes #201200 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>





These commits fix two issues:
border, its background image will fit awkwardly in the surrounding
border, and similarly if the background image is positioned all the
way to any edge, it does not cover all the block.
always fill the block.
Steps to reproduce:
Bug 1
=> The background image overflows on the border randomly
the left
=> The image does not cover all the border-box
Bug 2
=> The video does not always fill the box, especially when the window
gets resized
After the changes the image/video background completely covers its
block, even when resized or when a border is applied.
task-4174638