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

Refactor current-projects-check file to fix any formatting issue with new tools data format #4861

Closed
5 tasks done
ronaldpaek opened this issue Jun 19, 2023 · 9 comments · Fixed by #5025
Assignees
Labels
Complexity: Small Take this type of issues after the successful merge of your second good first issue Feature: Refactor JS / Liquid Page is working fine - JS / Liquid needs changes to become consistent with other pages p-feature: Projects-check We use this page to check to make sure that teams are using the Technology section correctly role: front end Tasks for front end developers size: 0.5pt Can be done in 3 hours or less time sensitive Needs to be worked on by a particular timeframe

Comments

@ronaldpaek
Copy link
Member

ronaldpaek commented Jun 19, 2023

Overview

The purpose of this issue is to refactor the code in the current-project-check 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-check.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

Merge team:

Resources/Instructions

@ronaldpaek ronaldpaek added Complexity: Missing Draft Issue is still in the process of being created Feature Missing This label means that the issue needs to be linked to a precise feature label. size: missing role: front end Tasks for front end developers time sensitive Needs to be worked on by a particular timeframe Feature: Refactor JS / Liquid Page is working fine - JS / Liquid needs changes to become consistent with other pages Complexity: Small Take this type of issues after the successful merge of your second good first issue size: 0.5pt Can be done in 3 hours or less p-feature: Projects-check We use this page to check to make sure that teams are using the Technology section correctly and removed Feature Missing This label means that the issue needs to be linked to a precise feature label. role missing size: missing Draft Issue is still in the process of being created labels Jun 19, 2023
@AlimurtuzaCodes

This comment was marked as outdated.

@ronaldpaek

This comment was marked as outdated.

@t-will-gillis

This comment was marked as outdated.

@t-will-gillis t-will-gillis added the Draft Issue is still in the process of being created label Jun 21, 2023
@t-will-gillis t-will-gillis added Ready for Prioritization and removed Draft Issue is still in the process of being created labels Jul 3, 2023
@ExperimentsInHonesty

This comment was marked as outdated.

@ExperimentsInHonesty ExperimentsInHonesty added ready for dev lead Issues that tech leads or merge team members need to follow up on and removed Ready for Prioritization labels Jul 4, 2023
@ronaldpaek

This comment was marked as outdated.

@ronaldpaek

This comment was marked as outdated.

@t-will-gillis
Copy link
Member

@ExperimentsInHonesty please see my note on #4860. I confirmed that the @ronaldpaek 's code for the project Tools: should work before, during, and after the transition from strings to list/array datatypes. Of course, during and after the transition period we can monitor to make sure there are no glitches.

@github-actions
Copy link

Hi @roslynwythe, thank you for taking up this issue! Hfla appreciates you :)

Do let fellow developers know about your:-
i. Availability: (When are you available to work on the issue/answer questions other programmers might have about your issue?)
ii. ETA: (When do you expect this issue to be completed?)

You're awesome!

P.S. - You may not take up another issue until this issue gets merged (or closed). Thanks again :)

@ronaldpaek
Copy link
Member Author

@roslynwythe I guess this is complete, right? Sorry I was working on another issue.

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 Feature: Refactor JS / Liquid Page is working fine - JS / Liquid needs changes to become consistent with other pages p-feature: Projects-check We use this page to check to make sure that teams are using the Technology section correctly role: front end Tasks for front end developers size: 0.5pt Can be done in 3 hours or less time sensitive Needs to be worked on by a particular timeframe
Projects
Development

Successfully merging a pull request may close this issue.

6 participants