Skip to content

chore: Lightbox single slide - #11030

Open
yihuiliao wants to merge 3 commits into
mainfrom
lightbox-single-slide
Open

yihuiliao wants to merge 3 commits into
mainfrom
lightbox-single-slide

Conversation

@yihuiliao

@yihuiliao yihuiliao commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

Summary

Removes the prev/next buttons and tablist when there is only one attachment to preview.'

Also prevents focus from wrapping in the tablist.

📝 Test Instructions

Test the Single Item dialog story

Release impact

  • Only changes docs, tests, CI, or development tools. Nothing shipped to users changes.
  • Fixes a bug or improves existing code without changing how apps use it.
  • Adds a feature or API while keeping existing usage working.
  • May break existing usage or require changes in apps that use this code.

✅ PR Checklist

  • I followed the contributing guide.
  • I tested this change locally and included the results in Test Instructions, or explained why testing does not apply.
  • I understand and can explain every change in this PR. If I used AI assistance, I followed the AI contribution guidance.

🧢 Your Project

@rspbot

rspbot commented Nov 25, 2026

Copy link
Copy Markdown

@rspbot

rspbot commented Nov 25, 2026

Copy link
Copy Markdown
## API Changes

@react-spectrum/ai

/@react-spectrum/ai:LightboxCarousel

 LightboxCarousel {
   aria-describedby?: string
   aria-details?: string
   aria-label?: string
   aria-labelledby?: string
   children: ReactNode
   id?: string
   onSelectionChange?: (Key) => void
-  shouldFocusWrap?: boolean = true
   slot?: string | null
 }

/@react-spectrum/ai:LightboxCarouselProps

 LightboxCarouselProps {
   aria-describedby?: string
   aria-details?: string
   aria-label?: string
   aria-labelledby?: string
   children: ReactNode
   id?: string
   onSelectionChange?: (Key) => void
-  shouldFocusWrap?: boolean = true
   slot?: string | null
 }

@rspbot

rspbot commented Nov 25, 2026

Copy link
Copy Markdown

Agent Skills Changes

Modified (9)
Install

React Spectrum S2:

npx skills add https://d1pzu54gtk2aed.cloudfront.net/pr/ebc7728e243181080e145895ac850584561c3ebb/

React Aria:

npx skills add https://d5iwopk28bdhl.cloudfront.net/pr/ebc7728e243181080e145895ac850584561c3ebb/

let {getByRole, queryByRole} = render(<Carousel itemIds={['one']} />);
expect(queryByRole('tablist')).not.toBeInTheDocument();
expect(queryByRole('tab')).not.toBeInTheDocument();
expect(queryByRole('tabpanel')).not.toBeInTheDocument();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I thought we were leaving in the single tab, just hiding next/prev?

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.

3 participants