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

Headers are inaccurate during month changes #54

Closed
1 task
tyler-dane opened this issue Jan 4, 2024 · 3 comments
Closed
1 task

Headers are inaccurate during month changes #54

tyler-dane opened this issue Jan 4, 2024 · 3 comments
Labels
good first issue Good for newcomers

Comments

@tyler-dane
Copy link
Contributor

tyler-dane commented Jan 4, 2024

Prerequisites

  • Using an up-to-date main branch

Expected Behavior

When on a week that spans multiple months, the label heading label should display both months in the following format:
'ShortenedMonth 1 - ShortenedMonth 2 YYYY'

  • For example: "Jun - Jul 2024"

When the week spans multiple years (Dec-Jan), the label should change to:
'Dec YYYY - Jan YYYY'

Current Behavior

MonthLabelBug

  • Notice: It says "December 2023", when the current day is actually January 2024, which is misleading for people like me who forget what year it is

Screen Shot 2024-10-01 at 9 17 36 PM

  • Notice: The header is '9.29 - 5', when it should be '9.29-10.5'

Steps to Reproduce

  1. Hard-code the today value to in useToday.ts to 2024-01-04: const today = dayjs("2024-01-04");

  2. Notice: Month label is December 2023. It should be 'Dec 23 - Jan 24'

  3. Repeat process for other month changes (eg set today to 2024-02-01)

Possible Solution (Not obligatory)

  • Compare the month's of start and end of view date objects
  • When they're different, use the new format

Context

  • Required: Please write unit tests to confirm the new label logic works as expected
@tyler-dane tyler-dane added bug good first issue Good for newcomers labels Jan 4, 2024
@tyler-dane tyler-dane moved this to Todo in v1 Cleanup Jan 4, 2024
@tyler-dane tyler-dane moved this from Todo to In Progress in v1 Cleanup May 17, 2024
@tyler-dane
Copy link
Contributor Author

@AzharAhmed-bot is working on this one

@tyler-dane
Copy link
Contributor Author

Moving this back to 'Todo' due to inactivity -- consider this up-for-grabs for anyone else interested!

@tyler-dane tyler-dane moved this from In Progress to Todo in v1 Cleanup Jul 21, 2024
@tyler-dane tyler-dane changed the title Update Heading During Month Changes Headers are inaccurate during month changes Oct 2, 2024
@tyler-dane tyler-dane removed this from v1 Cleanup Dec 2, 2024
@tyler-dane
Copy link
Contributor Author

Closing in favor of #165

@github-project-automation github-project-automation bot moved this from Ready to Done in 🏗 Compass Roadmap Dec 6, 2024
@tyler-dane tyler-dane closed this as not planned Won't fix, can't repro, duplicate, stale Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant