microsoftgraph / microsoft-graph-toolkit

Authentication Providers and UI components for Microsoft Graph 🦒
https://docs.microsoft.com/graph/toolkit/overview
Other
954 stars 306 forks source link

[BUG] [mgt-chat] component does not display properly in dark mode, remaining in light mode instead. #3157

Closed LazyMisha closed 7 months ago

LazyMisha commented 7 months ago

Describe the bug When attempting to use the mgt-chat component in dark mode, it fails to render properly and remains in light mode.

To Reproduce Steps to reproduce the behavior:

  1. Go to a system running chats using MGT
  2. Load the page containing the mgt-chat component
  3. Activate dark mode if needed
  4. Observe that the mgt-chat component remains in light mode instead of adapting to dark mode

Added a simple example below

import { applyTheme } from '@microsoft/mgt-components';
import { Chat } from '@microsoft/mgt-chat';

applyTheme(
    'dark',
    ref.current,
);

<div ref={ref}>
    <Chat chatId={chatId} />
</div>

Expected behavior The mgt-chat component should properly adapt its appearance to dark mode when activated, ensuring consistency with the overall theme of the application.

Environment (please complete the following information):

Additional context Provider config:

new Msal2Provider({
    clientId: applicationId,
    redirectUri: window.location.origin,
    scopes: SCOPES,
});
gavinbarron commented 7 months ago

Hi @LazyMisha thanks for raising this.

The work to handle theming of the Chat component hasn't yet been started. The application of dark mode also falls under that umbrella.

I'm going to close this issue as it's intended to be addressed as part of #2216