chores: follow react convention for naming
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.
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...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify project configuration.
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
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.
Comment @coderabbitai help to get the list of available commands and usage tips.
β‘οΈ 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/
soo what do you think about this? @princerajpoot20