Skip to content

Enable Avatar Hiding in MessageThread#4673

Merged
emlynmac merged 5 commits intomainfrom
emlyn/empty-avatar
May 30, 2024
Merged

Enable Avatar Hiding in MessageThread#4673
emlynmac merged 5 commits intomainfrom
emlyn/empty-avatar

Conversation

@emlynmac
Copy link
Copy Markdown
Member

What

MessageThread's onRenderAvatar method is used to provide an override of the default Icon for a message.
This change enables the callback to return undefined which will cause the avatar to be hidden.

Why

More flexibility to use the component.

How Tested

Sample Chat App

Process & policy checklist

  • I have updated the project documentation to reflect my changes if necessary.
  • I have read the CONTRIBUTING documentation.

Is this a breaking change?

  • This change causes current functionality to break.

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 29, 2024

Calling bundle size is not changed.

  • Current size: 4852884
  • Base size: 4852884
  • Diff size: 0

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 29, 2024

Chat bundle size is increased❗.

  • Current size: 2061949
  • Base size: 2061799
  • Diff size: 150

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 29, 2024

CallWithChat bundle size is increased❗.

  • Current size: 6177520
  • Base size: 6177370
  • Diff size: 150

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 29, 2024

@azure/communication-react jest test coverage for stable.

Lines Statements Functions Branches
Base 26034 / 40664
64.02%
26034 / 40664
64.02%
710 / 1268
55.99%
2053 / 3259
62.99%
Current 25985 / 40685
63.86%
25985 / 40685
63.86%
710 / 1268
55.99%
2047 / 3250
62.98%
Diff -49 / 21
-0.16%
-49 / 21
-0.16%
0 / 0
0%
-6 / -9
-0.01%

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 29, 2024

@azure/communication-react jest test coverage for beta.

Lines Statements Functions Branches
Base 50254 / 80897
62.12%
50254 / 80897
62.12%
1028 / 2283
45.02%
2916 / 4811
60.61%
Current 50256 / 80948
62.08%
50256 / 80948
62.08%
1029 / 2285
45.03%
2932 / 4821
60.81%
Diff 2 / 51
-0.04%
2 / 51
-0.04%
1 / 2
0.01%
16 / 10
0.2%

*/
defaultOnRender?: (props: CustomAvatarOptions) => JSX.Element
) => JSX.Element;
) => JSX.Element | undefined;
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Note, this is not a breaking change as it is now less restrictive and existing code will function fine.

@github-actions
Copy link
Copy Markdown
Contributor

@emlynmac emlynmac merged commit 2be13b6 into main May 30, 2024
@emlynmac emlynmac deleted the emlyn/empty-avatar branch May 30, 2024 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants