Allow proposals to be associated with multiple projects (Fixes #1861)#1864
Allow proposals to be associated with multiple projects (Fixes #1861)#1864
Conversation
✅ Deploy Preview for earnest-hotteok-b1e1bf ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
This PR addresses #1861 by extending the GSoC / GSoDocs proposal pages and project proposal listings so a single proposal can be associated with multiple projects, while aiming to preserve support for existing single-project proposals.
Changes:
- Updated project-page proposal filtering to match proposals against multiple project values (with case/whitespace normalization).
- Updated GSoC and GSoDocs proposal layouts to render a list of corresponding projects instead of a single link.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
_layouts/gsoc_proposal.html |
Renders “Corresponding Project(s)” as a list of project links. |
_layouts/gsdocs_proposal.html |
Same multi-project rendering for GSoDocs proposal pages. |
_includes/gsoc_project.ext |
Adjusts proposal filtering to handle multi-project values and trims whitespace before comparing. |
_includes/gsdocs_project.ext |
Same filtering adjustments for GSoDocs project pages. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
_layouts/gsoc_proposal.html
Outdated
| <h2>Corresponding Project{% if page.project.size > 1 %}s{% endif %}</h2> | ||
| <ul> | ||
| {% for proj in page.project %} |
There was a problem hiding this comment.
page.project is a scalar string in most existing proposals (e.g., project: Geant4). In Liquid, page.project.size then becomes the string length, so this will almost always pluralize to “Corresponding Projects” even for single-project proposals, undermining the stated backward compatibility. Consider normalizing page.project to an array first (as done in the project listing include) and then basing both pluralization and the loop on that normalized array.
| <h2>Corresponding Project{% if page.project.size > 1 %}s{% endif %}</h2> | |
| <ul> | |
| {% for proj in page.project %} | |
| {% assign projects = page.project | split: ',' %} | |
| <h2>Corresponding Project{% if projects.size > 1 %}s{% endif %}</h2> | |
| <ul> | |
| {% for proj in projects %} |
_layouts/gsdocs_proposal.html
Outdated
| <h2>Corresponding Project{% if page.project.size > 1 %}s{% endif %}</h2> | ||
| <ul> | ||
| {% for proj in page.project %} |
There was a problem hiding this comment.
Same as the GSoC layout: most existing proposals define project as a scalar (e.g., project: ROOT), so page.project.size will be the string length and will incorrectly pluralize the heading. Normalize page.project to an array first and use the normalized array for both the pluralization check and the {% for %} loop to keep single-project proposals rendering correctly.
| <h2>Corresponding Project{% if page.project.size > 1 %}s{% endif %}</h2> | |
| <ul> | |
| {% for proj in page.project %} | |
| {% assign projects = page.project | join: ',' | split: ',' %} | |
| <h2>Corresponding Project{% if projects.size > 1 %}s{% endif %}</h2> | |
| <ul> | |
| {% for proj in projects %} |
_includes/gsoc_project.ext
Outdated
| {% endfor %}{% endif %} | ||
| {% endfor %} |
There was a problem hiding this comment.
{% endfor %}{% endif %} on the same line makes the Liquid control flow harder to read and is inconsistent with the surrounding formatting in this include. Split these tags onto separate lines to keep the template maintainable.
| {% endfor %}{% endif %} | |
| {% endfor %} | |
| {% endfor %} | |
| {% endif %} | |
| {% endfor %} |
|
Very nice, thank you Sahil! One small thing, in this list [1] we typically prefix the projects. If here are several, they currently still get concatenated without spaces, which is not ideal. I think we can either just use the first project in this list, or use a loop to display them as [1] https://github.com/HSF/hsf.github.io/blob/main/gsoc/2026/summary.md?plain=1 |
Thanks for the feedback! I’ve updated the summary page . |
|
Hmm, yes, the string is correct now but something broke the display of the list, see https://deploy-preview-1864--earnest-hotteok-b1e1bf.netlify.app/gsoc/2026/summary vs https://hepsoftwarefoundation.org/gsoc/2026/summary.html |
I’ve tested it locally and it’s now displaying correctly. Let me know if any further changes are needed. record.mp4 |
This PR resolves issue #1861 by allowing proposals to be associated with multiple projects.
Changes:
Testing:
Verified locally using Jekyll.
A proposal with:
project:
- Geant4
- ML4EP
now appears on both:
Proposal page now displays:
Corresponding Projects
Fixes #1861.