Skip to content

docs: update user-event references #1030

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 11 commits into from
Mar 29, 2022
Merged

docs: update user-event references #1030

merged 11 commits into from
Mar 29, 2022

Conversation

ph-fritsche
Copy link
Member

Update all references to user-event preparing for the upcoming release.

This should be merged once the version is released on latest:

  • user-event@14 has been released.

@ph-fritsche
Copy link
Member Author

ph-fritsche commented Mar 25, 2022

Note: The format script produces broken block quotes in Markdown

> bug fixes and new features. You can find the docs for `[email protected]`
> [here](../ecosystem-user-event.mdx).

becomes

> bug fixes and new features. You can find the docs for `[email protected]` >
> [here](../ecosystem-user-event.mdx).

Copy link
Member

@MatanBobi MatanBobi left a comment

Choose a reason for hiding this comment

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

Looks good :)
Question about the formatting, it looks like a lot of things changed there, did we not run format before or maybe you're by any chance using a different prettier configs?

render(<Checkbox />)
const user = userEvent.setup()

// You can also call this method directly on userEvent,
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure if that's even something we want to "share". If we believe that the recommended approach is to use the methods returned from setup, maybe this comment isn't helpful and can only cause bad practices. Wdyt?

Copy link
Member Author

@ph-fritsche ph-fritsche Mar 25, 2022

Choose a reason for hiding this comment

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

I think it eases the transition for people who are used to the previous APIs. That's why the Direct APIs still exist.

If there is only a single API call, it makes no difference, as the Direct APIs call .setup() internally and then use the method from there.

If it helps or hurts to mention it in the example - I don't know.
But I thought maybe mentioning it makes it sound "easier" to use.

@ph-fritsche
Copy link
Member Author

did we not run format before or maybe you're by any chance using a different prettier configs?

I think I skipped format before.

I'm not sure I like what prettier does to the Markdown files. A lot of lines are much harder to comprehend with the line breaks at fixed width instead of at the end of subclauses.

@eps1lon
Copy link
Member

eps1lon commented Mar 26, 2022

Are the old links properly redirecting? For example, if an external site linked to a user-event page, will that link continue to work or return a 404?

@ph-fritsche
Copy link
Member Author

Good point. For now the old page isn't removed. Later I would remove it from the navigation, but keep the page itself as long as there is a significant number of downloads for v13.

> This page describes `[email protected]`.
If you are starting or actively working on a project,
we recommend to use [`[email protected]`](user-event/intro.mdx) instead, as it includes important bug fixes and new features.
> This page describes `[email protected]`.
Copy link
Member

Choose a reason for hiding this comment

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

What do you think of making this a warning https://docusaurus.io/docs/markdown-features/admonitions?
To me, this doesn't stand out and could be overlooked.

Copy link
Member Author

Choose a reason for hiding this comment

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

I converted those blockquotes on the intro into admonitions. :)

@ph-fritsche
Copy link
Member Author

v14 has been released 🚀

@ph-fritsche ph-fritsche merged commit 8acaf6e into main Mar 29, 2022
@ph-fritsche ph-fritsche deleted the userevent-release branch March 29, 2022 07:51
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.

4 participants