azavea/summer-of-maps-website

Implement upcoming_session logic and refactor session logic

Closed this issue · 1 comments

Overview
We want to implement new logic to the site which displays language appropriate for when we are between sessions but are starting to ramp up for a new session. Essentially, a heads up to site visitors that application will be starting soon.

As part of this task, I want to refactor the logic surrounding the stages of SoM to be more explicit. The current logic in the config.yml looks like the following:

in_session: bool
stage:
    nonprofit_signup: bool
    nonprofit_review: bool
    student_signup: bool
    student_review: bool
    student_announcement: bool
    fellowship_ongoing: bool

I want to update logic to resemble the following, where only one thing can/should be true at a time:

out_of_session:
    freeze_session: bool
    upcoming_session: bool
in_session:
    nonprofit_signup: bool
    nonprofit_review: bool
    student_signup: bool
    student_review: bool
    student_announcement: bool
    fellowship_ongoing: bool

After a review of the code, the following files will be affected by this change and will need to be updated:

  • default.html
    • form-modal logic
  • navbar.html
    • apply button logic
  • hero.html
    • hero actions
  • hero-post.html
    • remove unused logic line 15-17
  • footer.html
    • apply button logic
  • call-to-action.html
    • section subtitle
    • section title
    • section blurb
    • c2a message
  • project.html
    • layout logic

With the 2020 session, both student and nonprofit applications will occur at the same time. There is no logic to handle this scenario just yet. I'm going to add that logic request to this issue:

out_of_session:
    freeze: bool
    upcoming: bool
  in_session:
    # if nonprofit/student applications at different times (maintains past structures)
    nonprofit_signup: bool
    nonprofit_review: bool
    student_signup: bool
    student_review: bool
    student_announcement: bool
    # if nonprofit/student applications at the same times (allows for both applications at once)
    applications_signup: bool
    applications_review: bool
    applications_announcements: bool
    # if students are actively working
    fellowship_ongoing: bool