Skip to content

Commit

Permalink
Set heightTogglers
Browse files Browse the repository at this point in the history
  • Loading branch information
ppcano committed Oct 21, 2020
1 parent 2b78f5b commit 6e3447b
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING_FILE_FORMAT.md
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ You can provide large code blocks (>400px, ~20 LoC) with expand/collapse toggler

Prop `heightTogglers` passed to `CodeGroup` component makes it possible, which works very similar to `labels` and `lineNumbers` props:

<CodeGroup labels={["Nice code!", "This one is better", "Oh my.."]} lineNumbers={[true, true, true]} heightTogglers=[true, false, false]>
<CodeGroup labels={["Nice code!", "This one is better", "Oh my.."]} lineNumbers={[true, true, true]} heightTogglers={[true, false, false]}>

```javascript
// a lot of lines of code,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ $ k6 run --summary-export=export.json --out datadog script.js

The format of the summary is like:

<CodeGroup labels={[ "export.json" ]}>
<CodeGroup labels={[ "export.json" ]} heightTogglers={[true]}>

```json
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ You want to run a smoke test to:
Here's a relatively simple smoke test script to get you started. You can copy it, change a few URLs and start testing in no time.
If you would like to see more comprehensive script, check out our [example section](/examples).

<CodeGroup labels={["sample-smoke-test.js"]} lineNumbers={[true]}>
<CodeGroup labels={["sample-smoke-test.js"]} lineNumbers={[true]} heightTogglers={[true]}>

```javascript
import http from 'k6/http';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ therefore it's recommended to configure the load test with the high load in mind
Note, this test has one simple threshold. The response time for 99% requests must be below 1.5 seconds.
Thresholds are a way of ensuring that your system is meeting the performance goals you set for it.

<CodeGroup labels={["sample-load-test.js"]} lineNumbers={[true]}>
<CodeGroup labels={["sample-load-test.js"]} lineNumbers={[true]} heightTogglers={[true]}>

```javascript
import http from 'k6/http';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ You can easily create a stress test in k6 by properly configuring the `options`
Remember, the point of this test is to gradually push your APIs beyond its breaking point.
It's probably the easiest to start with an example.

<CodeGroup labels={["API stress test k6 example"]} lineNumbers={[true]}>
<CodeGroup labels={["API stress test k6 example"]} lineNumbers={[true]} heightTogglers={[true]}>

```javascript
import http from 'k6/http';
Expand Down Expand Up @@ -162,7 +162,7 @@ Success or failure of a spike test depends on your expectations. Systems general

Here's an example script configuration for a spike test.

<CodeGroup labels={["Spike test k6 example"]} lineNumbers={[true]}>
<CodeGroup labels={["Spike test k6 example"]} lineNumbers={[true]} heightTogglers={[true]}>

```javascript
import http from 'k6/http';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Some errors are related to time, and not to the total number of requests execute

Here's a sample test configuration.

<CodeGroup labels={["sample-soak-test.js"]} lineNumbers={[true]}>
<CodeGroup labels={["sample-soak-test.js"]} lineNumbers={[true]} heightTogglers={[true]}>

```javascript
import http from 'k6/http';
Expand Down
2 changes: 1 addition & 1 deletion src/data/markdown/docs/01 guides/06 Misc/05 Archive.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ Breaking down the file structure we get:

**_scripts_** contains the full original directory tree of all `import`'ed JS dependencies.

<CodeGroup labels={["metadata.json"]} lineNumbers={[true]}>
<CodeGroup labels={["metadata.json"]} lineNumbers={[true]} heightTogglers={[true]}>

```json
{
Expand Down

1 comment on commit 6e3447b

@ppcano
Copy link
Collaborator Author

@ppcano ppcano commented on 6e3447b Oct 21, 2020

Choose a reason for hiding this comment

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

@simskij FYI

Please sign in to comment.