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

Auto rotate banner text according to Election Day calendar #286

Open
3 tasks
karpet opened this issue Feb 10, 2024 · 1 comment
Open
3 tasks

Auto rotate banner text according to Election Day calendar #286

karpet opened this issue Feb 10, 2024 · 1 comment
Assignees

Comments

@karpet
Copy link
Member

karpet commented Feb 10, 2024

Currently we switch the home page banner intro text manually after each Election Day calendar milestone (day after registration closes, day after Advance Ballot deadline, day after Election Day, etc).

Let's automate that rotation with some pre-defined rules.

If we have special keys in the translations.json file for each milestone change, then the app can do the calendar math and automatically pick the banner text based on what day it is.

This ticket represents figuring out:

  • milestone days
  • what calendar math to apply
  • what special translation key to use for each milestone
@karpet
Copy link
Member Author

karpet commented Feb 16, 2024

Thought: I wonder if a calendar.json file would make sense. The structure might be an array (list) of election season objects, where the keys are milestone days and the values are dates. Essentially turning https://sos.ks.gov/elections/important-election-dates.html into a structured list. Where no time is listed, the implicit time is 23:59:59 (end of day).

[
  {
    "name": "2024 Presidential Preference Primary",
    "election": "2024-03-19",
    "reg_deadline": "2024-02-20",
    "adv_start": "2024-02-28 00:00:00",
    "adv_end": "2024-03-18 12:00:00",
  }
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants