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

[polaris.shopify.com] Update Colors content #10657

Merged
merged 11 commits into from
Oct 3, 2023

Conversation

tjonx
Copy link
Contributor

@tjonx tjonx commented Sep 25, 2023

WHY are these changes introduced?

Closes #10020

WHAT is this pull request doing?

  • Updates Color and moves it to an Overview page
  • Adds Palettes and roles subpage
  • Adds Using color subpage
  • Adds images and layout for all three pages
  • Updates the Colors component in mdx to become an interactive color contrast checker.

How to 🎩

🖥 Local development instructions
🗒 General tophatting guidelines
📄 Changelog guidelines

Copy-paste this code in playground/Playground.tsx:
import React from 'react';
import {Page} from '../src';

export function Playground() {
  return (
    <Page title="Playground">
      {/* Add the code you want to test in here */}
    </Page>
  );
}

🎩 checklist

@tjonx tjonx changed the base branch from main to next September 25, 2023 15:55
@tjonx tjonx self-assigned this Sep 25, 2023
@tjonx tjonx linked an issue Sep 25, 2023 that may be closed by this pull request
Copy link
Contributor

@yurm04 yurm04 left a comment

Choose a reason for hiding this comment

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

Concerned with the color palette not utilizing react to make it interactive. Can we quickly rewrite it in react so that we're not reaching into the dom document? Not sure if related or a side effect of the current implementation but there is an error when trying to interact with the color palette. If this is too big a lift we should roll back this change to the old color palette and punt to after v12 launch

@@ -26,4 +26,9 @@
1px 0px 0px 0px color(display-p3 0.8902 0.8902 0.8902) inset,
-1px 0px 0px 0px color(display-p3 0.8902 0.8902 0.8902) inset,
0px -1px 0px 0px color(display-p3 0.8314 0.8314 0.8314) inset;

.Card {
Copy link
Contributor

Choose a reason for hiding this comment

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

is this getting used anywhere?

@@ -1,5 +1,7 @@
import * as colorsObj from '../../../../../../polaris-tokens/dist/esm/src/colors.mjs';
import {Grid} from '@shopify/polaris';
Copy link
Contributor

Choose a reason for hiding this comment

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

Screenshot 2023-09-25 at 1 35 16 PM seeing this error when clicking on the color palette

@kyledurand
Copy link
Member

@tjonx asked me to help out with making this more react-y. I created a json file from tokens and pulled it into the color file as well. 084aca0

@tjonx tjonx marked this pull request as ready for review October 3, 2023 19:44
@sam-b-rose sam-b-rose merged commit d2b2bfc into next Oct 3, 2023
4 of 7 checks passed
@sam-b-rose sam-b-rose deleted the tjonx/add-color-content-etc branch October 3, 2023 23:55
mrcthms pushed a commit that referenced this pull request Oct 12, 2023
<!--
  ☝️How to write a good PR title:
- Prefix it with [ComponentName] (if applicable), for example: [Button]
  - Start with a verb, for example: Add, Delete, Improve, Fix…
  - Give as much context as necessary and as little as possible
  - Prefix it with [WIP] while it’s a work in progress
-->

### WHY are these changes introduced?

Closes #10020

<!--
  Context about the problem that’s being addressed.
-->

### WHAT is this pull request doing?

- Updates `Color` and moves it to an `Overview` page
- Adds `Palettes and roles` subpage
- Adds `Using color` subpage
- Adds images and layout for all three pages
- Updates the `Colors` component in `mdx` to become an interactive color
contrast checker.

<!--
  Summary of the changes committed.

Before / after screenshots are appreciated for UI changes. Make sure to
include alt text that describes the screenshot.

If you include an animated gif showing your change, wrapping it in a
details tag is recommended. Gifs usually autoplay, which can cause
accessibility issues for people reviewing your PR:

    <details>
      <summary>Summary of your gif(s)</summary>
      <img src="..." alt="Description of what the gif shows">
    </details>
-->

<!-- ℹ️ Delete the following for small / trivial changes -->

### How to 🎩

🖥 [Local development
instructions](https://github.com/Shopify/polaris/blob/main/README.md#local-development)
🗒 [General tophatting
guidelines](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md)
📄 [Changelog
guidelines](https://github.com/Shopify/polaris/blob/main/.github/CONTRIBUTING.md#changelog)

<!--
  Give as much information as needed to experiment with the component
  in the playground.
-->

<details>
<summary>Copy-paste this code in
<code>playground/Playground.tsx</code>:</summary>

```jsx
import React from 'react';
import {Page} from '../src';

export function Playground() {
  return (
    <Page title="Playground">
      {/* Add the code you want to test in here */}
    </Page>
  );
}
```

</details>

### 🎩 checklist

- [ ] Tested on
[mobile](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md#cross-browser-testing)
- [ ] Tested on [multiple
browsers](https://help.shopify.com/en/manual/shopify-admin/supported-browsers)
- [ ] Tested for
[accessibility](https://github.com/Shopify/polaris/blob/main/documentation/Accessibility%20testing.md)
- [ ] Updated the component's `README.md` with documentation changes
- [ ] [Tophatted
documentation](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting%20documentation.md)
changes in the style guide

---------

Co-authored-by: kyledurand <kyle.durand@shopify.com>
Co-authored-by: Sam Rose <11774595+sam-b-rose@users.noreply.github.com>
mrcthms pushed a commit that referenced this pull request Oct 12, 2023
<!--
  ☝️How to write a good PR title:
- Prefix it with [ComponentName] (if applicable), for example: [Button]
  - Start with a verb, for example: Add, Delete, Improve, Fix…
  - Give as much context as necessary and as little as possible
  - Prefix it with [WIP] while it’s a work in progress
-->

### WHY are these changes introduced?

Closes #10020

<!--
  Context about the problem that’s being addressed.
-->

### WHAT is this pull request doing?

- Updates `Color` and moves it to an `Overview` page
- Adds `Palettes and roles` subpage
- Adds `Using color` subpage
- Adds images and layout for all three pages
- Updates the `Colors` component in `mdx` to become an interactive color
contrast checker.

<!--
  Summary of the changes committed.

Before / after screenshots are appreciated for UI changes. Make sure to
include alt text that describes the screenshot.

If you include an animated gif showing your change, wrapping it in a
details tag is recommended. Gifs usually autoplay, which can cause
accessibility issues for people reviewing your PR:

    <details>
      <summary>Summary of your gif(s)</summary>
      <img src="..." alt="Description of what the gif shows">
    </details>
-->

<!-- ℹ️ Delete the following for small / trivial changes -->

### How to 🎩

🖥 [Local development
instructions](https://github.com/Shopify/polaris/blob/main/README.md#local-development)
🗒 [General tophatting
guidelines](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md)
📄 [Changelog
guidelines](https://github.com/Shopify/polaris/blob/main/.github/CONTRIBUTING.md#changelog)

<!--
  Give as much information as needed to experiment with the component
  in the playground.
-->

<details>
<summary>Copy-paste this code in
<code>playground/Playground.tsx</code>:</summary>

```jsx
import React from 'react';
import {Page} from '../src';

export function Playground() {
  return (
    <Page title="Playground">
      {/* Add the code you want to test in here */}
    </Page>
  );
}
```

</details>

### 🎩 checklist

- [ ] Tested on
[mobile](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md#cross-browser-testing)
- [ ] Tested on [multiple
browsers](https://help.shopify.com/en/manual/shopify-admin/supported-browsers)
- [ ] Tested for
[accessibility](https://github.com/Shopify/polaris/blob/main/documentation/Accessibility%20testing.md)
- [ ] Updated the component's `README.md` with documentation changes
- [ ] [Tophatted
documentation](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting%20documentation.md)
changes in the style guide

---------

Co-authored-by: kyledurand <kyle.durand@shopify.com>
Co-authored-by: Sam Rose <11774595+sam-b-rose@users.noreply.github.com>
AnnaCheba pushed a commit to AnnaCheba/polaris that referenced this pull request Apr 22, 2024
<!--
  ☝️How to write a good PR title:
- Prefix it with [ComponentName] (if applicable), for example: [Button]
  - Start with a verb, for example: Add, Delete, Improve, Fix…
  - Give as much context as necessary and as little as possible
  - Prefix it with [WIP] while it’s a work in progress
-->

### WHY are these changes introduced?

Closes Shopify#10020

<!--
  Context about the problem that’s being addressed.
-->

### WHAT is this pull request doing?

- Updates `Color` and moves it to an `Overview` page
- Adds `Palettes and roles` subpage
- Adds `Using color` subpage
- Adds images and layout for all three pages
- Updates the `Colors` component in `mdx` to become an interactive color
contrast checker.

<!--
  Summary of the changes committed.

Before / after screenshots are appreciated for UI changes. Make sure to
include alt text that describes the screenshot.

If you include an animated gif showing your change, wrapping it in a
details tag is recommended. Gifs usually autoplay, which can cause
accessibility issues for people reviewing your PR:

    <details>
      <summary>Summary of your gif(s)</summary>
      <img src="..." alt="Description of what the gif shows">
    </details>
-->

<!-- ℹ️ Delete the following for small / trivial changes -->

### How to 🎩

🖥 [Local development
instructions](https://github.com/Shopify/polaris/blob/main/README.md#local-development)
🗒 [General tophatting
guidelines](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md)
📄 [Changelog
guidelines](https://github.com/Shopify/polaris/blob/main/.github/CONTRIBUTING.md#changelog)

<!--
  Give as much information as needed to experiment with the component
  in the playground.
-->

<details>
<summary>Copy-paste this code in
<code>playground/Playground.tsx</code>:</summary>

```jsx
import React from 'react';
import {Page} from '../src';

export function Playground() {
  return (
    <Page title="Playground">
      {/* Add the code you want to test in here */}
    </Page>
  );
}
```

</details>

### 🎩 checklist

- [ ] Tested on
[mobile](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md#cross-browser-testing)
- [ ] Tested on [multiple
browsers](https://help.shopify.com/en/manual/shopify-admin/supported-browsers)
- [ ] Tested for
[accessibility](https://github.com/Shopify/polaris/blob/main/documentation/Accessibility%20testing.md)
- [ ] Updated the component's `README.md` with documentation changes
- [ ] [Tophatted
documentation](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting%20documentation.md)
changes in the style guide

---------

Co-authored-by: kyledurand <kyle.durand@shopify.com>
Co-authored-by: Sam Rose <11774595+sam-b-rose@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update 'Color' guidance
4 participants