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

feat(colors): add new set for unified ramp of category colors in Teams theme #1711

Merged
merged 10 commits into from
Aug 16, 2019
Merged

feat(colors): add new set for unified ramp of category colors in Teams theme #1711

merged 10 commits into from
Aug 16, 2019

Conversation

natashamayurshah
Copy link
Contributor

Add all variants for the new set of category colors.

@codecov
Copy link

codecov bot commented Jul 23, 2019

Codecov Report

Merging #1711 into master will increase coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1711      +/-   ##
==========================================
+ Coverage   69.78%   69.82%   +0.03%     
==========================================
  Files         872      871       -1     
  Lines        7503     7506       +3     
  Branches     2183     2180       -3     
==========================================
+ Hits         5236     5241       +5     
+ Misses       2259     2257       -2     
  Partials        8        8
Impacted Files Coverage Δ
packages/react/src/themes/teams/siteVariables.ts 100% <ø> (ø) ⬆️
...ges/react/src/themes/teams-high-contrast/colors.ts 100% <100%> (ø) ⬆️
packages/react/src/themes/teams-dark/colors.ts 100% <100%> (ø) ⬆️
packages/react/src/themes/teams/categoryColors.ts 100% <100%> (ø)
...ges/react/src/components/Dropdown/DropdownItem.tsx 71.42% <0%> (-6.35%) ⬇️
...ackages/react/src/components/Dropdown/Dropdown.tsx 88.22% <0%> (-0.03%) ⬇️
...hemes/teams/components/Icon/svg/icons/audioOff.tsx
...ms/components/Icon/svg/icons/clipboardCopiedTo.tsx
...es/teams/components/Dropdown/dropdownItemStyles.ts 8.33% <0%> (+1.19%) ⬆️

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 fc927f0...7efb18a. Read the comment docs.

}
}

export const categoryColorSchemes: CategoryColorSchemeMapping = {
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's preserve the previous naming convention and rename this to categoryColorScheme


const createCategoryColorScheme = (color: string, customValues = {}) => {
return {
foreground1: categoryColors[color][250],
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's replaced foreground1 with foreground and foreground2 with foreground1

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, is there a plan for the future, more of these colors to be added in the color scheme? Not sure why we have so many values in the color palette, but we clearly only use a subset of them..

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moving the second comment discussion into the conversation with Sue Nguyen.

/**
* A type for a predefined category colors.
*/
type CategoryColorsStrict = Partial<{
Copy link
Contributor

Choose a reason for hiding this comment

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

If this is supposed to be Strict, let's remove the Partial from the definition. If it is not suppose to be Strict, let's change the name to CategoryColors.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also these typings are specific to team theme, so we may move them to packages/react/src/themes/teams/types.ts

/**
* A type for an extendable set of CategoryColorNames properties of type T
*/
type CategoryColorValues<
Copy link
Contributor

Choose a reason for hiding this comment

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

ColorValues is already a generic, can't we just reuse it with different params

Record<T, string>
>

export type CategoryColorSchemeMapping<
Copy link
Contributor

Choose a reason for hiding this comment

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

We may also reuse the generics from the original ColorSchemeMapping type

@mnajdova
Copy link
Contributor

mnajdova commented Aug 1, 2019

Final thing :) Let's add entry in the CHANGELOG.md file under ## [Unreleased]'s ### Features section, something like this:

@mnajdova mnajdova changed the title Add new set for unified ramp of category colors feat(colors): add new set for unified ramp of category colors in Teams theme Aug 7, 2019
@vercel vercel bot temporarily deployed to staging August 7, 2019 22:05 Inactive
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants