The Previous day arrow on the tasks screen jumps left when the Today button appears
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 88/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- go, playwright, react, typescript
- Domain
- accessibility, frontend, testing
Research direction
In frontend/src/tasks/TasksScreen.tsx, inspect DayNavigation and the Today button condition. Read the existing test in frontend/src/test/tasks-route.test.tsx and the related Playwright checks in test/e2e/tests/tasks.spec.ts. Keep all three controls in stable positions, with Today disabled on today, then run the named tests and confirm two consecutive Previous day clicks reach the date two days back.
Written by the indexing model from the issue text.
Description
What happens
The header of the tasks screen at /tasks has three day controls: Previous day, Today and Next day. DayNavigation only renders the Today button when the screen shows a day other than today.
The header actions sit against the right edge. When Today appears, it pushes the Previous day arrow about 56 pixels to the left. This happens at every width, phones included. The Next day arrow does not move.
On today, click Previous day, then click again without moving the mouse. The second click lands on Today and takes you back to today. You expected to go two days back. Going the other way has the same problem: after you click Today, the button disappears and the Previous day arrow moves under the mouse.
WordPress keeps navigation buttons in place. The DataViews pagination always renders Previous page and Next page. On the first or the last page it disables the button that does not apply, with accessibleWhenDisabled. It never removes it.
What should happen
The Previous day and Next day arrows stay in the same place on every day. The Today button shows on every day. On today it is disabled and a click does nothing. On any other day it works as it does now. The @wordpress/ui Button takes disabled and stays focusable when disabled by default, so keyboard users still reach it.
Two tests prove the fix:
- In
frontend/src/test/tasks-route.test.tsx, the test "offers a way back to today only when looking at another day" changes. On today the Today button is there and disabled. On another day it is enabled and goes back to today. - A new Playwright check in
test/e2e/tests/tasks.spec.tscompares the box of the Previous day button on/tasksand on the day before, and expects the same position. It also clicks Previous day twice in the same spot and expects the date from two days back.
Where
frontend/src/tasks/TasksScreen.tsx,DayNavigation, thedate === today ? null : (...)branch around the TodayButtonfrontend/src/test/tasks-route.test.tsx, the test named abovetest/e2e/tests/tasks.spec.ts, the new check next to "carries work left over from an earlier day into today"
- Dominant language
- Go
- Stars
- 287
- Forks
- 64
- Avg merge
- 13h 19m
- Merged PRs (30d)
- 62
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from gopherium/AlphOne
-
good first issue help wanted javascript
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
bug help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
bug help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
bug help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
documentation help wanted
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 1 day
All issues in gopherium/AlphOne
Similar issues
-
stage-fail
Difficulty 1/5 Under an hour Newbie friendliness 72/100
siyuan-note/bazaar#2405 ·
Maintainers usually reply within 1 day
-
bug priority: high workstream:cache
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
rossoctl/context-guru#707 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
prime-radiant-inc/evener#5028 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100