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

ArgsTable: Remove the "simple" detection for enum types #12587

Merged
merged 1 commit into from Oct 3, 2020

Conversation

phated
Copy link
Contributor

@phated phated commented Sep 26, 2020

Issue: Partial reversion of #11868

What I did

While working on a very large storybook, I noticed that a subset of types weren't formatted correctly. For example, they had no background. They were really standing out from the rest of the system. These types often looked like (arg1: string) => 'return1' | 'return2'.

I traced it back to the simple option added in #11868 which added a check that is too simplistic for what it is trying to do. From what I understand, it was trying to avoid adding styling to complex unions, but it didn't consider a union-type value anywhere else in a signature.

My suggestion is to remove this check for now until a more sophisticated check is applied.

How to test

  • Is this testable with Jest or Chromatic screenshots? The previous PR said it added these?
  • Does this need a new example in the kitchen sink apps? No
  • Does this need an update to the documentation? No

If your answer is yes to any of these, please make sure to include it in your PR.

@phated
Copy link
Contributor Author

phated commented Sep 26, 2020

cc @ajkl2533 as well.

Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

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

WFM cc @ajkl2533

@shilman shilman changed the title ArgsTable: Remove the "simple" detection added in #11868 ArgsTable: Remove the "simple" detection for enum types Oct 3, 2020
@shilman shilman merged commit 9e6fdc4 into storybookjs:next Oct 3, 2020
@shilman shilman added the maintenance User-facing maintenance tasks label Oct 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants