eklem / draw-at-work

Templates and tools for workshops to learn how to draw to communicate. Not art, communication. Everyone can. Doesn't need to be pretty. Communicate better within teams and stakeholders.
MIT License
2 stars 0 forks source link

Set up todo style list #11

Open eklem opened 3 months ago

eklem commented 3 months ago

Needs to be possible to be checked as done and tracket how many steps for each of the workshop parts that are done. And also if they are fully done/finished.

Look at this howto: https://www.freecodecamp.org/news/build-a-todo-app-from-scratch-with-reactjs/

eklem commented 3 months ago

Start with building a todo-list app that persists: MDN - Beginning our React todo list

Then figure out how to just set tasks in code instead of from a user interaction, and check if tasks are persisted already.

eklem commented 3 months ago

The only thing needed to be stored is the done-state of each task: true/false. If ID doesn't exist, it can be set and set to false.

eklem commented 2 months ago

So each checkbox element has an ID. First check if exists in key/value DB. If no, add ID and set it to false. If yes, check if true/false. Then populate checkbox.

eklem commented 2 months ago

Needs a second table, and that is which workshop session each ID connects to. So we can aggregate how far you've gotten on each task.

eklem commented 2 months ago

Check out how to define types: Learn a bit about type definition and TypeScript #20

eklem commented 2 months ago

The actual info that will be stored:

Modules on the page:

eklem commented 2 months ago

And some stuff to read for how to work with IndexedDb in React with TypeScript:

eklem commented 2 months ago

Try using the idb library. It is typed.

eklem commented 1 month ago

Start with a static component, and build from there. https://react.dev/learn/your-first-component

This one seems like a more proper example for what I'm looking for: https://stackoverflow.com/questions/76926981/how-do-i-build-a-html-element-in-a-variable-with-props

Or a little simpler: https://stackoverflow.com/questions/38486660/how-to-add-a-classname-id-to-react-bootstrap-component

eklem commented 1 month ago

React's useState seems to be the way to go: https://react.dev/reference/react/useState

eklem commented 1 month ago

idb seems too low level, testing dexie

eklem commented 3 weeks ago

Check out how to use promises with Dexie: https://dexie.org/docs/Promise/Promise