[FIX] web: CP: long and clipped breadcrumb

=== ISSUE 1 ===

When the Control Panel breadcrumb was not displayed (eg. after reloading
the page), the name of the last element was used. In this case, the name
was not truncated and could create a layout issue if it was too long.

=== ISSUE 2 ===

The breadcrumb was clipped on Firefox, letters such as "p", "j" or "y"
where partially hidden. This was due to the combination of a too small
line-height and the `overflow: hidden` applied on `breadcrumb-item > a`.

This commit fixes these issues.

task-3420194
Part of task-3326263

closes odoo/odoo#128582

X-original-commit: abbbaee7bd591285cef98275da931fd8a8f073cd
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
This commit is contained in:
Brieuc-brd
2023-07-20 05:02:49 +02:00
committed by Pierre Paridans
parent 200da4b7fa
commit 9efcdd707e
@@ -88,7 +88,7 @@
</button>
</t>
<t t-else="">
<ol class="breadcrumb flex-nowrap text-nowrap small lh-1">
<ol class="breadcrumb flex-nowrap text-nowrap small lh-sm">
<li t-if="collapsedBreadcrumbs.length" class="breadcrumb-item d-inline-flex min-w-0">
<Dropdown togglerClass="'btn btn-light btn-sm p-0'">
<t t-set-slot="toggler">
@@ -108,7 +108,7 @@
</t>
</ol>
</t>
<div class="d-flex gap-1">
<div class="d-flex gap-1 text-truncate">
<div class="o_last_breadcrumb_item active d-flex gap-2 align-items-center min-w-0 lh-sm">
<span class="min-w-0 text-truncate" t-call="web.Breadcrumb.Name"/>
</div>
@@ -116,7 +116,7 @@
</div>
</div>
<div t-else="" class="o_breadcrumb d-flex gap-1">
<div t-else="" class="o_breadcrumb d-flex gap-1 text-truncate">
<div class="o_last_breadcrumb_item active d-flex fs-4 min-w-0 align-items-center">
<span class="min-w-0 text-truncate" t-call="web.Breadcrumb.Name"/>
</div>