-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Remove text transform uppercase for knob labels #991
Conversation
Codecov Report
@@ Coverage Diff @@
## master #991 +/- ##
=========================================
+ Coverage 12.6% 12.6% +<.01%
=========================================
Files 192 192
Lines 4427 4426 -1
Branches 707 707
=========================================
Hits 558 558
+ Misses 3244 3243 -1
Partials 625 625
Continue to review full report at Codecov.
|
What's the motivation behind this change? |
I want to have a 1 to 1 mapping between props and knob labels. It's harder to read camel case props if you uppercase them (e.g. ISCOLLAPSABLECHILD vs isCollapsableChild). Now there's no way to make them preserve casing, but with my PR you can choose to pass the label with all uppercase characters if you want it that way (e.g. 'boolean("LABEL, false)'). |
@aaronmcadam do you know if there's someone I can tag to get this merged (or have an additional code review and changes, if necessary)? |
What do you think @ndelangen? Is this good to merge? |
☁️ Nx Cloud ReportCI is running/has finished running commands for commit be455cc. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 1 targetSent with 💌 from NxCloud. |
Issue:
What I did
Removed
text-transform: uppercase
from knob labels.How to test
Create a knob that's camel case (e.g.
boolean("isCollapsed", false)
). It should renderisCollapsed
instead ofISCOLLAPSED
.FYI
I found this PR that does the same thing:
"Remove UPPERCASE text-transform from labels #53"
storybook-eol/storybook-addon-knobs#53
but it looks like the
storybooks/storybook-addon-knobs
repository is now deprecated.I saw this related issue on this repository:
"Remove UPPERCASE text-transform from labels #793"
#793
with a comment saying:
but I still see
text-transform: 'uppercase'
on master:https://github.com/storybooks/storybook/blob/master/packages/addon-knobs/src/components/PropField.js#L22
Sorry if this is a duplicate of something else I didn't find.