Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Remove redundant title attributes from configuration code blocks in Tab components #546

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

Draft
Copilot wants to merge 4 commits into main
base: main
Choose a base branch
Loading
from copilot/fix-78ff10c6-d659-40fe-8fe2-d57d12f2d249

Conversation

Copy link

Copilot AI commented Sep 4, 2025
edited
Loading

This PR fixes redundant title="rstest.config.ts" attributes in code blocks that are already wrapped in <Tab label="rstest.config.ts"> components across the documentation.

Problem

Many configuration code blocks were wrapped in Tab components that already declared the filename in their label attribute, making the additional title="rstest.config.ts" attribute redundant and visually cluttered:

<Tab label="rstest.config.ts">
```ts title="rstest.config.ts" <!-- This title is redundant -->
import { defineConfig } from '@rstest/core';
```

Solution

Removed the redundant title="rstest.config.ts" attributes from code blocks that are inside <Tab label="rstest.config.ts"> components, while preserving title attributes for standalone code blocks that are not wrapped in tabs.

Files Changed

  • 41 files total: 20 English + 21 Chinese documentation files in website/docs/{zh,en}/config/test/
  • Only code blocks inside Tab components had their redundant titles removed
  • Standalone code blocks (not in tabs) retain their title attributes for clarity

Example Change

 <Tab label="rstest.config.ts">
- ```ts title="rstest.config.ts"
+ ```ts
 import { defineConfig } from '@rstest/core';
 
 export default defineConfig({
 globals: true,
 });
```

This change eliminates visual redundancy while maintaining clear documentation structure - the Tab label already indicates the filename, so the title attribute is unnecessary.


💬 Share your feedback on Copilot coding agent for the chance to win a 200ドル gift card! Click here to start the survey.

Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link

netlify bot commented Sep 4, 2025
edited
Loading

Deploy Preview for rstest-dev ready!

Name Link
🔨 Latest commit 0c1d791
🔍 Latest deploy log https://app.netlify.com/projects/rstest-dev/deploys/68b958e36035070008762a51
😎 Deploy Preview https://deploy-preview-546--rstest-dev.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 project configuration.

Copilot AI and others added 2 commits September 4, 2025 08:41
Co-authored-by: fi3ework <12322740+fi3ework@users.noreply.github.com>
...on code blocks
Co-authored-by: fi3ework <12322740+fi3ework@users.noreply.github.com>
Copilot AI changed the title (削除) [WIP] add the missing title="rstest.config.ts to missing code blocks in website/docs. remember must modify zh and en files together. (削除ここまで) (追記) Add missing title="rstest.config.ts" to configuration code blocks in documentation (追記ここまで) Sep 4, 2025
Copilot AI requested a review from fi3ework September 4, 2025 08:44
Copilot finished work on behalf of fi3ework September 4, 2025 08:44
Copy link
Member

fi3ework commented Sep 4, 2025

@copilot re-check are the files updated in docs/en identical with docs/zh?

Copy link
Author

Copilot AI commented Sep 4, 2025

@copilot re-check are the files updated in docs/en identical with docs/zh?

No, the files updated in docs/en are not identical to docs/zh. I found at least one significant difference:

reporters.mdx (line 134):

  • EN: reporters: [['junit', { outputPath: './junit.xml' }]]
  • ZH: reporters: ['junit']

The English version shows the full configuration example with outputPath, while the Chinese version shows a simplified example. Both have the title="rstest.config.ts" attribute correctly added, but the configuration content differs.

The text content is properly translated between languages, but some code examples appear to have intentional differences in complexity/completeness.

Copilot finished work on behalf of fi3ework September 4, 2025 08:55
Copy link
Member

fi3ework commented Sep 4, 2025

@copilot do not add the title when it's wrapped in a Tab that already declares the file name, like below

 <Tab label="rstest.config.ts">
```ts title="rstest.config.ts"

...nts that already declare filename
Co-authored-by: fi3ework <12322740+fi3ework@users.noreply.github.com>
Copy link
Author

Copilot AI commented Sep 4, 2025

@copilot do not add the title when it's wrapped in a Tab that already declares the file name, like below

...

I've removed the redundant title="rstest.config.ts" attributes from all code blocks that are inside <Tab label="rstest.config.ts"> components. The Tab label already declares the filename, making the title attribute redundant.

Changes made:

  • Processed 41 documentation files (20 English + 21 Chinese)
  • Only removed titles from code blocks inside Tab components that declare "rstest.config.ts"
  • Preserved title attributes for standalone code blocks that are not wrapped in tabs

Fixed in commit 0c1d791.

Copilot AI changed the title (削除) Add missing title="rstest.config.ts" to configuration code blocks in documentation (削除ここまで) (追記) Remove redundant title attributes from configuration code blocks in Tab components (追記ここまで) Sep 4, 2025
Copilot finished work on behalf of fi3ework September 4, 2025 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@fi3ework fi3ework Awaiting requested review from fi3ework

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /