Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.

fix(Chat): update ChatMessage styles in Teams themes #1246

Merged
merged 10 commits into from
Apr 24, 2019

Conversation

layershifter
Copy link
Member

@layershifter layershifter commented Apr 22, 2019

This PR:

  • updates styles for ChatMessage in Teams, Teams Dark and Teams HC themes
  • fixes propTypes warnings in examples

Teams theme

Before After
image image

Teams Dark theme

Before After
image image

Teams HC theme

Before After
image image

@layershifter layershifter changed the title fix(Chat): update ChatMessage styles in Teams theme fix(Chat): update ChatMessage styles in Teams themes Apr 22, 2019
@layershifter layershifter added 🧰 fix Introduces fix for broken behavior. 🚀 ready for review labels Apr 22, 2019
@layershifter layershifter requested a review from codepretty April 22, 2019 09:48
@codecov
Copy link

codecov bot commented Apr 22, 2019

Codecov Report

Merging #1246 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #1246   +/-   ##
======================================
  Coverage    72.1%   72.1%           
======================================
  Files         731     731           
  Lines        5592    5592           
  Branches     1612    1634   +22     
======================================
  Hits         4032    4032           
  Misses       1555    1555           
  Partials        5       5
Impacted Files Coverage Δ
...h-contrast/components/Chat/chatMessageVariables.ts 0% <ø> (ø) ⬆️
.../themes/teams/components/Chat/chatMessageStyles.ts 2.7% <ø> (ø) ⬆️
packages/react/src/components/Chat/ChatMessage.tsx 84.61% <ø> (ø) ⬆️
...emes/teams/components/Chat/chatMessageVariables.ts 0% <ø> (ø) ⬆️
...teams-dark/components/Chat/chatMessageVariables.ts 0% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 417078e...8736193. Read the comment docs.

@@ -37,8 +39,10 @@ export default (siteVars): ChatMessageVariables => ({
offset: pxToRem(100),
padding: pxToRem(16),
authorMarginRight: pxToRem(12),
authorFontWeight: siteVars.fontWeightBold,
authorColor: siteVars.gray02,
authorFontWeight: siteVars.fontWeightRegular,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this even needed if it's regular?

Copy link
Member Author

@layershifter layershifter Apr 24, 2019

Choose a reason for hiding this comment

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

You're right, we don't need it. But we already have this variable and I don't want to remove it because it will be a breaking change...

headerMarginBottom: pxToRem(2),
contentColor: siteVars.colors.grey[900],
Copy link
Collaborator

Choose a reason for hiding this comment

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

This hex value is actually slightly wrong, but it should be fixed with the new color palette updates (#252423 instead of #252424. Can you add a comment here so we know that when the color palette updates go in we should be using gray[750]?

Copy link
Member Author

Choose a reason for hiding this comment

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

Replaced with direct value and added a note 👍

@@ -4,6 +4,8 @@ export default (siteVars: any): Partial<ChatMessageVariables> => {
return {
backgroundColor: siteVars.gray10,
backgroundColorMine: '#3B3C54',
authorColor: siteVars.gray02,
Copy link
Collaborator

@codepretty codepretty Apr 23, 2019

Choose a reason for hiding this comment

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

Not sure if it is helpful to @mnajdova , but this will be gray[250] with new color palette

@@ -37,8 +39,10 @@ export default (siteVars): ChatMessageVariables => ({
offset: pxToRem(100),
padding: pxToRem(16),
authorMarginRight: pxToRem(12),
authorFontWeight: siteVars.fontWeightBold,
authorColor: siteVars.gray02,
Copy link
Collaborator

@codepretty codepretty Apr 23, 2019

Choose a reason for hiding this comment

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

Not sure if it is helpful to @mnajdova , but will be gray[500] with new color palette

Copy link
Member Author

Choose a reason for hiding this comment

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

I added comments for these values

headerMarginBottom: pxToRem(2),
contentColor: '#252423', // will be gray[750] with new palette
Copy link
Collaborator

@codepretty codepretty Apr 24, 2019

Choose a reason for hiding this comment

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

There is a color variable here too. I wonder if we don't need this variable if the color prop above is set to this value.

Copy link
Member Author

Choose a reason for hiding this comment

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

But color is rgb(64, 64, 64) that points to #404040...

@@ -121,7 +121,10 @@ class ChatMessage extends UIComponent<ReactProps<ChatMessageProps>, ChatMessageS
timestamp: customPropTypes.itemShorthand,
onBlur: PropTypes.func,
onFocus: PropTypes.func,
reactionGroup: customPropTypes.itemShorthand,
reactionGroup: PropTypes.oneOfType([
Copy link
Contributor

Choose a reason for hiding this comment

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

👍 My bad for not updating this change. We should update this on other places (Menu is the first one that pops out of my mind), but I will take care of those changes.

@layershifter layershifter merged commit 7830f6a into master Apr 24, 2019
@delete-merged-branch delete-merged-branch bot deleted the fix/chat-styles branch April 24, 2019 14:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🧰 fix Introduces fix for broken behavior. 🚀 ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants