testing-library / testing-library-docs

docs site for @testing-library/*
https://testing-library.com
MIT License
451 stars 701 forks source link

fix: replace the TabItem values with general ones #1394

Closed Efim-Kapliy closed 3 months ago

Efim-Kapliy commented 3 months ago

It will be easier for the user if you replace the TabItem values with general ones, because if you select a tab in one of the code examples, TypeScript, then other examples change asynchronously (i.e. the code examples will remain in JavaScript, or vice versa).

netlify[bot] commented 3 months ago

Deploy Preview for testing-library ready!

Name Link
Latest commit 7caa8ef63ded9d3c2a9b672402f054f5c7827cf1
Latest deploy log https://app.netlify.com/sites/testing-library/deploys/664cb7b486f70e00095eb4e9
Deploy Preview https://deploy-preview-1394--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 configuration.

MatanBobi commented 3 months ago

Thanks @Efim-Kapliy but I'm not sure I'm following. Currently if a user changes a tab, the rest change accordingly. What is this PR aiming to solve?

Efim-Kapliy commented 3 months ago

Okay, now I'm going to try to explain with illustrative examples.

This is the option that is currently displayed asynchronously: photo_2024-05-22_12-46-47

The expected, synchronous option: 2024-05-22_12-51-37

I think it will be more understandable.

MatanBobi commented 3 months ago

Thanks, I was under the impression that these already work. What's the reason it's not working? The values were the same before (e.g. jsx/tsx), your change refactors it to be js/ts.

Edit: I understand now. We have one item with values of js/ts and two with values of jsx/tsx. Since these don't really affect the code styling as it's done in the markdown, were good with merging this. Do you want to align it across the entire docs?

Efim-Kapliy commented 3 months ago

Yes, that's right.

timdeschryver commented 3 months ago

@all-contributors please add @Efim-Kapliy for docs

allcontributors[bot] commented 3 months ago

@timdeschryver

I've put up a pull request to add @Efim-Kapliy! :tada: