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

Feature/Checkbox rework from CC into FC #2104

Merged
merged 10 commits into from
Apr 8, 2024
Merged

Conversation

vik753
Copy link
Collaborator

@vik753 vik753 commented Apr 1, 2024

Issue link(if exists):

Description: [Checkbox]: rework from CC into FC

@vik753 vik753 requested a review from AlekseyManetov April 1, 2024 14:53
Copy link

github-actions bot commented Apr 1, 2024

Generated by: track-bundle-size
Generated at: Sat, 06 Apr 2024 07:27:41 GMT
Bundle size diff (in kBytes). Not gzipped. Both CSS & JS included.
Baseline: v5.6.1 (2024-03-11)
CI Status: ok

Module Baseline Size
(v5.6.1)
Size Diff Within
Threshold
Threshold
(min - max)
templateApp 1041.48 1059.79 +18.31
js:+21.63
css:-3.32
🆗 937.33 - 1145.63
@epam/app 6402.7 6438.73 +36.04
js:+61.91
css:-25.87
🆗 5762.42 - 7042.96
@epam/draft-rte 53.77 53.78 +0.01
js:+0.01
css:+0
🆗 48.39 - 59.15
@epam/electric 4.46 4.49 +0.01
js:+0
css:+0.01
🆗 4.02 - 4.91
@epam/promo 55.29 55.14 -0.14
js:+0.06
css:-0.19
🆗 49.75 - 60.81
@epam/uui-extra 0.21 0.21 0
js:0
css:0
🆗 0.19 - 0.23
@epam/loveship 101.41 101.16 -0.25
js:0
css:-0.24
🆗 91.27 - 111.55
@epam/uui-components 269.68 255.76 -13.91
js:-14
css:+0.08
🆗 242.71 - 296.64
@epam/uui-core 311.4 326 +14.6
js:+14.6
css:0
🆗 280.26 - 342.54
@epam/uui-db 42.31 42.31 0
js:0
css:0
🆗 38.08 - 46.54
@epam/uui-docs 192.53 199.79 +7.26
js:+7.17
css:+0.09
🆗 173.28 - 211.79
@epam/uui-editor 157.65 173.26 +15.61
js:+15.92
css:-0.31
🆗 141.89 - 173.42
@epam/uui-timeline 47.19 47.19 0
js:+0
css:0
🆗 42.47 - 51.91
@epam/uui 580.2 586.28 +6.08
js:+10.2
css:-4.12
🆗 522.18 - 638.23
new sizes (raw)

To set the sizes as a new baseline, you can copy/paste next content to the uui-build/config/bundleSizeBaseLine.json and commit the file.

{
  "version": "5.7.1",
  "timestamp": "2024-04-06",
  "sizes": {
    "templateApp": {
      "css": 280548,
      "js": 804679
    },
    "@epam/app": {
      "css": 1587897,
      "js": 5005368
    },
    "@epam/draft-rte": {
      "css": 9762,
      "js": 45308
    },
    "@epam/electric": {
      "css": 2289,
      "js": 2299
    },
    "@epam/promo": {
      "css": 40368,
      "js": 16101
    },
    "@epam/uui-extra": {
      "css": 0,
      "js": 213
    },
    "@epam/loveship": {
      "css": 49451,
      "js": 54140
    },
    "@epam/uui-components": {
      "css": 22214,
      "js": 239689
    },
    "@epam/uui-core": {
      "css": 0,
      "js": 333823
    },
    "@epam/uui-db": {
      "css": 0,
      "js": 43327
    },
    "@epam/uui-docs": {
      "css": 3189,
      "js": 201400
    },
    "@epam/uui-editor": {
      "css": 12625,
      "js": 164792
    },
    "@epam/uui-timeline": {
      "css": 2251,
      "js": 46073
    },
    "@epam/uui": {
      "css": 268310,
      "js": 332043
    }
  }
}

Generated by: generate-components-api
CI Status: ok

Total amount of exported types/props without JSDoc comments

Amount
Types 267 (+0) 🆗
Props 239 (+0) 🆗

@@ -103,4 +120,14 @@ describe('Checkbox', () => {
expect(onBlur).toHaveBeenCalled();
expect(input).not.toHaveFocus();
});

it('when state equals isInvalid: true, Checkbox_container must have a \'uui-invalid\' class', async () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Such cases better check via snapshot tests, just render Checkbox with invalid state. I guess we can add this case to the snapshot in UUI.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

it('should be rendered correctly', () => {
const tree = renderer.create(<Checkbox value={ null } onValueChange={ jest.fn } size="18" mode="cell" />).toJSON();
it('should render with maximum props', async () => {
const tree = await renderSnapshotWithContextAsync(<Checkbox value={ null } onValueChange={ jest.fn } size="18" mode="cell" />);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add wider range of different props to this test

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

@AlekseyManetov AlekseyManetov merged commit 2ee1ca5 into develop Apr 8, 2024
4 checks passed
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.

2 participants