-
-
Notifications
You must be signed in to change notification settings - Fork 847
Closed
Labels
Complexity: SmallTake this type of issues after the successful merge of your second good first issueTake this type of issues after the successful merge of your second good first issueFeature: Refactor JS / LiquidPage is working fine - JS / Liquid needs changes to become consistent with other pagesPage is working fine - JS / Liquid needs changes to become consistent with other pagesP-Feature: Projects pagehttps://www.hackforla.org/projects/https://www.hackforla.org/projects/role: front endTasks for front end developersTasks for front end developerssize: 0.5ptCan be done in 3 hours or lessCan be done in 3 hours or lesstime sensitiveNeeds to be worked on by a particular timeframeNeeds to be worked on by a particular timeframe
Milestone
Description
Overview
The purpose of this issue is to refactor the code in the current-project file to handle a list of strings(tools), instead of a single one. This change will maintain consistent formatting and resolve problems introduced by the recent change in data format.
Action Items
- Refer to current-projects.js and locate where tools is being referenced
- Refactor this code so tools can work as a comma separated String or an Array
{%- if project.tools -%},
"tools": `{{ project.tools }}`
{%- endif -%}
to:
{%- if project.tools -%},
"tools": {{ project.tools | jsonify }}
{%- endif -%}
- Refactor this code to map over tools since tools will be an Array now and not a String
${project.tools ?
`
<div class="project-tools">
<strong>Tools: </strong>
${ project.tools }
</div>
`:""
}
to:
${project.tools ?
`
<div class="project-tools">
<strong>Tools: </strong>
${(Array.isArray(project.tools) ? project.tools : project.tools.split(','))
.map(tool => `<p class='project-card-field-inline'> ${tool}</p>`)
.join(", ")
}
</div>
`: ""
}
After completing both changes this should allow us to make changes to tools without effecting the functionality of the website
- Confirm that the Tools data is rendering correctly/ as before on the Projects page.
Merge team:
- Once this issue is merged, release its dependency on Create new issues to refactor Tools data in project md files #4777
Resources/Instructions
- Projects page
- Liquid template language
- This issue is part of an epic: Add a Tools filter to the projects check page #4427
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Complexity: SmallTake this type of issues after the successful merge of your second good first issueTake this type of issues after the successful merge of your second good first issueFeature: Refactor JS / LiquidPage is working fine - JS / Liquid needs changes to become consistent with other pagesPage is working fine - JS / Liquid needs changes to become consistent with other pagesP-Feature: Projects pagehttps://www.hackforla.org/projects/https://www.hackforla.org/projects/role: front endTasks for front end developersTasks for front end developerssize: 0.5ptCan be done in 3 hours or lessCan be done in 3 hours or lesstime sensitiveNeeds to be worked on by a particular timeframeNeeds to be worked on by a particular timeframe
Type
Projects
Status
Done