Skip to content

Added labelProps prop to [EuiSwitch, EuiRadio, EuiCheckbox] - #4516

Merged
cchaos merged 7 commits into
elastic:masterfrom
akashgp09:Form-controls
Feb 18, 2021
Merged

cchaos merged 7 commits into
elastic:masterfrom
akashgp09:Form-controls

Conversation

@akashgp09

Copy link
Copy Markdown
Contributor

Summary

This PR Fixes #3660
Added labelProps prop to EuiSwitch, EuiRadio and EuiCheckbox.

  • data test subject can be added now.

Checklist

  • Check against all themes for compatibility in both light and dark modes
  • Checked in mobile
  • Checked in Chrome, Edge, and Firefox
  • x ] Props have proper autodocs and playground toggles
    - [ ] Added documentation
    - [ ] Checked Code Sandbox works for the any docs examples
    - [ ] Added or updated jest tests
    - [ ] Checked for breaking changes and labeled appropriately
    - [ ] Checked for accessibility including keyboard-only and screenreader modes
  • A changelog entry exists and is marked appropriately

@kibanamachine

Copy link
Copy Markdown
Contributor

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

Comment thread src/components/form/radio/radio.tsx Resolved
Comment thread src/components/form/radio/radio.tsx Resolved
@akashgp09
akashgp09 requested a review from cchaos February 13, 2021 10:37

@cchaos cchaos left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks! These are now applied to the right components. We'll also need to add tests per component. I find it easy to test the types of {...props} by just doing something like:;

<EuiSwitch labelProps={requiredProps} />

Comment thread src/components/form/switch/switch.tsx Outdated
compressed?: boolean;
type?: 'submit' | 'reset' | 'button';
/**
* Object of props passed to the <span/>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
* Object of props passed to the <span/>
* Object of props passed to the label's <span/>

Comment thread src/components/form/switch/switch.tsx Resolved
@akashgp09
akashgp09 marked this pull request as draft February 17, 2021 05:13
@akashgp09
akashgp09 marked this pull request as ready for review February 17, 2021 05:48
@akashgp09
akashgp09 requested a review from cchaos February 17, 2021 05:49

@cchaos cchaos left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Almost there. Some more changes to the tests so to ensure they output something expected.

Comment thread CHANGELOG.md Resolved
Comment thread src/components/form/radio/radio.tsx Resolved

@cchaos cchaos left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code LGTM!
Jenkins, test this

@cchaos

cchaos commented Feb 18, 2021

Copy link
Copy Markdown
Contributor

Jenkins, test this

@kibanamachine

Copy link
Copy Markdown
Contributor

@cchaos

cchaos commented Feb 18, 2021

Copy link
Copy Markdown
Contributor

Failed to set up Chromium

Jenkins, test this

@kibanamachine

Copy link
Copy Markdown
Contributor

@cchaos
cchaos merged commit db3ddc1 into elastic:master Feb 18, 2021
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.

[EuiSwitch] Can't add data test subject

3 participants