Skip to content

feat: Tree multiple level loading support and only count "items" for collection size #8349

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

Open
wants to merge 20 commits into
base: main
Choose a base branch
from

Conversation

LFDanLu
Copy link
Member

@LFDanLu LFDanLu commented Jun 4, 2025

Closes RSP Component Milestones (view)

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

Test Tree multiloading stories in RAC storybook. Also test all collections that support loading indicators (Table, Listbox, GridList, Tree, ComboBox, Picker, etc) and make sure that the virtualized items have the proper aria-rowcount/posinset/etc. Loaders shouldn't be counted as items/rows. Sanity check that other collections work fine virtualized/non-virtualized and that empty states/initial load states still render as expected

🧢 Your Project:

RSP

@rspbot
Copy link

rspbot commented Jun 5, 2025

Build successful! 🎉

@rspbot
Copy link

rspbot commented Jun 5, 2025

Build successful! 🎉

@rspbot
Copy link

rspbot commented Jun 17, 2025

Build successful! 🎉

@LFDanLu LFDanLu changed the title feat: Tree multiple level loading support feat: Tree multiple level loading support and only count "items" for collection size Jun 17, 2025
@rspbot
Copy link

rspbot commented Jun 17, 2025

Build successful! 🎉

@rspbot
Copy link

rspbot commented Jun 17, 2025

## API Changes

react-aria-components

/react-aria-components:UNSTABLE_TreeLoadingIndicator

-UNSTABLE_TreeLoadingIndicator <T extends {}> {
-  children?: ReactNode | ((UNSTABLE_TreeLoadingIndicatorRenderProps & {
-    defaultChildren: ReactNode | undefined
-})) => ReactNode
-  className?: string | ((UNSTABLE_TreeLoadingIndicatorRenderProps & {
-    defaultClassName: string | undefined
-})) => string
-  style?: CSSProperties | ((UNSTABLE_TreeLoadingIndicatorRenderProps & {
-    defaultStyle: CSSProperties
-})) => CSSProperties | undefined
-}

/react-aria-components:UNSTABLE_TreeLoadingSentinel

+UNSTABLE_TreeLoadingSentinel <T extends {}> {
+  children?: ReactNode | ((TreeLoadingSentinelRenderProps & {
+    defaultChildren: ReactNode | undefined
+})) => ReactNode
+  className?: string | ((TreeLoadingSentinelRenderProps & {
+    defaultClassName: string | undefined
+})) => string
+  isLoading?: boolean
+  onLoadMore?: () => any
+  scrollOffset?: number = 1
+  style?: CSSProperties | ((TreeLoadingSentinelRenderProps & {
+    defaultStyle: CSSProperties
+})) => CSSProperties | undefined
+}

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