Skip to content

Add getBy docs pages #2023

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

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

Add getBy docs pages #2023

wants to merge 12 commits into from

Conversation

ankur22
Copy link
Contributor

@ankur22 ankur22 commented Aug 8, 2025

What?

This adds docs pages for the following APIs:

Checklist

  • I have used a meaningful title for the PR.
  • I have described the changes I've made in the "What?" section above.
  • I have performed a self-review of my changes.
  • I have run the npm start command locally and verified that the changes look good.
  • I have made my changes in the docs/sources/k6/next folder of the documentation.

Related PR(s)/Issue(s)

Check links in description.

@ankur22 ankur22 requested review from heitortsergent and a team as code owners August 8, 2025 14:19
@ankur22 ankur22 requested review from mstoykov and inancgumus and removed request for a team August 8, 2025 14:19
Copy link
Contributor

@mstoykov mstoykov left a comment

Choose a reason for hiding this comment

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

Please add


{{< code >}}

<!-- md-k6:skip -->

before and

{{< /code >}}

After all the code examples that won't run.

@ankur22 ankur22 requested a review from mstoykov August 8, 2025 15:36

</TableWithNestedRows>

### Returns
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
### Returns
### Returns

Is this following the same pattern as other pages? It looks like we could move the headings up for all of these (from h3 to h2, etc.)

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 think we have this issue in most of the browser docs (maybe elsewhere too) where the heading is one level too low. Would you rather I fix all of them in a new PR?

@heitortsergent
Copy link
Collaborator

Just to clarify, we don't need to use the {{ < code > }} if we have a code block for one language. We only need to use it if we want to show a code example in multiple languages, and to have the tabbed feature on that code block. We have an example here.

@heitortsergent heitortsergent added the Area: browser The browser module label Aug 8, 2025
@ankur22
Copy link
Contributor Author

ankur22 commented Aug 11, 2025

Just to clarify, we don't need to use the {{ < code > }} if we have a code block for one language. We only need to use it if we want to show a code example in multiple languages, and to have the tabbed feature on that code block. We have an example here.

Thanks for clarifying! I was wondering whether I needed them or not. When I remove them, then can i still work with <!-- md-k6:skip --> and <!-- eslint-skip -->?

EDIT: Yep, those directives still work without the {{< code >}}, so i'll remove them to avoid confusion in the future.

...with one language (js or html in a single given example).
@ankur22 ankur22 requested a review from heitortsergent August 11, 2025 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: browser The browser module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants