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

Re-export FileTrigger to RSP #6295

Merged
merged 7 commits into from
May 1, 2024
Merged

Re-export FileTrigger to RSP #6295

merged 7 commits into from
May 1, 2024

Conversation

yihuiliao
Copy link
Member

Closes

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

@@ -155,6 +156,13 @@ A React implementation of Spectrum, Adobe’s design system.
<ActionGroup />
</ExampleCard>

<ExampleCard
url="https://react-spectrum.adobe.com/react-aria/FileTrigger.html"
Copy link
Member Author

@yihuiliao yihuiliao Apr 30, 2024

Choose a reason for hiding this comment

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

is it confusing to link to the react-aria docs cause then it says to import file trigger from react-aria-components. the only place where it's known that you can import filetrigger from @adobe/react-spectrum are the examples in the RSP dropzone docs

should we just create docs for filetrigger that are mostly copied from rac?

Copy link
Member

Choose a reason for hiding this comment

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

Good point, I forgot that people might want to use FileTrigger standalone. Might be worth making a copy of the docs in RSP in that case then so that it shows up in the sidebar as well

@rspbot
Copy link

rspbot commented Apr 30, 2024

@yihuiliao yihuiliao marked this pull request as ready for review April 30, 2024 17:41
@adobe adobe deleted a comment from rspbot Apr 30, 2024
@rspbot
Copy link

rspbot commented Apr 30, 2024

@adobe adobe deleted a comment from rspbot Apr 30, 2024
Copy link
Member

@ktabors ktabors left a comment

Choose a reason for hiding this comment

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

Spotted a couple minor things.

## Example

```tsx example
import {FileTrigger, Button} from '@adobe/react-spectrum';
Copy link
Member

Choose a reason for hiding this comment

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

Isn't our pattern to use @react-spectrum/dropzone.mdx and have the docs build replace it with @adobe/react-spectrum?

Copy link
Member Author

Choose a reason for hiding this comment

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

oh im not sure. do you mind clarifying what you mean? i checked some other doc examples and they seem to import from '@adobe/react-spectrum' directly

Copy link
Member

Choose a reason for hiding this comment

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

I don't think it really matters either way, just so long as the final result is that the import shows the mono package

packages/@react-spectrum/filetrigger/index.ts Outdated Show resolved Hide resolved
packages/@react-spectrum/filetrigger/src/index.ts Outdated Show resolved Hide resolved
@rspbot
Copy link

rspbot commented Apr 30, 2024

@adobe adobe deleted a comment from rspbot Apr 30, 2024
@rspbot
Copy link

rspbot commented Apr 30, 2024

LFDanLu
LFDanLu previously approved these changes Apr 30, 2024
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.

The structure of the docs for FileTrigger is a bit different from that of the other RSP components but I think its fine.

@rspbot
Copy link

rspbot commented May 1, 2024

@devongovett
Copy link
Member

A bit overkill to add an entire new package just for a re-export, but ok I guess. 😄

@rspbot
Copy link

rspbot commented May 1, 2024

@rspbot
Copy link

rspbot commented May 1, 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: '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' }
unknown top level export { type: 'identifier', name: 'Column' }
unknown top level export { type: 'identifier', name: 'Column' }
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 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' }

@react-spectrum/filetrigger

FileTrigger

-
+FileTrigger {
+  acceptDirectory?: boolean
+  acceptedFileTypes?: Array<string>
+  allowsMultiple?: boolean
+  children?: ReactNode
+  defaultCamera?: 'user' | 'environment'
+  onSelect?: (FileList | null) => void
+}

FileTriggerProps

-
+FileTriggerProps {
+  acceptDirectory?: boolean
+  acceptedFileTypes?: Array<string>
+  allowsMultiple?: boolean
+  children?: ReactNode
+  defaultCamera?: 'user' | 'environment'
+  onSelect?: (FileList | null) => void
+}

@dannify dannify merged commit 0e05b7e into main May 1, 2024
25 checks passed
@dannify dannify deleted the export-filetrigger branch May 1, 2024 01:12
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.

None yet

7 participants