Skip to content

Conversation

@jandrade
Copy link
Member

Summary:

This PR includes the following commits:

Issue: WB-1680

Test plan:

@changeset-bot
Copy link

changeset-bot bot commented Oct 24, 2025

🦋 Changeset detected

Latest commit: 745032f

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

This PR includes changesets to release 1 package
Name Type
@khanacademy/wonder-blocks-floating Minor

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

@github-actions
Copy link
Contributor

github-actions bot commented Oct 24, 2025

Size Change: +2.78 kB (+2.55%)

Total Size: 112 kB

Filename Size Change
packages/wonder-blocks-floating/dist/es/index.js 2.78 kB +2.78 kB (new file) 🆕
ℹ️ View Unchanged
Filename Size
packages/wonder-blocks-accordion/dist/es/index.js 3 kB
packages/wonder-blocks-announcer/dist/es/index.js 1.74 kB
packages/wonder-blocks-badge/dist/es/index.js 2.02 kB
packages/wonder-blocks-banner/dist/es/index.js 2.01 kB
packages/wonder-blocks-birthday-picker/dist/es/index.js 1.92 kB
packages/wonder-blocks-breadcrumbs/dist/es/index.js 755 B
packages/wonder-blocks-button/dist/es/index.js 4.25 kB
packages/wonder-blocks-card/dist/es/index.js 1.06 kB
packages/wonder-blocks-cell/dist/es/index.js 2.18 kB
packages/wonder-blocks-clickable/dist/es/index.js 2.66 kB
packages/wonder-blocks-core/dist/es/index.js 2.48 kB
packages/wonder-blocks-data/dist/es/index.js 5.48 kB
packages/wonder-blocks-dropdown/dist/es/index.js 19.5 kB
packages/wonder-blocks-form/dist/es/index.js 6.2 kB
packages/wonder-blocks-grid/dist/es/index.js 1.24 kB
packages/wonder-blocks-icon-button/dist/es/index.js 3.2 kB
packages/wonder-blocks-icon/dist/es/index.js 1.91 kB
packages/wonder-blocks-labeled-field/dist/es/index.js 3.48 kB
packages/wonder-blocks-layout/dist/es/index.js 1.63 kB
packages/wonder-blocks-link/dist/es/index.js 1.52 kB
packages/wonder-blocks-modal/dist/es/index.js 7.06 kB
packages/wonder-blocks-pill/dist/es/index.js 1.31 kB
packages/wonder-blocks-popover/dist/es/index.js 4.3 kB
packages/wonder-blocks-progress-spinner/dist/es/index.js 1.48 kB
packages/wonder-blocks-search-field/dist/es/index.js 1.1 kB
packages/wonder-blocks-styles/dist/es/index.js 464 B
packages/wonder-blocks-switch/dist/es/index.js 1.55 kB
packages/wonder-blocks-tabs/dist/es/index.js 3.74 kB
packages/wonder-blocks-testing-core/dist/es/index.js 3.25 kB
packages/wonder-blocks-testing/dist/es/index.js 978 B
packages/wonder-blocks-theming/dist/es/index.js 384 B
packages/wonder-blocks-timing/dist/es/index.js 1.37 kB
packages/wonder-blocks-tokens/dist/es/index.js 5.01 kB
packages/wonder-blocks-toolbar/dist/es/index.js 906 B
packages/wonder-blocks-tooltip/dist/es/index.js 6.4 kB
packages/wonder-blocks-typography/dist/es/index.js 1.57 kB

compressed-size-action

@github-actions
Copy link
Contributor

github-actions bot commented Oct 24, 2025

A new build was pushed to Chromatic! 🚀

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

Chromatic results:

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

jandrade and others added 9 commits October 28, 2025 11:16
## Summary:

- Adds `@floating-ui/react` dependency to the project.
- Adds Floating folder structure and initial Floating component.

**NOTE:** The next PR will include the base version of the `Floating` component. I'll be making more adjustments to that component as soon as I start converting existing Popper cases to use this component.

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

## Test plan:

Verify that all checks pass.

Author: jandrade

Reviewers: beaesguerra, jandrade

Required Reviewers:

Approved By: beaesguerra

Checks: ✅ 12 checks were successful, ⏭️  2 checks have been skipped

Pull Request URL: #2835
## Summary:

This PR introduces the Floating component to Wonder Blocks. This is the first
version of the component with basic properties and middleware support.

Also included the Storybook documentation and snapshot tests for the component.

<img width="864" height="493" alt="Screenshot 2025-10-29 at 10 20 14 AM" src="https://github.com/user-attachments/assets/3aa899fe-d039-434d-ae7b-c13e31c2ae60" />


**NOTE:** Next PRs will add more features and props to the Floating component.

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

## Test plan:

- Verify that the docs look correct in Storybook: `/?path=/docs/packages-floating-floating--docs`

- Also verify that the snapshot tests look good: `/?path=/story/packages-floating-testing-snapshots-floating--scenarios`

Author: jandrade

Reviewers: beaesguerra, jandrade

Required Reviewers:

Approved By: beaesguerra

Checks: ✅ 12 checks were successful, ⏭️  2 checks have been skipped

Pull Request URL: #2842
## Summary:

Next step on the Floating component:

- Adds portal prop and copies maybeGetPortalMountedModalHostElement from WB
Modal.

### Implementation plan:

1. #2835
2. #2842
3. Add portal prop to Floating component (this PR)
4. Add focus management
5. Add `style` prop and RTL support


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

## Test plan:

Navigate to the Floating component stories and verify that the portal example
works as expected. This means that the floating content should be rendered
inside the modal host element.

Also verify that this looks and works good in the Floating Testing Snapshots
story.

Author: jandrade

Reviewers: jandrade, somewhatabstract, beaesguerra, marcysutton

Required Reviewers:

Approved By: somewhatabstract, beaesguerra

Checks: ✅ 12 checks were successful, ⏭️  2 checks have been skipped

Pull Request URL: #2844
@github-actions
Copy link
Contributor

github-actions bot commented Nov 20, 2025

npm Snapshot: Published

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

You can install the packages in frontend by running:

./dev/tools/deploy_wonder_blocks.js --tag="PR2832"

Packages can also be installed manually by running:

pnpm add @khanacademy/wonder-blocks-<package-name>@PR2832

jandrade and others added 7 commits November 25, 2025 14:49
## Summary:

- Adds focus management support to Wonder Blocks Floating

Implementation plan:

- #2835
- #2842
- #2844
- Add focus management (this PR)
- Add style prop and RTL support

Issue: WB-2111

## Test plan:

Navigate to the Floating component stories and verify that the focus management
works as expected in the "Focus Manager" section.

Author: jandrade

Reviewers: beaesguerra, jandrade, marcysutton

Required Reviewers:

Approved By: beaesguerra

Checks: ✅ 12 checks were successful, ⏭️  3 checks have been skipped

Pull Request URL: #2846
## Summary:

Next floating PR that adds the `styles` prop to customize the look and feel of
the floating element.

Note that this slightly differs from the implementation spec as we use SVG for
the arrow element, so we expose different keys in the `styles.arrow` object.


Issue: WB-2111

## Test plan:

Navigate to `/?path=/docs/packages-floating--docs&globals=direction:ltr#custom-styles`.

Verify that the docs are correct and the styles are looking as expected.

Also verify that the "Custom styles" case is added to the scenarios snapshot.

Author: jandrade

Reviewers: jandrade, beaesguerra

Required Reviewers:

Approved By: beaesguerra

Checks: ✅ 11 checks were successful, ⏭️  4 checks have been skipped

Pull Request URL: #2880
## Summary:

Adds right-to-left support to Floating component.

To support this, I've created a custom middleware to be able to mirror the
floating placement in RTL contexts.

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

## Test plan:

Navigate to any floating stories, select the `RTL` mode, and verify that the
floating element flips when the `placement` is `left*` or `right*`.

Author: jandrade

Reviewers: marcysutton, beaesguerra, jandrade

Required Reviewers:

Approved By: marcysutton, beaesguerra

Checks: ✅ 11 checks were successful, ⏭️  4 checks have been skipped

Pull Request URL: #2881
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants