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

[WB-1851.1] Dropdown: Remove light prop on dropdowns #2430

Merged
merged 5 commits into from
Jan 21, 2025
Merged

Conversation

jandrade
Copy link
Member

Summary:

Removes the light prop from wonder-blocks-dropdown. This includes removing
that in SingleSelect and MultiSelect.

This is based on the discussion with the design team where we decided to
remove the light prop from Wonder Blocks due to its low usage and to prepare
for the upcoming design changes.

Issue: https://khanacademy.atlassian.net/browse/WB-1851

Test plan:

Verify that the light prop is removed from SingleSelect and MultiSelect.

Juan Andrade added 2 commits January 15, 2025 17:39
@jandrade jandrade self-assigned this Jan 15, 2025
Copy link

changeset-bot bot commented Jan 15, 2025

🦋 Changeset detected

Latest commit: 8de5ab8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@khanacademy/wonder-blocks-dropdown Major
@khanacademy/wonder-blocks-birthday-picker Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@khan-actions-bot khan-actions-bot requested a review from a team January 15, 2025 22:44
@khan-actions-bot
Copy link
Contributor

Gerald

Required Reviewers
  • @Khan/wonder-blocks for changes to .changeset/tricky-yaks-mate.md, __docs__/wonder-blocks-dropdown/base-select.argtypes.ts, __docs__/wonder-blocks-dropdown/combobox.argtypes.ts, __docs__/wonder-blocks-dropdown/combobox.stories.tsx, __docs__/wonder-blocks-dropdown/multi-select-variants.stories.tsx, __docs__/wonder-blocks-dropdown/multi-select.stories.tsx, __docs__/wonder-blocks-dropdown/single-select-variants.stories.tsx, __docs__/wonder-blocks-dropdown/single-select.stories.tsx, packages/wonder-blocks-dropdown/src/components/combobox.tsx, packages/wonder-blocks-dropdown/src/components/dropdown-core.tsx, packages/wonder-blocks-dropdown/src/components/multi-select.tsx, packages/wonder-blocks-dropdown/src/components/select-opener.tsx, packages/wonder-blocks-dropdown/src/components/single-select.tsx, packages/wonder-blocks-dropdown/src/components/__tests__/select-opener.test.tsx, packages/wonder-blocks-dropdown/src/components/__tests__/single-select.test.tsx

Don't want to be involved in this pull request? Comment #removeme and we won't notify you of further changes.

Copy link
Contributor

github-actions bot commented Jan 15, 2025

npm Snapshot: Published

🎉 Good news!! We've packaged up the latest commit from this PR (d8f5b03) and published all packages with changesets to npm.

You can install the packages in webapp by running:

./services/static/dev/tools/deploy_wonder_blocks.js --tag="PR2430"

Packages can also be installed manually by running:

yarn add @khanacademy/wonder-blocks-<package-name>@PR2430

Copy link
Contributor

github-actions bot commented Jan 15, 2025

Size Change: -365 B (-0.37%)

Total Size: 98 kB

Filename Size Change
packages/wonder-blocks-dropdown/dist/es/index.js 18.8 kB -365 B (-1.91%)
ℹ️ View Unchanged
Filename Size
packages/wonder-blocks-accordion/dist/es/index.js 3.77 kB
packages/wonder-blocks-banner/dist/es/index.js 1.53 kB
packages/wonder-blocks-birthday-picker/dist/es/index.js 1.77 kB
packages/wonder-blocks-breadcrumbs/dist/es/index.js 887 B
packages/wonder-blocks-button/dist/es/index.js 4.12 kB
packages/wonder-blocks-cell/dist/es/index.js 2.01 kB
packages/wonder-blocks-clickable/dist/es/index.js 3.06 kB
packages/wonder-blocks-core/dist/es/index.js 2.9 kB
packages/wonder-blocks-data/dist/es/index.js 6.24 kB
packages/wonder-blocks-form/dist/es/index.js 6.2 kB
packages/wonder-blocks-grid/dist/es/index.js 1.36 kB
packages/wonder-blocks-icon-button/dist/es/index.js 2.95 kB
packages/wonder-blocks-icon/dist/es/index.js 871 B
packages/wonder-blocks-labeled-field/dist/es/index.js 1.94 kB
packages/wonder-blocks-layout/dist/es/index.js 1.82 kB
packages/wonder-blocks-link/dist/es/index.js 2.28 kB
packages/wonder-blocks-modal/dist/es/index.js 5.42 kB
packages/wonder-blocks-pill/dist/es/index.js 1.65 kB
packages/wonder-blocks-popover/dist/es/index.js 4.85 kB
packages/wonder-blocks-progress-spinner/dist/es/index.js 1.52 kB
packages/wonder-blocks-search-field/dist/es/index.js 1.36 kB
packages/wonder-blocks-switch/dist/es/index.js 1.92 kB
packages/wonder-blocks-testing-core/dist/es/index.js 3.74 kB
packages/wonder-blocks-testing/dist/es/index.js 1.07 kB
packages/wonder-blocks-theming/dist/es/index.js 693 B
packages/wonder-blocks-timing/dist/es/index.js 1.8 kB
packages/wonder-blocks-tokens/dist/es/index.js 2.36 kB
packages/wonder-blocks-toolbar/dist/es/index.js 905 B
packages/wonder-blocks-tooltip/dist/es/index.js 6.99 kB
packages/wonder-blocks-typography/dist/es/index.js 1.23 kB

compressed-size-action

Copy link
Contributor

github-actions bot commented Jan 15, 2025

A new build was pushed to Chromatic! 🚀

https://5e1bf4b385e3fb0020b7073c-afcrdkowql.chromatic.com/

Chromatic results:

Metric Total
Captured snapshots 382
Tests with visual changes 10
Total stories 527
Inherited (not captured) snapshots [TurboSnap] 0
Tests on the build 382

Copy link
Member

@beaesguerra beaesguerra left a comment

Choose a reason for hiding this comment

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

Looks great! 🎉 Getting rid of the light prop simplifies the different state combinations we support!

<KindVariants light={false} />
<KindVariants light={true} />
<View style={[styles.gridRow]}>
<LabelMedium>Default</LabelMedium>
Copy link
Member

Choose a reason for hiding this comment

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

suggestion (non-blocking): We can use LabeledField in the examples since it's available in main now! (I forgot to update the dropdown AllVariants stories 😅)

Copy link
Member Author

Choose a reason for hiding this comment

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

Good call! I'll update this.

Copy link
Member

@beaesguerra beaesguerra left a comment

Choose a reason for hiding this comment

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

Looks great! 🚀

@jandrade jandrade merged commit d8d41dc into main Jan 21, 2025
14 checks passed
@jandrade jandrade deleted the rm-light-dropdown branch January 21, 2025 22:35
Copy link

codecov bot commented Jan 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 0.00%. Comparing base (d8c91db) to head (2d85b14).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@     Coverage Diff      @@
##   main   #2430   +/-   ##
============================
============================

Continue to review full report in Codecov by Sentry.

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

? "currentColor"
: tokens.color.white
: disabled
const iconColor = disabled
Copy link
Member

Choose a reason for hiding this comment

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

Nice to see this simplified!

};
}
},
press: activePressedStyling,
Copy link
Member

Choose a reason for hiding this comment

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

question: The other stateful style names follow a different naming convention, e.g. "disabled" or "active" as adjectives. Is press a new convention or should it follow the rest (and the previous naming)?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good question! this new press change is to follow a convention that we agreed with Design. I missed changing the variable name to make it more consistent, but I'll do it in a follow up PR. Stay tuned!

jandrade added a commit that referenced this pull request Jan 21, 2025
## Summary:

Following up on #2430.

This PR removes the `light` variant from the remaining form fields:

- `LabeledTextField`
- `TextField`
- `TextArea`
- `LabeledField`
- `SearchField`

This is based on the discussion with the design team where we decided to
remove the light prop from Wonder Blocks due to its low usage and to prepare
for the upcoming design changes.

Issue: WB-1851

## Test plan:

Verify that the light prop is removed from the components mentioned in the summary.

Author: jandrade

Reviewers: beaesguerra

Required Reviewers:

Approved By: beaesguerra

Checks: ✅ Chromatic - Get results on regular PRs (ubuntu-latest, 20.x), ✅ Test / Test (ubuntu-latest, 20.x, 2/2), ✅ Test / Test (ubuntu-latest, 20.x, 1/2), ✅ Lint / Lint (ubuntu-latest, 20.x), ✅ Check build sizes (ubuntu-latest, 20.x), ✅ Publish npm snapshot (ubuntu-latest, 20.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ Prime node_modules cache for primary configuration (ubuntu-latest, 20.x), ✅ Chromatic - Build on regular PRs / chromatic (ubuntu-latest, 20.x), ⏭️  Chromatic - Skip on Release PR (changesets), ⏭️  dependabot, ✅ gerald

Pull Request URL: #2437
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.

4 participants