Skip to content

ER: Modify JavaScript so Ruby and Svelte are included in the Filter on Projects page #6274

@jphamtv

Description

@jphamtv

Emergent Requirement - Problem

Ruby and Svelte languages are being excluded from the 'Languages / Technologies' filter on the Project page.

Issue you discovered this emergent requirement in

Date discovered

12-27-23

Did you have to do something temporarily

  • YES
  • NO

Who was involved

@t-will-gillis

What happens if this is not addressed

Users will not be able to filter projects by Ruby language or Svelte framework. This may be a minor issue since the related projects are not currently active.

Resources

assets/js/current-projects.js
Projects page
Home page
See comments where the issue was found

Recommended Action Items

  • Make a new issue
  • Discuss with team
  • Let a Team Lead know

Potential solutions [draft]

Modify the code so they are included in the 'Languages / Technologies' filter on the Projects and Home pages.

Action Items

  • 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(),

Metadata

Metadata

Assignees

No one assigned

    Labels

    Complexity: SmallTake this type of issues after the successful merge of your second good first issueEREmergent RequestP-Feature: Home pagehttps://www.hackforla.org/P-Feature: Projects pagehttps://www.hackforla.org/projects/ready for dev leadIssues that tech leads or merge team members need to follow up onrole: front endTasks for front end developerssize: 0.25ptCan be done in 0.5 to 1.5 hours

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions