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] Add hash to key to remove noise from console #44289

Merged
merged 2 commits into from
Nov 2, 2024

Conversation

sai6855
Copy link
Contributor

@sai6855 sai6855 commented Nov 1, 2024

Before:

image

After:

image

@sai6855 sai6855 marked this pull request as draft November 1, 2024 06:12
@sai6855 sai6855 added the docs Improvements or additions to the documentation label Nov 1, 2024
@mui-bot
Copy link

mui-bot commented Nov 1, 2024

Netlify deploy preview

https://deploy-preview-44289--material-ui.netlify.app/

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against de12e84

@sai6855 sai6855 marked this pull request as ready for review November 1, 2024 06:24
const { description, className, name, defaultValue, hash } = params;

return (
<tr key={className} id={hash}>
<tr key={`${className}-${index}`} id={hash}>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Some components don't have specific className for each slot (like textfield), so just using className as key is creating noise in docs if multiple slots doesn't have className

Copy link
Member

Choose a reason for hiding this comment

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

Maybe the hash would be a better option since having two components with the same id would also be an issue

@sai6855 sai6855 added the scope: docs-infra Specific to the docs-infra product label Nov 1, 2024
const { description, className, name, defaultValue, hash } = params;

return (
<tr key={className} id={hash}>
<tr key={`${className}-${index}`} id={hash}>
Copy link
Member

Choose a reason for hiding this comment

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

Maybe the hash would be a better option since having two components with the same id would also be an issue

@sai6855 sai6855 merged commit 37f3238 into mui:master Nov 2, 2024
22 checks passed
@sai6855 sai6855 changed the title [docs] Add index to key to remove noise from console [docs] Add hash to key to remove noise from console Nov 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to the documentation scope: docs-infra Specific to the docs-infra product
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants