Skip to content

[IMP] website: improve design of new s_whatsapp snippet#5164

Open
anso-odoo wants to merge 3 commits into
master-whatsapp-snippet-chdhfrom
master-whatsapp-snippet-chdh-anso
Open

[IMP] website: improve design of new s_whatsapp snippet#5164
anso-odoo wants to merge 3 commits into
master-whatsapp-snippet-chdhfrom
master-whatsapp-snippet-chdh-anso

Conversation

@anso-odoo
Copy link
Copy Markdown

@anso-odoo anso-odoo commented May 13, 2026

Improved:

  • Brand colors
  • Dark mode compatibility
  • Keyboard navigation
  • Focus and active states
  • Sizings
  • Snippet screenshot for the preview
  • Removed unused classes
  • Renamed generic classes (e.g: chatbox -> wa-chatbox)
Before After
Screenshot 2026-05-13 at 17 19 35 Screenshot 2026-05-13 at 17 18 27

task-6113374

chdh-odoo added 2 commits May 13, 2026 14:29
Goal:
1. To make it easy for visitors to connect with the company as soon as
they land on the website.
2. It provides a quick and familiar communication channel while also
helping the business collect external user contacts.

Key Features:
- Clicking the snippet opens a chatbot with a welcome message
- Input box lets users type queries; on send, user is redirected
  to personal WhatsApp with prefilled message
- Supports multiple options: size, shape, agent name, description,
  avatar, etc.
- Allows configuring company/WhatsApp contact number
  * Default: company's number prefilled
  * User can override with a custom number
- If the WhatsApp module (enterprise) is installed, the company can use
  a phone number generated from the WhatsApp Business account
  configuration.
  * After that, a channel and contact card are automatically created for
  each new customer.(existing behavior, not a part of this commit)
- Note that since discuss and livechat bubbles have the same position
  as whatsapp snippet it's very hard to position 3 widgets at the same
  location so that's why we added position option so that user can
  change the position to left side as well.

task-4849720
*=website_sale

Set preview=false by default in replaceMedia builder action
to avoid repeating preview=false in XML everytime.

task-4849720
@robodoo
Copy link
Copy Markdown

robodoo commented May 13, 2026

This PR targets the un-managed branch odoo-dev/odoo:master-whatsapp-snippet-chdh, it needs to be retargeted before it can be merged.

@anso-odoo anso-odoo force-pushed the master-whatsapp-snippet-chdh-anso branch from 8787373 to a1e4144 Compare May 13, 2026 15:25
@dhruv2x dhruv2x force-pushed the master-whatsapp-snippet-chdh branch 2 times, most recently from e117053 to a09bfd4 Compare May 15, 2026 08:50
Copy link
Copy Markdown

@chgo-odoo chgo-odoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @anso-odoo 👋

Thanks for your work on this, I left minor comments to clean-up the files a bit.

Thanks !

border-top-color: var(--o-wa-message-bg);
border-right: 0;
transform: rotate(270deg);
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation

+            &::before {
+               content: '';
+               @include o-position-absolute($bottom: -12px, $left: 4px);
+               border: 8px solid transparent;
+               border-top-color: var(--o-wa-message-bg);
+               border-right: 0;
+               transform: rotate(270deg);
+            }


right: map-get($spacers, 4);
bottom: map-get($spacers, 4);
z-index: 1000;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use a SCSS variable instead? $zindex-dropdown or even a lower one if we have the opportunity

Comment on lines +120 to +121
width: 2.25rem;
height: 2.25rem;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know it was already there but I'd not enforce the width... It looks quite small on mobile.

Comment on lines +123 to +125
&:hover {
background: var(--o-wa-green-hover);
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leftover ?

<div class="wa-input-box align-items-center gap-2 p-2">
<textarea name="wa_message" class="wa-user-message form-control flex-grow-1" t-att-placeholder="messagePlaceholder" rows="1"/>
<div class="o_not_editable">
<button class="wa-send btn d-flex align-items-center justify-content-center border-0 p-0 rounded-pill" aria-label="Send message">
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already there prior to your changes but I think we can cleanup this markup... flex shouldn't be needed

<textarea name="wa_message" class="wa-user-message form-control flex-grow-1" t-att-placeholder="messagePlaceholder" rows="1"/>
<div class="o_not_editable">
<button class="wa-send btn d-flex align-items-center justify-content-center border-0 p-0 rounded-pill" aria-label="Send message">
<i class="fa fa-paper-plane"/>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing aria-hidden="true"

Comment on lines +21 to +22
<button class="o_not_editable btn p-0 position-relative d-inline-flex align-items-center justify-content-center rounded-circle wa-fab o_pos_right" aria-label="Open WhatsApp chat" contenteditable="false">
<i class="fa fa-whatsapp fs-4" contenteditable="false"/>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you double check if we need contenteditable="false" on both the button and the icon? + missing aria-hidden="true" on the icon

</div>
<p class="m-0" t-esc="ctaLabel"/>
<button class="wa-cta-btn btn w-100 py-3 rounded-4 border-0" t-att-aria-label="ctaLabel">
<i class="o_not_editable fa fa-whatsapp me-2"/>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing aria-hidden="true" + why does this icon needs o_not_editable and not the others ? Probably not needed

}

.wa-input-box {
display: flex;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we move it in the XML ?

</div>
</div>
<!-- CTA mode -->
<div class="wa-cta-box justify-content-center p-2 border-top">
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can probably remove justify-content-center since the button inside is w-100

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants