Skip to content
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
66011d9
Add a background color to all composites
anjulgarg Jul 21, 2022
032c15e
Change files
anjulgarg Jul 21, 2022
c92d7ff
comment grammar fix
anjulgarg Jul 21, 2022
00113a2
Removing background color override in control bar
anjulgarg Jul 21, 2022
6d1b86a
updating comment
anjulgarg Jul 21, 2022
bd6a57c
Change files
anjulgarg Jul 21, 2022
c1be5f4
updating comment
anjulgarg Jul 21, 2022
a0c4ac0
Update composite automation snapshots
github-actions[bot] Jul 21, 2022
31d5df4
Update composite automation snapshots
github-actions[bot] Jul 22, 2022
765c7a5
Update composite automation snapshots
github-actions[bot] Jul 22, 2022
d623b14
Update composite automation snapshots
github-actions[bot] Jul 22, 2022
919137b
Update composite automation snapshots
github-actions[bot] Jul 22, 2022
bfed174
Un-memoizing classname
anjulgarg Jul 22, 2022
7f2fe9f
Update composite automation snapshots
github-actions[bot] Jul 22, 2022
6e12049
Merge branch 'main' into anjulgarg/bugfix-2903659-composite-bg
anjulgarg Jul 22, 2022
6dc7c7c
Update composite automation snapshots
github-actions[bot] Jul 22, 2022
0c4f55f
Adding custom background to control bars in call and call withchat
anjulgarg Jul 25, 2022
285f7f7
Merge branch 'main' of https://github.com/Azure/communication-ui-libr…
anjulgarg Jul 25, 2022
dc1fe13
Update composite automation snapshots
github-actions[bot] Jul 25, 2022
ed0981b
Adding background color to message thread in composite to match compo…
anjulgarg Jul 25, 2022
caf5c7e
Merge branch 'main' of https://github.com/Azure/communication-ui-libr…
anjulgarg Jul 25, 2022
df8133f
Change files
anjulgarg Jul 25, 2022
32b63d8
Update changelog
anjulgarg Jul 25, 2022
99bcdbf
Merge branch 'main' into anjulgarg/bugfix-2903659-composite-bg
anjulgarg Jul 26, 2022
ecdf5d8
Update composite automation snapshots
github-actions[bot] Jul 26, 2022
a7f2b55
Update composite automation snapshots
github-actions[bot] Jul 26, 2022
f7ab793
Update composite automation snapshots
github-actions[bot] Jul 26, 2022
795b59b
Merge branch 'main' of https://github.com/Azure/communication-ui-libr…
anjulgarg Jul 27, 2022
d879e8a
Update composite automation snapshots
github-actions[bot] Jul 27, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "Message thread background color in composites matches composite background color",
"packageName": "@internal/react-composites",
"email": "anjulgarg@live.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ import {
SendBox,
SendBoxStylesProps,
TypingIndicator,
TypingIndicatorStylesProps
TypingIndicatorStylesProps,
useTheme
} from '@internal/react-components';
import React, { useCallback, useEffect } from 'react';
import { AvatarPersona, AvatarPersonaDataCallback } from '../common/AvatarPersona';
Expand Down Expand Up @@ -122,6 +123,8 @@ export const ChatScreen = (props: ChatScreenProps): JSX.Element => {
const [downloadErrorMessage, setDownloadErrorMessage] = React.useState('');

const adapter = useAdapter();
const theme = useTheme();

useEffect(() => {
// Initial data should be always fetched by the composite(or external caller) instead of the adapter
adapter.fetchInitialData();
Expand All @@ -147,7 +150,11 @@ export const ChatScreen = (props: ChatScreenProps): JSX.Element => {
[onFetchAvatarPersonaData]
);

const messageThreadStyles = Object.assign({}, messageThreadChatCompositeStyles, styles?.messageThread);
const messageThreadStyles = Object.assign(
{},
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do we need this empty object here incase everything else is undefined? I haven't seen this way of defining the styles on a component.

messageThreadChatCompositeStyles(theme.semanticColors.bodyBackground),
styles?.messageThread
);
const typingIndicatorStyles = Object.assign({}, styles?.typingIndicator);
const sendBoxStyles = Object.assign({}, styles?.sendBox);
const userId = toFlatCommunicationIdentifier(adapter.getState().userId);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

import { IStyle, mergeStyles } from '@fluentui/react';
import { IStyle, memoizeFunction, mergeStyles } from '@fluentui/react';
import { MessageThreadStyles } from '@internal/react-components';

const MESSAGE_THREAD_WIDTH = '41.25rem';
Expand Down Expand Up @@ -93,7 +93,12 @@ export const topicNameLabelStyle = mergeStyles({
/**
* @private
*/
export const messageThreadChatCompositeStyles: MessageThreadStyles = { root: { maxWidth: MESSAGE_THREAD_WIDTH } };
export const messageThreadChatCompositeStyles = memoizeFunction(
(background: string): MessageThreadStyles => ({
root: { maxWidth: MESSAGE_THREAD_WIDTH },
chatContainer: { background: background }
})
);

/**
* @private
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.