Skip to content

Move program-areas directory and refactor program-areas.html#6388

Merged
t-will-gillis merged 4 commits intohackforla:gh-pagesfrom
luisitocanlas:move-refactor-program-areas-6323
Mar 4, 2024
Merged

Move program-areas directory and refactor program-areas.html#6388
t-will-gillis merged 4 commits intohackforla:gh-pagesfrom
luisitocanlas:move-refactor-program-areas-6323

Conversation

@luisitocanlas
Copy link
Member

Fixes #6323

What changes did you make?

  • Moved program-areas directory so it is outside of the _data directory
  • Renamed program-areas directory to _program-areas
  • Added the following in _config.yml, under the collections variable:
    program-areas:
        output: false
    
  • Refactor code in pages/program-areas.html so that it works to pull information from the files in the _program-areas directory
    • removed {% if program_areas[1].size > 0 %} at line 21 and {% endif %} at line 63
    • refactored program_areas[1] into program_areas

Why did you make the changes (we will use this info to test)?

  • Per issue:
    • We can use the contents in the files in the program-areas directory for individual program area pages in the future
    • the Program Areas page doesn't break when the program-areas directory is moved
  • {% if program_areas[1].size > 0 %} at line 21, {% endif %} at line 63, and program_areas[1] were giving me this error:
    Liquid Exception: 1 is not a symbol nor a string in pages/program-areas.html
    
    • Before moving the program-areas directory, the code with program_areas[1] was working perfectly. Once I moved the program-areas directory outside of the _data directory, that's when I started encountering the error

@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 luisitocanlas-move-refactor-program-areas-6323 gh-pages
git pull https://github.com/luisitocanlas/website.git move-refactor-program-areas-6323

Note that CONTRIBUTING.md cannot previewed locally; rather it should be previewed at this URL:

https://github.com/luisitocanlas/website/blob/move-refactor-program-areas-6323/CONTRIBUTING.md  

@github-actions github-actions bot added role: front end Tasks for front end developers Complexity: Medium P-Feature: Program Area https://www.hackforla.org/program-areas Feature: Refactor HTML size: 1pt Can be done in 4-6 hours labels Feb 28, 2024
@Anahisv23 Anahisv23 self-requested a review February 29, 2024 02:10
@Anahisv23
Copy link
Member

Anahisv23 commented Feb 29, 2024

Availability: 2/29 - 3/1, 10AM - 5PM
Review ETA: Thursday 2/29 5PM

@Anahisv23
Copy link
Member

Hey @luisitocanlas thanks for taking up this issue!

Here's what you did well
• Into and commit branches are correct
• There is a linked issue
• Moved the program-areas directory outside of the data directory
• Renamed the program-areas directory to _program-areas
• Added the appropriate code to _config.yml file
• Refactored the pages/program-areas.html code to retrieve data from the _program-areas directory
• The program areas website page shows the correct data

Overall nice work!

Anahisv23
Anahisv23 previously approved these changes Mar 1, 2024
@freaky4wrld freaky4wrld self-requested a review March 3, 2024 16:29
freaky4wrld
freaky4wrld previously approved these changes Mar 3, 2024
Copy link
Member

@freaky4wrld freaky4wrld left a comment

Choose a reason for hiding this comment

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

@luisitocanlas thanks for taking up the issue, the branches looks fine and linked issue is correct too. The changes you made are great as well and docker-testing shows no error.

Thanks for mentioning the error, before merging I would like @t-will-gillis to look into the error, as everything looks fine to me

PR approved

@t-will-gillis
Copy link
Member

Hey @luisitocanlas - tl;dr Thanks for mentioning the error, and I agree with your changes and with @freaky4wrld and @Anahisv23- looks great!

Otherwise, I am still learning about Jekyll but I believe this is a difference in Collections vs Data Files.

BTW this is outside of the scope of the issue, but I think it would help clarity by removing the blank lines at lines 60 and 26 and indenting the fors and ifs as shown. Thoughts?

Screenshot 2024-03-03 114550

@luisitocanlas luisitocanlas dismissed stale reviews from freaky4wrld and Anahisv23 via b02ce26 March 3, 2024 23:55
@luisitocanlas luisitocanlas force-pushed the move-refactor-program-areas-6323 branch from b02ce26 to 63d6b00 Compare March 4, 2024 00:11
@luisitocanlas
Copy link
Member Author

Hi @Anahisv23 , @freaky4wrld , @t-will-gillis,

I'm also pretty new to Jekyll and I need to read more about that. I also incorporated the changes you recommended, it will definitely help on clarity.

Thank you for all of your feedback!

@t-will-gillis t-will-gillis self-requested a review March 4, 2024 01:36
Copy link
Member

@t-will-gillis t-will-gillis left a comment

Choose a reason for hiding this comment

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

Hey @luisitocanlas - Thanks for making the edits!

I will go ahead and merge since @Anahisv23 and @freaky4wrld have already approved this

@t-will-gillis t-will-gillis merged commit d306b33 into hackforla:gh-pages Mar 4, 2024
@luisitocanlas luisitocanlas deleted the move-refactor-program-areas-6323 branch March 4, 2024 04:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Complexity: Medium Feature: Refactor HTML P-Feature: Program Area https://www.hackforla.org/program-areas role: front end Tasks for front end developers size: 1pt Can be done in 4-6 hours

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move program-areas directory and refactor program-areas.html

4 participants