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

feat: add FormGroup component #809

Merged
merged 2 commits into from
Jan 27, 2022
Merged

feat: add FormGroup component #809

merged 2 commits into from
Jan 27, 2022

Conversation

dierat
Copy link
Contributor

@dierat dierat commented Jan 25, 2022

Summary:

Clubhouse ticket: https://app.shortcut.com/czi-edu/story/169595/button-group-form-group-move-to-eds
Location in traject: https://github.com/FB-PLP/traject/tree/master/app/assets/javascripts/v2/core/EDSCandidates/FormGroup

Screenshots

FormGroup in storybook

Test Plan:

  • Manually tested the component in storybook
  • Verified the snapshot tests output looks right

@codecov
Copy link

codecov bot commented Jan 25, 2022

Codecov Report

Merging #809 (2278b94) into main (c413ac6) will increase coverage by 0.09%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #809      +/-   ##
==========================================
+ Coverage   95.58%   95.68%   +0.09%     
==========================================
  Files         136      139       +3     
  Lines         975      997      +22     
  Branches      134      137       +3     
==========================================
+ Hits          932      954      +22     
  Misses         43       43              
Impacted Files Coverage Δ
src/FormGroup/FormGroup.stories.tsx 100.00% <0.00%> (ø)
src/FormGroup/FormGroup.tsx 100.00% <0.00%> (ø)
src/Checkbox/index.ts 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c413ac6...2278b94. Read the comment docs.

@dierat dierat marked this pull request as ready for review January 25, 2022 21:01
@dierat dierat requested a review from a team January 25, 2022 21:01
@@ -0,0 +1,3 @@
// @flow
Copy link

Choose a reason for hiding this comment

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

Should this be removed?

Suggested change
// @flow

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes!! Thank you ❤️

@ghost
Copy link

ghost commented Jan 26, 2022

Is it intentional that this is being merged into diedra/button-group/add instead of the master/main branch?
image

Comment on lines +67 to +71
<Component className={clsx(className, styles.title)}>
<Text size="sm" weight="bold">
{children}
</Text>
</Component>
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this result in HTML like with an extra P tag:

<legend>
  <p class="stuff">Some text</p>
</legend>

?

If so, I wonder if it's worth thinking about reducing unnecessary elements. Maybe with something like

<Text as={Component} className={clsx(className, styles.title)} size="sm" weight="bold">
  {children}
</Text>

Although that may not really be worth it. And would probably require updating the Text component to accept more things for as.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

And would probably require updating the Text component to accept more things for as.

Looks like it. Maybe we should make that change anyway and then update this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@dierat
Copy link
Contributor Author

dierat commented Jan 27, 2022

Is it intentional that this is being merged into diedra/button-group/add instead of the master/main branch?

Yeah; I stacked them so it was easier to make an alpha version with both of them on it. I'll merge them into main separately.

@dierat dierat force-pushed the diedra/button-group/add branch from b2610e2 to b3856ac Compare January 27, 2022 16:02
@dierat dierat force-pushed the diedra/form-group/add branch from 49ea774 to ab0bfbf Compare January 27, 2022 16:16
@dierat dierat requested review from ahuth and a user January 27, 2022 16:21
Base automatically changed from diedra/button-group/add to main January 27, 2022 16:21
@dierat dierat force-pushed the diedra/form-group/add branch from 8f7fa60 to 2278b94 Compare January 27, 2022 16:23
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

size-limit report

Path Size
components 68.48 KB (+1.37% 🔺)
styles 4.44 KB (0%)

Copy link
Contributor

@ahuth ahuth left a comment

Choose a reason for hiding this comment

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

LGTM

@dierat
Copy link
Contributor Author

dierat commented Jan 27, 2022

Any idea what's causing this?
screenshot of github actions post above stating that this PR is increasing the package size by 1.37% and needs changed

@ahuth
Copy link
Contributor

ahuth commented Jan 27, 2022

No idea why a size increase of 1.37% would cause the size limit action to block merging. Maybe it's enforcing a total size limit of the package or something.

Couple options:

  1. [Easiest] Dismiss the action's review, and see if subsequent PRs have this same issue
  2. Delete the size-limit-action. I don't think we really need it.
  3. See if we can tune it's parameters

@dierat
Copy link
Contributor Author

dierat commented Jan 27, 2022

No idea why a size increase of 1.37% would cause the size limit action to block merging. Maybe it's enforcing a total size limit of the package or something.

Couple options:

  1. [Easiest] Dismiss the action's review, and see if subsequent PRs have this same issue
  2. Delete the size-limit-action. I don't think we really need it.
  3. See if we can tune it's parameters

Cool, I'll just dismiss it for now. Thanks for verifying! 👍

@dierat dierat dismissed github-actions[bot]’s stale review January 27, 2022 16:46

We're cool with the package getting a little bigger as we add more components. The size does seem a little high for this component (?), but it's within reason.

@dierat dierat merged commit 3d48a2e into main Jan 27, 2022
@dierat dierat deleted the diedra/form-group/add branch January 27, 2022 16:46
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