Repository navigation
Conversation
…d scss file to reflect the attribute change
…tered by other items that are not project areas or tools.
|
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. |
…add-filtering-to-external-resources-on-toolkit-page-8558
| {% assign resources = site.data.internal.toolkitresources | where: "display", true %} | ||
| const resources = JSON.parse(decodeURIComponent("{{ resources | jsonify | uri_escape }}")) |
There was a problem hiding this comment.
I'm getting data from _data/internal/toolkitresources.yml
|
castillios
left a comment
There was a problem hiding this comment.
Hi @Tomomi-K1 thanks for your work on this large issue! In terms of PR logistics, everything looks great.
I tested the page locally and the new filter functionality works as expected! Good catch accounting for External Resources in the filter counts too. I noted that you made an ER for the "Undefined" filter bug when no matches are returned so I accounted for that in this review.
However, I noticed a UI bug. The leftmost filter sidebar shifts to the right when no results are found. I believe this may be because the "External Resources" filters (fortunately) work now, but the newly empty space causes the shift. I attached visual differences below.
Once this bug is fixed, I'll be happy to re-review and approve :)
|
@castillios Thank you for catching the UI bug!! I will fix that and re-request review! |


Fixes #8558
What changes did you make?
External Resource on toolkit page can be now filtered with Project Area and Tools ( other categories are not added according to the issue)
Added
data-project-Toolsto div for the resource card in[_includes/current-guides.html]Added
toolkit-resource-cardclass to div for resource card ( issue originally instructed to addresource-cardbutresource-cardis used in sass to format resource card in the different page which changes the current looks of external resource card shown in toolkit page.Changed
data-article-typetodata-practice-Areasto match with.guide-card.htmlsince filtering works with_include/.guide-card.htmlit makes sense to usedata-practice-Areasinstead ofdata-article-typesince both are getting data frompractice-area. Also this makes filtering function much more simple. I didn’t see any where in the code basearticleTypedataset was used.Removed
| downcase | remove: ' 'fromdata-article-type={{ item.practice-area | downcase | remove: ' ' }}. In_include/guide-card.html, data-project-area shows as it is shown in the front matter like “ Project Management”, to keep the dataset data consistent with .gude-card.html, removingdowncase | remove: ‘’makes sense here.Before the change,
[data-article-type=“development”]was used to style the GitHub logo image. But since I replaceddata-article-typewith data-practice-Areas I also updated this sass file to .toolkit-resource-card[data-project-tools="GitHub”].Included External Resource Cards into counts shown next to the each filter item by updating
updateFilterFrequencyfunction.updated toggleNoResultMsgIfNoMatch to avoid showing

no results found messagewhen we have no guide card but we still have a external card showing like below image (in this case, I believe we do not want to showno results found message:I found an existing bug on message that shows when results are not found (mentioned in the issue here. I did not address that bug in this PR.
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)
Visuals before changes are applied
-Take a look at the count for each items in Filters column (Project Area & Tools Only)Visuals after changes are applied
-Take a look at the count for each items in Filters column (Project Area & Tools Only)( now count includes external resource cards )