Skip to content

Commit

Permalink
[FIX] web_editor: fix snippet name overflows
Browse files Browse the repository at this point in the history
If the snippet names are too long (e.g., after being translated), they
overflow and cause a horizontal scrollbar to appear on the snippet menu.

Steps to reproduce the issue:

- Set 'Finnish' as the language for the connected user in Odoo.
- Go to Website edit mode.
- Bug: Some snippet names are too long and overlfow their parent
elements.

This commit fixes this issue by adding the CSS rule 'ellipsis' to
snippet names.

task-3584011

closes odoo#144800

Signed-off-by: Romain Derie (rde) <[email protected]>
  • Loading branch information
bvr-odoo committed Dec 7, 2023
1 parent 51cabec commit 0ab6400
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions addons/web_editor/static/src/scss/wysiwyg_snippets.scss
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,8 @@ body.editor_enable.editor_has_snippets {
@include o-grab-cursor;

.oe_snippet_thumbnail_title {
display: block;
@include o-text-overflow(block);
white-space: normal;
padding: $o-we-sidebar-blocks-content-spacing / 2;
text-align: center;
}
Expand Down Expand Up @@ -427,7 +428,7 @@ body.editor_enable.editor_has_snippets {
min-width: 0; // Ensure text-overflow on flex children
}
.oe_snippet_thumbnail_title {
@include o-text-overflow(block);
white-space: nowrap;
}
.oe_snippet_thumbnail_img {
flex-shrink: 0;
Expand Down

0 comments on commit 0ab6400

Please sign in to comment.