From ecd9cf0326e240bb648ae9bb8e46c1101bc6d617 Mon Sep 17 00:00:00 2001 From: Sivin Varghese <64252451+iamsivin@users.noreply.github.com> Date: Tue, 12 Aug 2025 02:46:48 +0530 Subject: [PATCH] fix: RTL issues in new conversation form (#12163) # Pull Request Template ## Description This PR fixes RTL alignment issues in the new conversation form, removes the unused [`form-checkbox`](https://github.com/chatwoot/chatwoot/pull/12151#discussion_r2266333315) class name and drops the `app-rtl--wrapper` class, which was previously used for RTL detection in `rtl.scss` (removed earlier) Fixes https://linear.app/chatwoot/issue/CW-5410/rtl-issues ## Type of change - [x] Bug fix (non-breaking change which fixes an issue) ## How Has This Been Tested? ### Screenshots image image image ## Checklist: - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my code - [ ] I have commented on my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged and published in downstream modules --- app/javascript/dashboard/App.vue | 1 - .../components/ActionButtons.vue | 2 +- .../components/AttachmentPreviews.vue | 2 +- .../components/InboxSelector.vue | 2 +- .../components/WhatsAppOptions.vue | 10 +++++++--- .../components/WhatsappTemplateParser.vue | 5 +++-- .../components-next/avatar/Avatar.vue | 2 +- .../assistant/EditAssistantForm.vue | 13 ++----------- .../settings/AssistantBasicSettingsForm.vue | 18 +++--------------- .../components-next/sidebar/SidebarGroup.vue | 4 ++-- .../components-next/taginput/TagInput.vue | 2 +- 11 files changed, 22 insertions(+), 39 deletions(-) diff --git a/app/javascript/dashboard/App.vue b/app/javascript/dashboard/App.vue index 0fbb20ea9..8da7e7476 100644 --- a/app/javascript/dashboard/App.vue +++ b/app/javascript/dashboard/App.vue @@ -137,7 +137,6 @@ export default { v-if="!authUIFlags.isFetching && !accountUIFlags.isFetchingItem" id="app" class="flex flex-col w-full h-screen min-h-0" - :class="{ 'app-rtl--wrapper': isRTL }" :dir="isRTL ? 'rtl' : 'ltr'" > diff --git a/app/javascript/dashboard/components-next/NewConversation/components/ActionButtons.vue b/app/javascript/dashboard/components-next/NewConversation/components/ActionButtons.vue index 90cb67c4f..a686a8d16 100644 --- a/app/javascript/dashboard/components-next/NewConversation/components/ActionButtons.vue +++ b/app/javascript/dashboard/components-next/NewConversation/components/ActionButtons.vue @@ -170,7 +170,7 @@ useKeyboardEvents(keyboardEvents); /> diff --git a/app/javascript/dashboard/components-next/NewConversation/components/AttachmentPreviews.vue b/app/javascript/dashboard/components-next/NewConversation/components/AttachmentPreviews.vue index fe57d19c4..a546fe0df 100644 --- a/app/javascript/dashboard/components-next/NewConversation/components/AttachmentPreviews.vue +++ b/app/javascript/dashboard/components-next/NewConversation/components/AttachmentPreviews.vue @@ -57,7 +57,7 @@ const removeAttachment = id => { variant="ghost" icon="i-lucide-trash" color="slate" - class="absolute top-1 right-1 !w-5 !h-5 transition-opacity duration-150 ease-in-out opacity-0 group-hover/image:opacity-100" + class="absolute top-1 ltr:right-1 rtl:left-1 !w-5 !h-5 transition-opacity duration-150 ease-in-out opacity-0 group-hover/image:opacity-100" @click="removeAttachment(attachment.resource.id)" /> diff --git a/app/javascript/dashboard/components-next/NewConversation/components/InboxSelector.vue b/app/javascript/dashboard/components-next/NewConversation/components/InboxSelector.vue index 7794d5bdd..3cafacb21 100644 --- a/app/javascript/dashboard/components-next/NewConversation/components/InboxSelector.vue +++ b/app/javascript/dashboard/components-next/NewConversation/components/InboxSelector.vue @@ -83,7 +83,7 @@ const targetInboxLabel = computed(() => { diff --git a/app/javascript/dashboard/components-next/NewConversation/components/WhatsAppOptions.vue b/app/javascript/dashboard/components-next/NewConversation/components/WhatsAppOptions.vue index 3980c6b30..124612ad3 100644 --- a/app/javascript/dashboard/components-next/NewConversation/components/WhatsAppOptions.vue +++ b/app/javascript/dashboard/components-next/NewConversation/components/WhatsAppOptions.vue @@ -2,6 +2,7 @@ import { computed, ref } from 'vue'; import { useI18n } from 'vue-i18n'; +import Icon from 'dashboard/components-next/icon/Icon.vue'; import Button from 'dashboard/components-next/button/Button.vue'; import WhatsappTemplateParser from './WhatsappTemplateParser.vue'; @@ -84,10 +85,13 @@ const handleSendMessage = template => { />
- + { 'COMPOSE_NEW_CONVERSATION.FORM.WHATSAPP_OPTIONS.SEARCH_PLACEHOLDER' ) " - class="w-full h-8 py-2 pl-10 pr-2 text-sm reset-base outline-none border-none rounded-lg bg-n-alpha-black2 dark:bg-n-solid-1 text-n-slate-12" + class="w-full h-8 py-2 ltr:pl-10 rtl:pr-10 ltr:pr-2 rtl:pl-2 text-sm reset-base outline-none border-none rounded-lg bg-n-alpha-black2 dark:bg-n-solid-1 text-n-slate-12" />
{