website icon indicating copy to clipboard operation
website copied to clipboard

chores: follow react convention for naming

Open tim48-robot opened this issue 1 month ago β€’ 5 comments

Description

  • This PR updates component and file names to follow standard React naming conventions (e.g., PascalCase for components)
  • Already tested and the warning in console is gone now

Related issue(s) Resolves #4659

hello sir @princerajpoot20 its done!

Summary by CodeRabbit

  • Refactor
    • Updated icon component syntax for improved React compatibility and code quality.

✏️ Tip: You can customize this high-level summary in your review settings.

tim48-robot avatar Dec 03 '25 04:12 tim48-robot

Deploy Preview for asyncapi-website ready!

Built without sensitive environment variables

Name Link
Latest commit 9152e9671f673dc26c88e936ba324354220d6942
Latest deploy log https://app.netlify.com/projects/asyncapi-website/deploys/692fc0b79160ce00081fccea
Deploy Preview https://deploy-preview-4661--asyncapi-website.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.

netlify[bot] avatar Dec 03 '25 04:12 netlify[bot]

We require all PRs to follow Conventional Commits specification. More details πŸ‘‡πŸΌ

 Unknown release type "chores" found in pull request title "chores: follow react convention for naming". 

Available types:
 - feat: A new feature
 - fix: A bug fix
 - docs: Documentation only changes
 - style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
 - refactor: A code change that neither fixes a bug nor adds a feature
 - perf: A code change that improves performance
 - test: Adding missing tests or correcting existing tests
 - build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
 - ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
 - chore: Other changes that don't modify src or test files
 - revert: Reverts a previous commit

asyncapi-bot avatar Dec 03 '25 04:12 asyncapi-bot

Walkthrough

This change fixes a React console warning by converting SVG attribute names in the Dashboard icon component from HTML-style kebab-case to JSX camelCase, ensuring compliance with React naming conventions. No logic or functionality was altered.

Changes

Cohort / File(s) Summary
SVG attribute name corrections
components/icons/Dashboard.tsx
Converted SVG attributes to JSX camelCase: stroke-width β†’ strokeWidth, stroke-linecap β†’ strokeLinecap, stroke-line-join β†’ strokeLinejoin

Estimated Code Review Effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A dash becomes a capital case, React's warnings vanish without a trace, One icon fixed, so clean and bright, No more console fright tonight! ✨

Pre-merge checks and finishing touches

βœ… Passed checks (5 passed)
Check name Status Explanation
Description Check βœ… Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check βœ… Passed The title 'chores: follow react convention for naming' directly aligns with the main change in the PR, which converts SVG attributes to React-compatible JSX props following React naming conventions.
Linked Issues check βœ… Passed The PR addresses issue #4659 by converting SVG attributes (stroke-width, stroke-linecap, stroke-linejoin) to React-compatible JSX props (strokeWidth, strokeLinecap, strokeLinejoin), which follows React naming conventions to resolve the console warning.
Out of Scope Changes check βœ… Passed All changes in the PR are scoped to converting SVG attribute names to React-compatible props in the Dashboard component, which is directly related to the linked issue about following React naming conventions.
Docstring Coverage βœ… Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • [ ] πŸ“ Generate docstrings
πŸ§ͺ Generate unit tests (beta)
  • [ ] Create PR with unit tests
  • [ ] Post copyable unit tests in a comment

πŸ“œ Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 3fc64a4c29282fa095aa0a8c75e2de1e9fcfa986 and 9152e9671f673dc26c88e936ba324354220d6942.

πŸ“’ Files selected for processing (1)
  • components/icons/Dashboard.tsx (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
πŸ““ Common learnings
Learnt from: bandantonio
Repo: asyncapi/website PR: 3393
File: markdown/blog/socketio-part2.md:506-506
Timestamp: 2024-11-13T20:40:29.580Z
Learning: When performing rebranding updates, there's no need to update the titles of bug reports in `dashboard.json`, even if they contain the old name.
⏰ Context from checks skipped due to timeout of 180000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Lighthouse CI
πŸ”‡ Additional comments (1)
components/icons/Dashboard.tsx (1)

17-19: LGTM! React naming conventions correctly applied.

The conversion of SVG attributes from kebab-case to camelCase follows React JSX conventions and should resolve the console warning mentioned in issue #4659.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❀️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot] avatar Dec 03 '25 04:12 coderabbitai[bot]

⚑️ Lighthouse report for the changes in this PR:

Category Score
πŸ”΄ Performance 43
🟒 Accessibility 98
🟒 Best practices 92
🟒 SEO 100
πŸ”΄ PWA 33

Lighthouse ran on https://deploy-preview-4661--asyncapi-website.netlify.app/

asyncapi-bot avatar Dec 03 '25 04:12 asyncapi-bot

soo what do you think about this? @princerajpoot20

tim48-robot avatar Dec 11 '25 09:12 tim48-robot