Tasks! Confetti! Colors!! Terms CRUD!!!!
I’ve added all sorts of things since last update. Colors for courses,
task CRUD, basic CRUD for terms, confetti, and so many bug fixes!!
Tasks ✅
CRUD is never that hard to implement with this stack, but with tasks,
the UI is more of a beast to handle. I wanted it to be more inline then
creating courses, for example. We’ve already seen the C in CRUD from
last devlog, so here’s the RUD!
Everything is handled in a popover rather than a dialog, as it’s a lot
cleaner, and for quickly clicking through tasks, a lot easier.
Unfortunately, the code is a little messy here as I copied basically the
same thing like 3 times. I will probably fix this later?
Anyway, pressing “edit” in the popover allows you to edit the title (and
thus the due date, priority, URL, and course), as well as the URL in a
separate input and a note for the task, which couldn’t be auto-filled
from the title bar. How I’ve made it, these two inputs are handled
separately from the rest of the task editing, and when you finish
editing it, it sends two requests to edit the task: one for the URL and
note, and one for everything else. This led to a race condition, only on
the client side, that would cause the URL and note request to override
the other one, reverting to the previous state. This was an easy fix
however, just allowing the dispatch function to edit things with a
partial object instead of requiring the full one.
Confetti
Completing tasks rewards you with confetti! Super simple to implement
with the react-confetti library, but it ended up being a little stupid
to manage the state properly so it only went off when you clicked.
Terms
Terms CRUD was simple, however. Since there’s so little to them already,
it was simple to make a spot to edit and delete them. I decided to put
it in the settings page as that’s the most convenient spot.
Bug fixes
Other than the ones mentioned above, here are some more bugs I fixed:
- Terms not starting/ending at 12:00am
-
in _ (time unit)matcher used current time instead of 11:59pm - Task sorting was wrong
- Term popover could clip out of the screen on smaller devices
- Term timezone issues
Next
I’ve got a huge list still. Here’s a non-exhaustive one:
- More due date matchers (day-of-week, month names)
- Study tools, such as a pomodoro timer and flashcards
- Making the whole website a PWA, including notifications
I’m not excited about the latter or the former, but the 2nd one I think
I’ll do next, just because it sounds fun to make.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.