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

Updated Program Areas page so projects are dynamically rendered #3593

Conversation

jdingeman
Copy link
Member

@jdingeman jdingeman commented Sep 30, 2022

Fixes #2485

What changes did you make and why did you make them ?

  • Removed loop that uses data/_internal/program-areas to render cards
  • Added two loops to loop through _projects collection
  • Outer loop loops through projects, inner loop loops through each project's program area(s) and renders those whose program area matches that of the larger card
  • Edited fields in Liquid to pull from the project md files rather than the program area yml files

Screenshots of Proposed Changes Of The Website (if any, please do not screen shot code changes)

Visuals before changes are applied

image

Visuals after changes are applied

image

** Note that this now adds projects that were not previously rendered.
** Also corrected minor typo in guides-team.md that prevented card from being rendered.

@github-actions github-actions bot added Feature: Refactor JS / Liquid Page is working fine - JS / Liquid needs changes to become consistent with other pages P-Feature: Program Area https://www.hackforla.org/program-areas role: back end/devOps Tasks for back-end developers size: 2pt Can be done in 7-12 hours Complexity: Medium Status: Updated No blockers and update is ready for review labels Sep 30, 2022
@github-actions
Copy link

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.

git checkout -b jdingeman-dynamically-render-program-areas-2485 gh-pages
git pull https://github.com/jdingeman/website.git dynamically-render-program-areas-2485

@arpitapandya arpitapandya self-requested a review September 30, 2022 14:17
@arpitapandya
Copy link
Member

ETA: EOD 2022-09-30
Availability: 2 hrs

@arpitapandya
Copy link
Member

Hey, @jdingeman Thank you so much for putting in all the hard work. It looks great.

I can see that the projects are being rendered which were not previously. Which is great

I wonder if we are missing cards for a reason for a few projects that are being rendered on the Hackforla website but not here

  • #streaming under Workforce Development

  • Open Community Survey under vote

  • #racial-justice under Justice

  • New Schools today under Diversity, Equity, & Inclusion

@jdingeman
Copy link
Member Author

Hey, @jdingeman Thank you so much for putting in all the hard work. It looks great.

I can see that the projects are being rendered which were not previously. Which is great

I wonder if we are missing cards for a reason for a few projects that are being rendered on the Hackforla website but not here

  • #streaming under Workforce Development
  • Open Community Survey under vote
  • #racial-justice under Justice
  • New Schools today under Diversity, Equity, & Inclusion

Hey, @arpitapandya. It appears this is due to some inconsistencies between the program area yml files and the projects md files.

  • #streaming and #racial-justice are incomplete projects, and they do not have markdown files dedicated to them, so the loop doesn't catch them.
  • Open Community Survey only has Citizen Engagement as one of it's listed program-areas in its md file -- I can add in Vote
  • New Schools Today does not appear in Diversity, Equity, & Inclusion because the DEI yaml file's program-area is written as Diversity / Equity & Inclusion where as the program-area in the New Schools Today md file is written as Diversity, Equity & Inclusion

I don't mind correcting the latter two since they are minor changes due to typos, if that is okay.

@arpitapandya
Copy link
Member

Hey, @jdingeman Thank you so much for putting in all the hard work. It looks great.
I can see that the projects are being rendered which were not previously. Which is great
I wonder if we are missing cards for a reason for a few projects that are being rendered on the Hackforla website but not here

  • #streaming under Workforce Development
  • Open Community Survey under vote
  • #racial-justice under Justice
  • New Schools today under Diversity, Equity, & Inclusion

Hey, @arpitapandya. It appears this is due to some inconsistencies between the program area yml files and the projects md files.

  • #streaming and #racial-justice are incomplete projects, and they do not have markdown files dedicated to them, so the loop doesn't catch them.
  • Open Community Survey only has Citizen Engagement as one of it's listed program-areas in its md file -- I can add in Vote
  • New Schools Today does not appear in Diversity, Equity, & Inclusion because the DEI yaml file's program-area is written as Diversity / Equity & Inclusion where as the program-area in the New Schools Today md file is written as Diversity, Equity & Inclusion

I don't mind correcting the latter two since they are minor changes due to typos, if that is okay.

Ok, we can consider them to write Good: Second Issues for new devs. No problem, Looks fine.

Copy link
Member

@arpitapandya arpitapandya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the changes are correct! Great work! @jdingeman

@arpitapandya arpitapandya merged commit 03cf16e into hackforla:gh-pages Sep 30, 2022
@jdingeman jdingeman deleted the dynamically-render-program-areas-2485 branch March 20, 2023 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Complexity: Medium Feature: Refactor JS / Liquid Page is working fine - JS / Liquid needs changes to become consistent with other pages P-Feature: Program Area https://www.hackforla.org/program-areas role: back end/devOps Tasks for back-end developers size: 2pt Can be done in 7-12 hours Status: Updated No blockers and update is ready for review
Projects
Development

Successfully merging this pull request may close these issues.

Update the Program Areas page so the projects are dynamically rendered
2 participants