Skip to content

docs: add reference to applyAccept from upload() #1144

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

Merged
merged 2 commits into from
Aug 29, 2022

Conversation

khitrenovich
Copy link
Contributor

See testing-library/user-event#1046 (comment) for related discussion.

@netlify
Copy link

netlify bot commented Aug 25, 2022

Deploy Preview for testing-library ready!

Name Link
🔨 Latest commit 4d76e44
🔍 Latest deploy log https://app.netlify.com/sites/testing-library/deploys/630cbc1e2f3ad30008527fcd
😎 Deploy Preview https://deploy-preview-1144--testing-library.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Comment on lines 152 to 153
Files that don't match an `accept` property will be automatically discarded,
unless [`applyAccept`](options.mdx#applyaccept) is set to `false`.
Copy link
Member

Choose a reason for hiding this comment

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

Suggestion: can we add this in an Admonitions?

Suggested change
Files that don't match an `accept` property will be automatically discarded,
unless [`applyAccept`](options.mdx#applyaccept) is set to `false`.
:::info
Files that don't match an `accept` property will be automatically discarded,
unless [`applyAccept`](options.mdx#applyaccept) is set to `false`.
:::

Copy link
Contributor Author

@khitrenovich khitrenovich Aug 26, 2022

Choose a reason for hiding this comment

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

We can, but I don't see it being used anywhere in the User Interactions area. Instead, I see quoting (>) is being used to mark notes (example), likely being the less visually-intrusive alternative. I can convert it to admonition, to a quote or just leave it as is - the decision would happen between you and @ph-fritsche , I guess.

Copy link
Member

Choose a reason for hiding this comment

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

Actually, now that I've seen it on the preview website it looks good.
The reason why I mentioned it was because I would see myself looking at the docs exactly because files might be discarded and I wanted to know why. Hence, I thought it would be better that it would stand out. But it looks good now already.
@ph-fritsche you got the final say here :)

Copy link
Member

Choose a reason for hiding this comment

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

I would make this a new paragraph. The other sections start with a very short description of what the API does. Often just the name of the API used in a proper sentence.
This might not make for the best novel read, but it is easy to follow when skim reading.

The admonitions stick out. I'd reserve them for information that doesn't "fit in the story" but is too important to be just placed somewhere else.

But I'm fine with it either way.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree with what I read above - people will come to see the docs "exactly because files might be discarded", so the note should be "easy to follow when skim reading", but not "stick out". I think quoting makes the best balance, and it is already extensively used in the other paragraphs of the same file. I've made the adjustment, LMK if that looks better. I'm happy to tweak it further if needed.

@timdeschryver timdeschryver merged commit dac24e9 into testing-library:main Aug 29, 2022
@timdeschryver
Copy link
Member

@all-contributors please add @khitrenovich for docs

@allcontributors
Copy link
Contributor

@timdeschryver

I've put up a pull request to add @khitrenovich! 🎉

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.

3 participants