iachat/app/views
Sivin Varghese 5de7ae492c
fix: html/body background not applied in appearance mode (#13955)
# Pull Request Template

## Description

This PR fixes the white background bleed visible in the widget, widget
article viewer and help center when dark mode is active.

**What was happening**

While scrolling, the `<body>` element retained a white background in
dark mode. This occurred because dark mode classes were only applied to
inner container elements, not the root.

**What changed**

* **Widget:** Updated the `useDarkMode` composable to sync the `dark`
class to `<html>` using `watchEffect`, allowing `<body>` to inherit dark
theme variables. Also added background styles to `html`, `body`, and
`#app` in `woot.scss`.
* **Help center portal:** Moved `bg-white dark:bg-slate-900` from
`<main>` to `<body>` in the portal layout so the entire page background
responds correctly to dark mode, including within the widget iframe.
* **ArticleViewer:** Replaced hardcoded `bg-white` with `bg-n-solid-1`
to ensure better theming.


Fixes
https://linear.app/chatwoot/issue/CW-6704/widget-body-colour-not-implemented

## Type of change

- [x] Bug fix (non-breaking change which fixes an issue)

## How Has This Been Tested?

### Screencasts

### Before

**Widget**


https://github.com/user-attachments/assets/e0224ad1-81a6-440a-a824-e115fb806728

**Help center**


https://github.com/user-attachments/assets/40a8ded5-5360-474d-9ec5-fd23e037c845



### After

**Widget**


https://github.com/user-attachments/assets/dd37cc68-99fc-4d60-b2ae-cf41f9d4d38c

**Help center**


https://github.com/user-attachments/assets/bc998c4e-ef77-46fa-ac7f-4ea16d912ce3




## 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
2026-03-31 16:55:21 +05:30
..
android_app chore: Universal Linking for Android (#2324) 2021-06-02 08:46:45 -07:00
api feat: Add draft status for help center locales (#13768) 2026-03-17 12:45:54 +04:00
apple_app chore: Configure iOS universal linking (#10651) 2025-01-08 21:25:11 +05:30
dashboard Initial Commit 2019-08-14 15:18:44 +05:30
devise fix: Fixes wrong copy being sent to users via email invite [cw-1290] (#7159) 2023-05-23 09:37:40 +05:30
fields refactor: extract custom attribute methods from FilterService (#13743) 2026-03-10 14:15:52 +05:30
icons fix: Broken header in public Help Center portal (#11704) 2025-06-11 15:07:24 -04:00
installation/onboarding fix: onboarding/index.html.erb unclosed HTML tags (#10838) 2025-02-06 09:43:38 +05:30
layouts fix: html/body background not applied in appearance mode (#13955) 2026-03-31 16:55:21 +05:30
mailers feat: Standardize rich editor across all channels (#12600) 2025-12-08 14:43:45 +05:30
microsoft fix: Identity JSON response header (#6326) 2023-02-02 11:01:18 +05:30
platform/api/v1 fix: return correct outgoing_url in Platform agent bot API responses (#13827) 2026-03-17 13:40:45 -07:00
public/api/v1 feat: disable helpcenter on hacker plans (#12068) 2026-03-26 23:48:46 -07:00
super_admin feat: show MFA status on Super Admin user page (#13724) 2026-03-09 08:04:36 -07:00
survey/responses feat: Vite + vue 3 💚 (#10047) 2024-10-02 00:36:30 -07:00
widget_tests chore: Remove defer attribute from widget-loader script (#11887) 2025-07-08 15:31:33 +05:30
widgets feat: Add rich text support for widget welcome tagline (#11666) 2025-06-05 14:13:46 -05:00