Skip to content

Conversation

tarynmusgrave
Copy link
Contributor

@tarynmusgrave tarynmusgrave commented Nov 26, 2018

WHY are these changes introduced?

Resolves #651

WHAT is this pull request doing?

Updating InlineError, borders on our form fields and the Error Icon to be the same red.

How to 🎩

Copy-paste this code in playground/Playground.tsx:
import * as React from 'react';
import {Page, TextField, Checkbox} from '@shopify/polaris';

interface State {
  value: string;
  checked: boolean;
}

export default class Playground extends React.Component<never, State> {
  state = {
    value: 'Jaded Pixel',
    checked: false,
  };

  handleTextFieldChange = (value) => {
    this.setState({value});
  };

  handleCheckboxChange = (checked) => {
    this.setState({checked});
  };

  render() {
    const {value, checked, selected} = this.state;

    return (
      <Page
        title="Playground"
        primaryAction={{content: 'View Examples', url: '/examples'}}
      >
        <TextField
          label="Store name"
          value={value}
          onChange={this.handleTextFieldChange}
          error="error"
        />

        <Checkbox
          checked={checked}
          label="Basic checkbox"
          onChange={this.handleCheckboxChange}
          error="error"
        />
      </Page>
    );
  }
}

🎩 checklist

@ghost
Copy link

ghost commented Nov 26, 2018

👋 Thanks for opening your first pull request. A contributor should give feedback soon. If you haven’t already, please check out the contributing guidelines. You can also join #polaris on the Shopify Partners Slack.

@BPScott BPScott temporarily deployed to polaris-react-pr-676 November 26, 2018 15:10 Inactive
@BPScott BPScott temporarily deployed to polaris-react-pr-676 November 26, 2018 15:21 Inactive
@kaelig
Copy link
Contributor

kaelig commented Nov 27, 2018

Thanks for pinging me!

Should we update the style guide's related section and be prescriptive about the using the dark shade of red for errors?

See https://polaris.shopify.com/design/colors#section-color-usage

screenshot 2018-11-27 14 50 45

@dleroux dleroux changed the title [WIP] Updating red colour for errors Updating red colour for errors Nov 28, 2018
Copy link
Contributor

@dleroux dleroux left a comment

Choose a reason for hiding this comment

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

Looks good! Made a small suggestion on the unreleased comment. I think it might be better?
🎩 also looks good. Thanks for contributing!

Copy link
Member

@chloerice chloerice left a comment

Choose a reason for hiding this comment

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

Code and 🎩 👀 🏅Thanks Taryn!! 🚢

@chloerice
Copy link
Member

chloerice commented Nov 28, 2018

Should we update the style guide's related section and be prescriptive about the using the dark shade of red for errors?

@kaelig Since the accessibility section covers contrast standards, I'm not sure it's necessary to specify the shade of red since the shade varies by the context it's used for (background, text etc) and the other colors don't specify shade. Updating the illustrations to match the colors we use makes sense, but may be overkill.

@BPScott BPScott temporarily deployed to polaris-react-pr-676 November 29, 2018 13:10 Inactive
@ghost
Copy link

ghost commented Nov 29, 2018

🎉 Thanks for your contribution to Polaris React!

@tarynmusgrave tarynmusgrave deleted the update-error-styling branch November 29, 2018 13:41
@danrosenthal danrosenthal temporarily deployed to production December 4, 2018 19:16 Inactive
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.

6 participants