Skip to content

Bug: Fixed “Go to Project” button not working - #546

Merged
Roshanjossey merged 1 commit into
firstcontributions:mainfrom
hc-codes:main
Aug 18, 2026
Merged

Bug: Fixed “Go to Project” button not working#546
Roshanjossey merged 1 commit into
firstcontributions:mainfrom
hc-codes:main

Conversation

@hc-codes

@hc-codes hc-codes commented Feb 1, 2026

Copy link
Copy Markdown
Contributor

Fixes: #535

@hc-codes

hc-codes commented Feb 1, 2026

Copy link
Copy Markdown
Contributor Author

@Roshanjossey please review this PR, Fixed the Go to project button not working scenario when open issues are there in the card.

@Esh07 Esh07 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You do not need to create another <a> tag to wrap <span> tag.

The main issue is that when loadIssues evaluates to true, it renders a component containing another <a> tag. Since nested links are invalid HTML, this breaks the link structure.

Comment thread src/components/ProjectCard.astro Outdated
Comment on lines +40 to +45
@@ -41,14 +41,16 @@ const { projectLink, logoLink, name, description, tags = [], loadIssues = false
<IssueList projectLink={projectLink} projectName={name} />
)}
</div>
<div class="Card-Link">
<span>Go to Project</span>
</div>
</a>
<a class="Card-Link" href={projectLink} target="_blank">

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You do not need to create another <a> tag to wrap <span> tag.

The main issue is that when loadIssues evaluates to true, it renders a component containing another <a> tag. Since nested links are invalid HTML, this breaks the link structure.

Here is affected code

<div class="Card-Container">
  <a class="Card-Real-Link" href={projectLink} target="_blank">
    <div class="Card-Header">
//.   ......
    </div>
    <div class="Card-Body">
      {loadIssues && ( //  <----- when it's `loadIssues` evaluates true, it renders another list
        <IssueList projectLink={projectLink} projectName={name} />
//       |
//       |--> ## <IssueList /> container below code
//========---- <IssueList /> component code ---======
           <div class="Card-Issues">
//           ......
             {issues.length > 0 ? (
               <div class="Issues-List">
                 {issues.map((issue) => (
/**-------XXXXXX <a> become child of parent <a> ----------------------------
*                (it applies link to below list but it breaks hyperlinks after </a>   //  |
**/                                                                                   //  |
                   <a href={issue.html_url} target="_blank" class="Issue-Card">       //  |
//                    .....                                                           //  |
                     <div class="Issue-Content">                                      //  |
//                   .......                                                          //  |                                                                                                   
                      </div>                                                          //  |
                      <div class="Issue-Labels">                                      //  |
//                       ....                                                         //  | 
                     </div>                                                           //  |                                                                                                 
                   </a>                                                               //  |
// ----------------------------------------------------------------------------------------
                 )}
             </div>
//          ........
           )}
           </div>
//========---- End of <IssueList /> component code ---======
    </div>
// Since this renders after second `<a>` tag, it breaks the link even though it is still warped under the parent `<a>` tag. 
    <div class="Card-Link">
      <span>Go to Project</span>
    </div>
  </a>
</div>
     

@Esh07 Esh07 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

We need to have a discussion before moving forward with implementation, as this change impacts another component.

Here is discussion

<IssueList projectLink={projectLink} projectName={name} />
)}
<div class="Card-Link">
<a href={projectLink} target="_blank">

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I am not seeing the nesting here now, both are separate tags and this goto button is working

@Esh07 Esh07 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

My bad. You're correct I am overlook it. Changes looks good

@Roshanjossey
Roshanjossey merged commit 49a621f into firstcontributions:main Aug 18, 2026
1 check failed
@Roshanjossey

Copy link
Copy Markdown
Member

Thank you for fixing this @hc-codes

Thank you for reviewing @Esh07 🚀

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.

Bug: “Go to Project” button not working when open issues are shown

3 participants