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

Docs/ppdsc 2514 checkbox component scenario #711

Merged
merged 30 commits into from
Mar 29, 2023

Conversation

RashikaNewsUK
Copy link
Contributor

@RashikaNewsUK RashikaNewsUK commented Mar 16, 2023

#766

What

  1. Background - why this is needed
  2. What did you do
  3. What does the reviewers should expect

I have done:

  • Written unit tests against changes
  • Written functional tests against the component and/or NewsKit site
  • Updated relevant documentation

I have tested manually:

  • The feature's functionality is working as expected on Chrome, Firefox, Safari and Edge
  • The screen reader reads and flows through the elements as expected.
  • There are no new errors in the browser console coming from this PR.
  • When visual test is not added, it renders correctly on different browsers and mobile viewports (Safari, Firefox, small mobile viewport, tablet)
  • The Playground feature is working as expected

Before:

After:

Who should review this PR:

How to test:

@RashikaNewsUK RashikaNewsUK added the enhancement New feature or request label Mar 16, 2023
@RashikaNewsUK RashikaNewsUK requested a review from a team as a code owner March 16, 2023 07:15
@github-actions github-actions bot added the docs Improvements or additions to documentation label Mar 16, 2023
@RashikaNewsUK RashikaNewsUK removed the docs Improvements or additions to documentation label Mar 16, 2023
@@ -1,20 +1,62 @@
import React from 'react';
import {Story as StoryType} from '@storybook/react';
import styled from '@emotion/styled';
Copy link
Contributor

@mutebg mutebg Mar 27, 2023

Choose a reason for hiding this comment

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

Don't import this from emotion, use newskit instead.

Comment on lines 40 to 47
const customCheckbox = {
'checked:hover': customStyle,
'checked:focus': customStyle,
'checked:focus:hover': customStyle,
checked: customStyle,
'focus-visible': defaultFocusVisible,
focus: {},
};
Copy link
Contributor

@mutebg mutebg Mar 27, 2023

Choose a reason for hiding this comment

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

You need to add a base state here, something like this, I am not sure about the correct colours, you can check with the design team.

base: {
    backgroundColor: '{{colors.interfaceInformative020}}',
    borderColor: '{{colors.interfaceInformative030}}',
    borderWidth: '{{borders.borderWidth020}}',
    borderRadius: '{{borders.borderRadiusRounded010}}',
    borderStyle: 'solid',
    iconColor: '{{colors.inkInverse}}',
  },

after you have all colours you might need to update them in all states ( check the available states in src/checkbox/style-presets.ts

},
label: {
typographyPreset: 'utilityBody020',
stylePreset: 'labelCustom',
Copy link
Contributor

Choose a reason for hiding this comment

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

here you can use stylePreset: 'inkBrand010', it's gonna have same result, no need for custom style-preset

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @mutebg

@RashikaNewsUK RashikaNewsUK added the ready for review Please assist in getting this reviewed label Mar 27, 2023
@mutebg mutebg linked an issue Mar 29, 2023 that may be closed by this pull request
@RashikaNewsUK RashikaNewsUK merged commit 279953d into main Mar 29, 2023
@RashikaNewsUK RashikaNewsUK deleted the docs/PPDSC-2514-checkbox-component-scenario branch March 29, 2023 05:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ready for review Please assist in getting this reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PPDSC- 2514 checkbox component scenario
4 participants