-
Notifications
You must be signed in to change notification settings - Fork 12
Feature branch pull-request from feature/floating-ui to main
#2832
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
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 745032f The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
|
Size Change: +2.78 kB (+2.55%) Total Size: 112 kB
ℹ️ View Unchanged
|
A new build was pushed to Chromatic! 🚀https://5e1bf4b385e3fb0020b7073c-uxekzqyplv.chromatic.com/ Chromatic results:
|
## 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
… feature/floating-ui
… feature/floating-ui
## 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
… feature/floating-ui
… feature/floating-ui
## 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
… feature/floating-ui
… feature/floating-ui
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 ./dev/tools/deploy_wonder_blocks.js --tag="PR2832"Packages can also be installed manually by running: pnpm add @khanacademy/wonder-blocks-<package-name>@PR2832 |
## 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
… feature/floating-ui
… feature/floating-ui
## 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
… feature/floating-ui
## 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
… feature/floating-ui
Summary:
This PR includes the following commits:
Issue: WB-1680
Test plan: