Skip to content

RAC Submenu: remove SubmenuContext and pass portal container via PopoverContext#5803

Merged
reidbarber merged 6 commits intomainfrom
rac-submenu-remove-context
Feb 8, 2024
Merged

RAC Submenu: remove SubmenuContext and pass portal container via PopoverContext#5803
reidbarber merged 6 commits intomainfrom
rac-submenu-remove-context

Conversation

@reidbarber
Copy link
Member

Quick follow-up for #5648 (comment)

✅ 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:

🧢 Your Project:

@reidbarber reidbarber marked this pull request as draft February 5, 2024 18:06
@rspbot
Copy link

rspbot commented Feb 5, 2024

trigger: 'SubmenuTrigger',
triggerRef: ref,
placement: 'end top',
UNSTABLE_portalContainer: submenuContext.popoverContainerRef.current || undefined,
Copy link
Member

Choose a reason for hiding this comment

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

Oh should UNSTABLE_portalContainer really be UNSTABLE_portalContainerRef?

Copy link
Member

Choose a reason for hiding this comment

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

Then we'd pass the ref itself? instead of taking current out?

Copy link
Member Author

Choose a reason for hiding this comment

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

This was released in December, so I think it would be breaking? #5381

Copy link
Member Author

Choose a reason for hiding this comment

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

We could add a new UNSTABLE_portalContainerRef prop and try to use that first.

Copy link
Member

Choose a reason for hiding this comment

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

oh, for some reason I thought we only just added it

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah it was recently added to RSP

Copy link
Member

Choose a reason for hiding this comment

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

it is technically UNSTABLE, so i don't think changing it would count as a breaking change. however, I still think we should only do it if absolutely necessary

@reidbarber reidbarber marked this pull request as ready for review February 5, 2024 20:53
@rspbot
Copy link

rspbot commented Feb 5, 2024

@rspbot
Copy link

rspbot commented Feb 8, 2024

@rspbot
Copy link

rspbot commented Feb 8, 2024

@rspbot
Copy link

rspbot commented Feb 8, 2024

## API Changes

unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any', access: 'private' }
unknown top level export { type: 'any', access: 'private' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'identifier', name: 'Column' }
unknown top level export { type: 'identifier', name: 'Column' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }

@reidbarber reidbarber merged commit 2c229fd into main Feb 8, 2024
@reidbarber reidbarber deleted the rac-submenu-remove-context branch February 8, 2024 23:46
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.

5 participants