Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[web-components] refactor color recipes for DI #18199

Conversation

chrisdholt
Copy link
Member

Pull request checklist

  • Addresses an existing issue: Fixes #0000
  • Include a change request file using $ yarn change

Description of changes

Creates vNext color recipes and updates tests to ensure parity.

Focus areas to test

(optional)

@codesandbox-ci
Copy link

codesandbox-ci bot commented May 14, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 166aff3:

Sandbox Source
Fluent UI Button Configuration
codesandbox-react-template Configuration
codesandbox-react-northstar-template Configuration

Copy link
Contributor

@EisenbergEffect EisenbergEffect left a comment

Choose a reason for hiding this comment

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

My only comments are that there's a large amount of what appears to be duplicative code with fast-components. Should any of this be moved into foundation? Some of it seems like primitives e.g. Palette. Also, what was our reason for making the recipes internal? Is that a temporary thing that we plan to lift after we work out a few more things?

@@ -0,0 +1,32 @@
# FAST Color Recipes
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# FAST Color Recipes
# FluentUI Color Recipes

@@ -0,0 +1,32 @@
# FAST Color Recipes

Color recipes are named colors who's value is algorithmically defined from a variety of inputs. `@microsoft/fast-components` relies on these recipes heavily to achieve expressive theming options while maintaining color accessability targets.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Color recipes are named colors who's value is algorithmically defined from a variety of inputs. `@microsoft/fast-components` relies on these recipes heavily to achieve expressive theming options while maintaining color accessability targets.
Color recipes are named colors who's value is algorithmically defined from a variety of inputs. `@fluentui/web-components` relies on these recipes heavily to achieve expressive theming options while maintaining color accessibility targets.

**Example: Creating a SwatchRGB**

```ts
import { SwatchRGB } from '@microsoft/fast-components';
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
import { SwatchRGB } from '@microsoft/fast-components';
import { SwatchRGB } from '@fluentui/web-components';

@chrisdholt chrisdholt force-pushed the users/chhol/refactor-color-recipes-for-di branch from bbec96d to 166aff3 Compare May 14, 2021 21:30
@chrisdholt chrisdholt merged commit dc442a0 into microsoft:features/web-components-vNext May 14, 2021
@chrisdholt chrisdholt deleted the users/chhol/refactor-color-recipes-for-di branch May 14, 2021 21:51
chrisdholt added a commit that referenced this pull request May 14, 2021
* add color-vNext folder with recipes and update specs

* Change files
chrisdholt added a commit that referenced this pull request May 18, 2021
* add color-vNext folder with recipes and update specs

* Change files
chrisdholt added a commit that referenced this pull request Jun 8, 2021
* add color-vNext folder with recipes and update specs

* Change files
chrisdholt added a commit that referenced this pull request Jul 2, 2021
* add color-vNext folder with recipes and update specs

* Change files
chrisdholt added a commit that referenced this pull request Jul 2, 2021
* add color-vNext folder with recipes and update specs

* Change files
PeterDraex pushed a commit to PeterDraex/fluentui that referenced this pull request Aug 6, 2021
* add color-vNext folder with recipes and update specs

* Change files
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.

3 participants