[FIX] mail: consistent size of input in discuss header

Before this commit, input size of thread name was bigger than
the description one. This happens because the input is sized
according to the font size, and the thread name was bigger due
to `lead` classname.

This commit fixes the issue by reducing the padding of input of
thread name input, so that both input have the exact same height.

Part-of: odoo/odoo#117357
This commit is contained in:
Alexandre Kühn
2023-05-16 14:42:06 +02:00
parent 2ecfd54251
commit f9d1bffe5e
2 changed files with 4 additions and 3 deletions
@@ -3,7 +3,7 @@
<t t-name="mail.AutoresizeInput" owl="1">
<input
class="o-mail-AutoresizeInput text-truncate p-1 border-1 bg-view border-transparent"
class="o-mail-AutoresizeInput text-truncate px-1 border-1 bg-view border-transparent"
t-attf-class="{{ props.className }}"
t-attf-placeholder="{{ props.placeholder }}"
t-att-disabled="!props.enabled"
@@ -22,7 +22,7 @@
<ImStatus t-if="thread and thread.type === 'chat' and thread.correspondent" className="'me-1'" persona="thread.correspondent"/>
<div class="d-flex flex-grow-1 align-self-center align-items-center h-100 py-2">
<AutoresizeInput
className="'o-mail-Discuss-threadName lead fw-bold flex-shrink-1 text-dark'"
className="'o-mail-Discuss-threadName lead fw-bold flex-shrink-1 text-dark py-0'"
enabled="thread.is_editable"
onValidate.bind="renameThread"
value="thread.displayName"
@@ -31,7 +31,7 @@
<div class="flex-shrink-0 mx-2 py-2 border-start"/>
<t t-set="autogrowDescriptionPlaceholder">Add a description</t>
<AutoresizeInput
className="'o-mail-Discuss-threadDescription flex-shrink-1'"
className="'o-mail-Discuss-threadDescription flex-shrink-1 py-1'"
enabled="thread.is_editable"
onValidate.bind="updateThreadDescription"
placeholder="thread.is_editable ? autogrowDescriptionPlaceholder : ''"
@@ -54,6 +54,7 @@
<t t-if="store.user" t-esc="store.user.name"/>
<t t-else="">
<AutoresizeInput
className="'py-1'"
onValidate.bind="renameGuest"
value="store.guest.name"
/>