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

Add Date selector to tasks layout #792

Merged
merged 4 commits into from
Feb 21, 2024
Merged

Add Date selector to tasks layout #792

merged 4 commits into from
Feb 21, 2024

Conversation

negreirosleo
Copy link
Contributor

@negreirosleo negreirosleo commented Feb 1, 2024

This is the first step (of 2) in the date picker for /tasks. it adds the base for selecting dates, in the next PR the calendar will be added.

The date navigation works based on the url date param, eg: /tasks/week/2024-01-24, and this will show the of the 24th of January.

If its a day view -> fetch all tasks for that day
If its a week view -> fetch all tasks for the date week
It its a month view -> fetch all tasks for the date month

Also, the page for the day view was changed from /tasks to /tasks/day, to follow the same pattern as month and view.

Screenshots

Screencast.from.2024-02-19.14-40-35.webm

@anarute
Copy link
Member

anarute commented Feb 7, 2024

Thank you for this!

In the mockup this was probably not very clear but the navigation should be per "page" not per day. So for example if you are in the Week view, when clicking the next arrow it should got to the next week directly not day by day. If you are in the Monthly view it should go to the next or previous month.

Check how google calendar works for example:

Screencast.from.2024-02-07.12-03-46.webm

Copy link
Member

@anarute anarute left a comment

Choose a reason for hiding this comment

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

LGTM! The date should be a date picker instead of a static date text, though I'm happy to merge this PR and have a new one adding the date picker.

Copy link
Collaborator

@dmtrek14 dmtrek14 left a comment

Choose a reason for hiding this comment

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

In addition to what Ana already pointed out, the only thing I noticed is that there is sometimes a bit of a lag loading the data. For instance, I had tasks on Jan 2, 4, 9, and 10. If I used the arrows next to the date picker to click through dates, sometimes it would take several seconds for the tasks to load, but this behavior was not entirely consistent. I am wondering if a skeleton loader for the task cards would make sense here to indicate to the user that data is being loaded. This could be done in a future PR as a refinement. Thoughts?

/tasks is now /tasks/day, this way its easier to implement the same
navigation that we have for week and month, also the loading state for
it was added.
@negreirosleo negreirosleo merged commit 03fc47c into main Feb 21, 2024
2 checks passed
@negreirosleo negreirosleo deleted the date-picker branch February 21, 2024 18:20
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

Successfully merging this pull request may close these issues.

3 participants