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

refactor: [M3-7562] - Remove Radio.mdx and Textfield.mdx files #9994

Merged
merged 4 commits into from
Dec 15, 2023

Conversation

coliu-akamai
Copy link
Contributor

@coliu-akamai coliu-akamai commented Dec 12, 2023

Description 📝

  • Remove Radio.mdx and TextField.mdx files + moved documentation comments in those files to relevant component files
  • Add tests

How to test 🧪

Verification steps

As an Author I have considered 🤔

Check all that apply

  • 👀 Doing a self review
  • ❔ Our contribution guidelines
  • 🤏 Splitting feature into small PRs
  • ➕ Adding a changeset
  • 🧪 Providing/Improving test coverage
  • 🔐 Removing all sensitive information from the code and PR description
  • 🚩 Using a feature flag to protect the release
  • 👣 Providing comprehensive reproduction steps
  • 📑 Providing or updating our documentation
  • 🕛 Scheduling a pair reviewing session
  • 📱 Providing mobile support
  • ♿ Providing accessibility support

- Avoid breaking a single form into multiple “papers” unless those sections are truly independent of each other.
- Consider sizing the input field to the data being entered (ex. the field for a street address should be wider than the field for a zip code). Balance this goal with the visual benefits of fields of the same length. A somewhat outsized input that aligns with the fields above and below it might be the best choice.

## Textfield errors
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This documentation section corresponds to the error textfield story - had to add it here instead of above the error textfield story to get it to show up in the storybook documentation section. We removed showing all stories in the documentation (see here).

Before Current (see comment above for changes)
image image

@@ -73,6 +73,10 @@ interface BaseProps {
* className to apply to the underlying TextField component
*/
className?: string;
/**
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The textfield component is currently in the root of the components package - thoughts on moving it into a separate TextField folder within components? (this will lead to a way bigger file diff - like +80 files due to all the import changes though 😅 )

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for considering this. In the past we had components/core/ and we migrated away from that to just having components/. I don't seem to recall if we have guidelines to determine how things should be organized. At the moment it appears to be a mixture of individual folders and files. I would prefer that each component is contained within a designated folder containing tests and storybook files.

This might be good to discuss during the Cafe.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this could be done separately if we wanted to. Considering the large January release in front of us and the PR to wrap up MUI migrations I would leave it alone for now

@coliu-akamai coliu-akamai marked this pull request as ready for review December 13, 2023 17:17
@coliu-akamai coliu-akamai requested a review from a team as a code owner December 13, 2023 17:17
@coliu-akamai coliu-akamai requested review from mjac0bs, carrillo-erik and abailly-akamai and removed request for a team December 13, 2023 17:17
@carrillo-erik
Copy link
Contributor

Everything looks good to me. I had a hiccup running the test for TextField because I copied and pasted the command in your PR description. I fixed they typo which had a lower-case 'f' in the component name.

Screenshot 2023

@coliu-akamai
Copy link
Contributor Author

thanks @carrillo-erik!

@coliu-akamai coliu-akamai added Add'tl Approval Needed Waiting on another approval! and removed Ready for Review labels Dec 14, 2023
Copy link
Contributor

@abailly-akamai abailly-akamai 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! Thanks @coliu-akamai

Only thing I noticed is the Radio size prop not doing anything. Approving tho we may wanna look into that.

Also, don't hesitate to get a little deeper with testing props sometimes. Especially the ones that are going to change the appearance of the component. This is usually the kind of visual regression we miss when doing a upgrade or migration.

@@ -73,6 +73,10 @@ interface BaseProps {
* className to apply to the underlying TextField component
*/
className?: string;
/**
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this could be done separately if we wanted to. Considering the large January release in front of us and the PR to wrap up MUI migrations I would leave it alone for now

@abailly-akamai
Copy link
Contributor

@coliu-akamai also restarting your e2e suite since once of the run failed to complete the job

@coliu-akamai
Copy link
Contributor Author

coliu-akamai commented Dec 15, 2023

@abailly-akamai looking into the size issue, seems like size as a prop just doesn't have any effect on the radio appearance at all, even though the svg fontsize changes 🤔 gonna look into this some more!

image
image

edit: even if I just use Radio from mui directly, I'm not seeing the size prop do anything?? 😭 I might just merge this as is then, and create a new ticket to look into this some more

@bnussman-akamai bnussman-akamai added Approved Multiple approvals and ready to merge! and removed Add'tl Approval Needed Waiting on another approval! labels Dec 15, 2023
@coliu-akamai
Copy link
Contributor Author

coliu-akamai commented Dec 15, 2023

update: Alban and I investigated, and the issue is due to MuiSvgIcon style overrides at the theme layer (line 1040 of light.ts). Opened up a new ticket (M3-7565) to further describe the issue and lay out some potential ways to handle this. Merging this PR as is!

@coliu-akamai coliu-akamai merged commit be18999 into linode:develop Dec 15, 2023
17 checks passed
@coliu-akamai coliu-akamai deleted the m3-7562 branch December 19, 2023 04:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved Multiple approvals and ready to merge! Storybook
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants