Skip to content

[Meshery] Enhance the "Star the Repo" button with a unique GitHub CTA#7866

Open
superezzdev wants to merge 3 commits into
layer5io:masterfrom
superezzdev:feat/star-repo-button-7859
Open

[Meshery] Enhance the "Star the Repo" button with a unique GitHub CTA#7866
superezzdev wants to merge 3 commits into
layer5io:masterfrom
superezzdev:feat/star-repo-button-7859

Conversation

@superezzdev

Copy link
Copy Markdown
Contributor

Description

Fixe Issue: #7859.

Summary

This PR enhances the "Star the Repo" call-to-action on the Meshery landing page by replacing the previous generic button with a dedicated, reusable GitHubStarButton component.

Changes

  • Created a reusable GitHubStarButton component.
  • Replaced the existing "Star the Repository" button in the Meshery hero section.
  • Redesigned the CTA to provide a more distinctive and engaging visual experience.
  • Preserved the existing GitHub star fetching, caching, accessibility, and navigation behavior.
  • Added dynamic GitHub star count display while keeping the underlying functionality unchanged.

Notes for Reviewers

  • This is a UI enhancement only.
  • No business logic or application behavior was modified.
  • GitHub API fetching and caching behavior remain unchanged.
  • The new component is reusable for future GitHub CTA integrations.

Testing

  • ✅ Verified the button links to the Meshery GitHub repository.
  • ✅ Verified dynamic star count is displayed.
  • ✅ Verified hover and focus states.
  • ✅ Verified responsive layout.
  • ✅ Verified the page renders correctly in local development.

Screenshots

Before --
Screenshot 2026-07-12 at 9 44 05 PM
After --
Screenshot 2026-07-12 at 9 45 28 PM

Signed commits

  • Yes, I signed my commits.

Copilot AI review requested due to automatic review settings July 12, 2026 16:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR updates the Meshery landing page “Star the Repo” CTA by introducing a reusable GitHubStarButton component and swapping out the previous generic GitHub button in the hero section.

Changes:

  • Added a new GitHubStarButton component that fetches/caches GitHub star counts and displays them inline.
  • Replaced the hero’s “Star the Repository” button with the new GitHub-specific CTA component.
  • Performed minor JSX formatting changes in the Meshery section (headings/buttons).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 9 comments.

File Description
src/sections/Meshery/index.js Replaces the prior GitHub star button with GitHubStarButton and reformats some JSX.
src/components/GitHubStarButton/GitHubStarButton.js Introduces the new reusable GitHub star CTA component with styles + star count fetch/cache.


useEffect(() => {
const cacheKey = `gh_stars_${repo.replace("/", "_")}`;
const cached = localStorage.getItem(cacheKey);
Comment on lines +124 to +127
localStorage.setItem(
cacheKey,
JSON.stringify({ count, timestamp: Date.now() }),
);
Comment on lines +116 to +123
fetch(`https://api.github.com/repos/${repo}`)
.then((res) => {
if (!res.ok) throw new Error("GitHub API error");
return res.json();
})
.then((data) => {
if (data.stargazers_count !== undefined) {
const count = data.stargazers_count;
Comment on lines +128 to +130
setStars(count);
}
})
.catch(() => {
// silent fail
})
.finally(() => setLoading(false));
Comment on lines +45 to +52
&:focus {
outline: none;
}

&:focus-visible {
outline: 2px solid ${({ theme }) => theme.activeColor};
outline-offset: 2px;
}
background: ${({ theme }) => theme.secondaryColor};

position: relative;
transition: 450ms all;
Comment on lines +28 to +31
<h1 className="heading-2">
{" "}
<span className="heading-2"> collaboratively</span>
</h1>
Comment on lines +75 to +78
<h1>
{" "}
Manage your clusters with features you won't find anywhere else.
</h1>
Signed-off-by: superezz <248160976+superezz@users.noreply.github.com>
@superezzdev superezzdev force-pushed the feat/star-repo-button-7859 branch from 9193c34 to b788148 Compare July 12, 2026 16:39
@github-actions

github-actions Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for PR #7866 removed.

This PR preview was automatically pruned because we keep only the 6 most recently updated previews on GitHub Pages to stay within deployment size limits.

If needed, push a new commit to this PR to generate a fresh preview.

@leecalcote leecalcote left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks, @superezzdev.

  1. contrast is too low
  2. don't use the same saffron yellow
  3. don't use the same button style
  4. follow the instructions as outlined in the issue.

@superezzdev

Copy link
Copy Markdown
Contributor Author

Thank You, @leecalcote .
Please Assign me
i'll fix it very soon coz i i'll just have to work on only ui

just tell me
contrast is too low - Do i need to increase the contrast
don't use the same saffron yellow - can you give me reference please
don't use the same button style - can you give me reference please
follow the instructions as outlined in the issue.

@superezzdev

superezzdev commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

Hey @leecalcote , @Bhumikagarggg , @Sbragul26

tell me , is it looking now good ?

Screenshot 2026-07-14 at 4 42 37 AM

Signed-off-by: superezz <248160976+superezz@users.noreply.github.com>
@superezzdev

Copy link
Copy Markdown
Contributor Author

Thanks for the review! @leecalcote
I've addressed the requested changes:


Screenshot 2026-07-14 at 6 04 07 AM

Improved the contrast.
Removed the previous saffron styling.
Redesigned the GitHub Star CTA so it no longer matches the standard Layer5 CTA buttons.
Preserved the existing GitHub star count fetching, caching, accessibility, and navigation behavior.

Looking forward to your feedback.

@Sbragul26 Sbragul26 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The button still has the same shape as the other buttons. Could you try a different shape? Here's an example for reference.

image

@superezzdev

Copy link
Copy Markdown
Contributor Author

Thanks for your suggestion @Sbragul26
i was thinking but it will break the the system UI Design format

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants