fix: Fix Card Click Behavior for Pinned Repos and Gists #3955 #3961
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This pull request addresses an issue with the click behavior of the cards for pinned repositories and gists. Previously, clicking on a card resulted in the user being directed to a URL that displayed an image of the card rather than the intended repository or gist page. This behavior made the pinned cards unusable as a replacement for the native pins, which should allow users to navigate directly to the relevant GitHub pages.
Changes Made -
Wrapped the card rendering code in an anchor () tag, enabling users to click on the card and be redirected to the corresponding repository or gist page.
The implementation ensures that the link opens in a new tab while maintaining security best practices by using rel="noopener noreferrer"
Expected Behavior-
With this change, clicking on a card for a repository or gist now properly directs users to the respective page on GitHub. This enhances usability and aligns with the expected functionality of native pinned repositories.
I appreciate your consideration of this pull request, and I look forward to any feedback you may have!