-
Notifications
You must be signed in to change notification settings - Fork 79
Replace button with link for GitHub contribution #173
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
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThe GitHub CTA component is converted from a button element to an anchor tag linking to https://github.com/AOSSIE-Org with security attributes. Styling is preserved with minor CSS adjustments, and imports are reformatted to use double quotes for consistency. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
LandingPage/src/components/github.tsx (1)
1-1: Verify quote style consistency across the project.The import statement now uses double quotes instead of single quotes. Ensure this aligns with the project's linting rules or style guide.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
LandingPage/src/components/github.tsx(2 hunks)
🔇 Additional comments (2)
LandingPage/src/components/github.tsx (2)
6-25: Excellent semantic improvement with proper security attributes.Converting the button to an anchor tag is the correct approach for external navigation. The inclusion of
target="_blank"andrel="noopener noreferrer"follows security best practices by preventing the opened page from accessingwindow.opener.
30-61: CSS adjustments appropriately handle the anchor element.The addition of
text-decoration: none;correctly removes the default underline from the anchor tag while preserving the button-like appearance. The formatting adjustments tobox-shadowandcolorproperties are cosmetic improvements.
| fill="currentcolor" | ||
| /> | ||
| </svg> | ||
| <span>Contribute on Github</span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix the brand name capitalization.
The text reads "Contribute on Github" but the correct brand name is "GitHub" with a capital H.
Apply this diff:
- <span>Contribute on Github</span>
+ <span>Contribute on GitHub</span>📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| <span>Contribute on Github</span> | |
| <span>Contribute on GitHub</span> |
🤖 Prompt for AI Agents
In LandingPage/src/components/github.tsx around line 24, the visible text uses
the incorrect brand capitalization "Contribute on Github"; update the span text
to use the official brand "GitHub" by replacing the string with "Contribute on
GitHub" (also update any identical occurrences in this file if present to ensure
consistent branding).
🚀 Feature/Refactor: Link Github Button to External URL
Description
This pull request updates the
Githubcomponent by replacing the<button>element with a semantically correct anchor tag (<a>). This change allows the component to function as a hyperlink, redirecting users to the project's organization page on GitHub.Changes Made
<button className="btn-github">with<a className="btn-github">.href="https://github.com/AOSSIE-Org"to direct the user to the correct organization page.target="_blank"so the link opens in a new browser tab, preventing the user from leaving the current application context.rel="noopener noreferrer"for security best practices when usingtarget="_blank".text-decoration: none;to the.btn-githubstyles to ensure the anchor tag does not display the default browser underline.✅ Testing Steps
https://github.com/AOSSIE-Org.Summary by CodeRabbit