Skip to content
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

Modify JavaScript so Ruby and Svelte are included in Filter on Projects page #6071

Closed
5 tasks
jphamtv opened this issue Jan 6, 2024 · 3 comments
Closed
5 tasks
Assignees
Labels
Complexity: Small Take this type of issues after the successful merge of your second good first issue P-Feature: Home page https://www.hackforla.org/ P-Feature: Projects page https://www.hackforla.org/projects/ role: front end Tasks for front end developers size: 0.25pt Can be done in 0.5 to 1.5 hours

Comments

@jphamtv
Copy link
Member

jphamtv commented Jan 6, 2024

Overview

Ruby and Svelte languages are being excluded from the 'Languages / Technologies' filter because of a conditional in the createFilter function in assets/js/current-projects.js file. We need to modify the code so they are included in the 'Languages / Technologies' filter on the Projects and Home pages.

Action Items

  • Locate the createFilter function in the assets/js/current-projects.js file
  • Replace the following code:
'technologies': [...new Set(sortedProjectData.map(item => (item.project.technologies && item.project.languages?.length > 0) ? [item.project.languages, item.project.technologies].flat() : '').flat() ) ].filter(v=>v!='').sort(),
  • With:
'technologies': [
    ...new Set(
        sortedProjectData.map(item => {
            let combined = [];
            if (item.project.languages?.length > 0) {
                combined = combined.concat(item.project.languages);
            }
            if (item.project.technologies?.length > 0) {
                combined = combined.concat(item.project.technologies);
            }
            return combined;
        }).flat()
    )
].filter(v => v).sort(),
  • Using Docker, test changes on Projects and Home pages to make sure filters are working correctly
  • Confirm Ruby and Svelte display in the 'Languages / Technologies' filter

Resources/Instructions

assets/js/current-projects.js
Projects page
Home page
See comments where the issue was found
ER #6274: Modify JavaScript so Ruby and Svelte are included in the Filter on Projects page

@jphamtv jphamtv added role: front end Tasks for front end developers P-Feature: Home page https://www.hackforla.org/ Complexity: Small Take this type of issues after the successful merge of your second good first issue P-Feature: Projects page https://www.hackforla.org/projects/ ready for dev lead Issues that tech leads or merge team members need to follow up on size: 0.25pt Can be done in 0.5 to 1.5 hours labels Jan 6, 2024
@roslynwythe roslynwythe added Ready for Prioritization and removed ready for dev lead Issues that tech leads or merge team members need to follow up on Ready for Prioritization labels Feb 25, 2024
@roslynwythe
Copy link
Member

roslynwythe commented Feb 26, 2024

@jphamtv
Copy link
Member Author

jphamtv commented Feb 27, 2024

Thank you @roslynwythe, I'll update this to include Tools after #6318 is completed.

@jphamtv jphamtv added the Draft Issue is still in the process of being created label Feb 27, 2024
@jphamtv jphamtv self-assigned this Feb 27, 2024
@hackforla hackforla deleted a comment from github-actions bot Feb 27, 2024
@jphamtv jphamtv added Bug Something isn't working and removed Bug Something isn't working labels Apr 3, 2024
@jphamtv
Copy link
Member Author

jphamtv commented Apr 3, 2024

Closing because issue resolved by PR #6467

@jphamtv jphamtv closed this as completed Apr 3, 2024
@jphamtv jphamtv removed the Draft Issue is still in the process of being created label Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Complexity: Small Take this type of issues after the successful merge of your second good first issue P-Feature: Home page https://www.hackforla.org/ P-Feature: Projects page https://www.hackforla.org/projects/ role: front end Tasks for front end developers size: 0.25pt Can be done in 0.5 to 1.5 hours
Development

No branches or pull requests

3 participants