♻️ refactor: make header labels more accurate#188
Merged
Conversation
Contributor
Author
|
Some observations: in my opinion, the format of Someday Week label could be improved, as "M.D - D" is not very intuitive. Maybe the "MMM D - D" format could be better? That way it would be more intuitive and not repeat the full month name ("MMMM") like in the Someday Month label. |
2 tasks
these comments don't add additional value to the code in addition, they hard-code the concept of a 'week' into the implementation, making this harder to support other views (4 day, 1 day, etc)
remove concept of weekStart/weekEnd in place of start/end
652b1f5 to
7004215
Compare
Contributor
Thank you for the suggestion! I'll keep this in mind and compare it to other user feedback on this change |
tyler-dane
approved these changes
Dec 14, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This resolves issue #165
What I've done:
getCalendarHeadingLabelutil function forHeader.tsx.getWeekRangeLabelutil function so it can return two different formats.web.date.util.test.tsfile, containing unit tests forgetWeekRangeLabelandgetCalendarHeadingLabel.getMonthListLabelunmodified, as it already behaves as expected (returns the full month name of week start).I didn't write unit tests for
getMonthListLabeldue to its simplicity, but I can add it if you see it as necessary.All unit tests (including the added ones) have passed.