Skip to content
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

Expose shouldCloseOnInteractOutside on Modal / ModalOverlay #5986

Merged
merged 2 commits into from
Mar 9, 2024

Conversation

sookmax
Copy link
Contributor

@sookmax sookmax commented Mar 2, 2024

Closes #5916

In addition to the fix, I updated how Pick<> TS type is handled in DocsPackager.js.

In particular, the condition that I wrote last time to avoid some side effects (i.e., if (application[0]?.type === 'application')) was preventing the correct parsing of Pick<> when the expression doesn't involve generics (e.g., when the condition is present, something like Pick<AriaOverlayProps, 'shouldCloseOnInteractOutside'> wouldn't work whereas something like Pick<DatePickerStateOptions<T>, 'shouldCloseOnSelect'> would).

So by removing the aforementioned condition, a side effect such as the one described in the comment would come to life again unfortunately. I couldn't find a way to distinguish and process differently for such a case.

Without that condition it's the same as how Omit<> is processed. And yes, I checked Omit<> also suffers from the same side effects.

βœ… 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:

Stories

Docs

🧒 Your Project:

@snowystinger
Copy link
Member

GET_BUILD

@rspbot
Copy link

rspbot commented Mar 5, 2024

@rspbot
Copy link

rspbot commented Mar 5, 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' }

Copy link
Member

@snowystinger snowystinger left a comment

Choose a reason for hiding this comment

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

thanks for submitting!

Copy link
Member

@LFDanLu LFDanLu left a comment

Choose a reason for hiding this comment

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

LGTM, thanks! We can try to dig into making the docs types processer better for the Pick as a followup

@LFDanLu LFDanLu merged commit 89fa370 into adobe:main Mar 9, 2024
27 checks passed
@sookmax
Copy link
Contributor Author

sookmax commented Mar 9, 2024

@LFDanLu I'm not so sure if we can distinguish the case where we need the literal Pick<> from the case where we want to merge the Pick<> (most of the use cases) in the current docs-processing structure. I even tried to use one of the JS doc's tag @constant to label the literal Pick<> in the comment and process them differently, but failed to make it work 😭.

But maybe there's a way that I'm not aware of, and I'm all for correcting this docs-processing issue, so let me know if I can be of any help achieving that!

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.

[RAC] Using Dialog with 3rd parties that portal into document.body
4 participants