-
-
Notifications
You must be signed in to change notification settings - Fork 843
Updated wins.js so Wins page uses icon-github.svg #8379
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: gh-pages
Are you sure you want to change the base?
Updated wins.js so Wins page uses icon-github.svg #8379
Conversation
…e github icon with file type of svg.
…to the github icon saved within assets: /asstes/images/wins-page/icon-github-small.svg. Also Removed the literal definition of GITHUB_ICON where the path to this icon svg which is being replaced. Modified line where the alt property was defined for the img which used to store the svg. To comply with WCAG, we instead add the description to the aria-label using the setAttribute method.
…ppearance of linkedin-icon class elements. Because the github-icon svg is rendered inline, the viewBox inherits a larger sizing from the source file than the Linkedin icon. Inspecting the linked-in image revealed a base size of 32px x 32px. To replicate this sizing, we set github-icon div width and height to 32px by 32px and made a rule for the svg to fill the container width and height by 100%.
|
Want to review this pull request? Take a look at this documentation for a step by step guide! From your project repository, check out a new branch and test the changes. |
|
Review ETA: 10/22/25 |
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.
@santi-jose Great job working on this issue!
- The PR contains the correct branch and linked issue
- The code that renders the Github icon has been updated and the styling remains unchanged
- There were no CodeQL Alerts detected
|
Thanks for the review!🙏 @lc1715 |
|
Sure, Thanks for working on this issue! 🎉 |
Fixes #6911
What changes did you make?
_includes/wins-page/wins-card-template.html/wins-card-template.html, replaced current reference togithub-iconusing theimgelement, with new inline expression renderinggithub-iconwithin adivelement.Specifically replaced:
<a target="_blank" class="wins-card-github-icon"><img class="github-icon" alt="" /></a>with:
makeCardsfunction inassets/js/wins.js, removed theimgelement source definition since we replaced theimgelement.GITHUB_ICONwhich set the path to the svg used to define the source for the previously used img element.aria-labelattribute and definition to thegithub-icon's svg div. Used the previous definition of thealtattribute of theimgelement for thearia-labelof thegithub-iconsvgdiv._sass/components/_wins-page.scssto ensure the styling of the GitHub icon remained unchanged after replacing the source. Set the github-icon element in_wins-page.scssheightandwidthto 32px. Also set themax-widthto 100% to mimic the behavior of the LinkedIn icon. Set the SVGwidthandheightproperties nested within thegithub-iconelementdivto 100% so they would adhere to the sizing of the parent element. In this case thegithub-icondivis the parent element. Therefore the SVG should render to be 32x32 px.Why did you make the changes (we will use this info to test)?
CodeQL Alerts
After the PR has been submitted and the resulting GitHub actions/checks have been completed, developers should check the PR for CodeQL alert annotations.
Check the PR's comments. If present on your PR, the CodeQL alert looks similar as shown
Please let us know that you have checked for CodeQL alerts. Please do not dismiss alerts.
Instructions for resolving CodeQL alerts
If CodeQL alert/annotations appear, refer to How to Resolve CodeQL alerts.
In general, CodeQL alerts should be resolved prior to PR reviews and merging
Screenshots of Proposed Changes To The Website (if any, please do not include screenshots of code changes)