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

docs: reorganize query docs #735

Merged
merged 6 commits into from
Jan 13, 2021
Merged

docs: reorganize query docs #735

merged 6 commits into from
Jan 13, 2021

Conversation

alexkrolick
Copy link
Collaborator

@alexkrolick alexkrolick commented Jan 13, 2021

Closes #485

- give queries a top-level nav entry instead of
  nesting under DOM Testing Library
- give each query its own page
- reorganize pages like "Which Query" under the new heading
- update internal links and redirects
@@ -0,0 +1,418 @@
---
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This and the other pages in the queries folder are the main changes in this PR

Copy link
Member

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

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

I'm a big fan of this improvement 👍

this is awesome

Copy link
Member

@eps1lon eps1lon left a comment

Choose a reason for hiding this comment

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

Really appreciated that!

give queries a top-level nav entry instead of
nesting under DOM Testing Library

I expected it to appear in the left sidebar and it took me some time to find the new link. What does everyone think about moving it to the left sidebar?

Frameworks > DOM Testing Library > Queries now just lists a single link to /docs/queries/about/. Would it be simpler to redirect from /docs/dom-testing-library/api-queries to /docs/queries/about/ and remove internal usage of /docs/dom-testing-library/api-queries?

docs/dom-testing-library/api-async.mdx Outdated Show resolved Hide resolved
docs/queries/about.mdx Show resolved Hide resolved
@MatanBobi
Copy link
Member

I really like this change.
I agree with @eps1lon that we're used to finding these at the left sidebar but I think it's helpful to have it at a top level.
We also wanted to unify the async utilities and the firing events sections.
I'm trying to see if this solution is scalable or maybe we need to create a more generic title?

Co-authored-by: Sebastian Silbermann <silbermann.sebastian@gmail.com>
Co-authored-by: Adrià Fontcuberta <afontcu@gmail.com>
Copy link
Member

@afontcu afontcu left a comment

Choose a reason for hiding this comment

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

This looks great 🎉

docs/dom-testing-library/api-async.mdx Outdated Show resolved Hide resolved
const { getByText } = within(document.getElementById('messages'))
const helloMessage = getByText('hello')
const messages = document.getElementById('messages')
const helloMessage = within(messages).getByText('hello')
Copy link
Member

Choose a reason for hiding this comment

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

way more clear 👌

Co-authored-by: Adrià Fontcuberta <afontcu@gmail.com>
@alexkrolick
Copy link
Collaborator Author

remove internal usage of /docs/dom-testing-library/api-queries

I think I got rid of these, but left the page in the DOM TL tree so that it would at least contain the full API if you are browsing library docs directly. It might make sense to add some more text later that explains the relationship between the core APIs, DOM Testlng Lib, and framework wrappers.

should this go in the sidebar?

One thing I like about giving it its own section is that we can keep the nav list expanded on page load. I could see "Core API" or just "API" being the title, in order to make room for an "interactions" (events) section, but I think the top nav having both "Docs" and "API" would be confusing

what if we add async and events sections?

I have been thinking we basically need all the concepts from my talk here https://www.youtube.com/watch?v=b8SOFNc_X_A pulled into a docs page. On top of that, we should give all of the top-level APIs the same treatment as the Queries, so you can browse most of them at a glance from the left nav rather than clicking into pages.

@alexkrolick
Copy link
Collaborator Author

alexkrolick commented Jan 13, 2021

How does this look? I took out the top-nav Queries and moved it to a prominent section in Docs, and moved the event-related pages in the same section. I'd still want to clean up the event stuff later.

image

Copy link
Member

@eps1lon eps1lon left a comment

Choose a reason for hiding this comment

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

Looks great 👍

@alexkrolick alexkrolick merged commit 8e017df into master Jan 13, 2021
@alexkrolick
Copy link
Collaborator Author

alexkrolick commented Jan 13, 2021

I'm pretty happy with how this brings up some more sections into the top-level and makes it apparent where there are gaps. As @afontcu pointed out, events could use a cleanup. If anyone wants to jump on that soon, feel free.

Merging this iteration now.

@MatanBobi
Copy link
Member

Looks great, I think that's a really good separation :)

@nickmccurdy nickmccurdy deleted the reorganize branch January 13, 2021 11:02
@MatanBobi
Copy link
Member

MatanBobi commented Jan 18, 2021

@alexkrolick I think that this PR accidentally pushed a yarn.lock file and i18n files that were on the old site..
Am I missing something or we can remove those? :)

@alexkrolick
Copy link
Collaborator Author

@MatanBobi you're right, feel free to clean up

This was referenced Feb 28, 2021
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.

Unify "Queries" page
5 participants