thombruce / toodles

✅ A super simple todo app
https://toodles.thombruce.com/
GNU General Public License v3.0
0 stars 0 forks source link

Add tags #66

Closed thombruce closed 1 year ago

thombruce commented 1 year ago

closes #64

github-actions[bot] commented 1 year ago

Coverage Summary for `./packages/web`

Status Category Percentage Covered / Total
🟢 Lines 78.56% / 60% 1092 / 1390
🟢 Statements 78.56% / 60% 1092 / 1390
🟢 Functions 65.25% / 60% 77 / 118
🟢 Branches 88.4% / 60% 122 / 138
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
packages/web/src/components/ActiveInterval.vue 100% 100% 100% 100%
packages/web/src/components/CommentCount.vue 95.45% 100% 50% 95.45% 19
packages/web/src/components/ContextTag.vue 23.07% 100% 0% 23.07% 4-13
packages/web/src/components/IntervalTimer.vue 73.52% 25% 20% 73.52% 17-19, 22-27
packages/web/src/components/ProjectTag.vue 23.07% 100% 0% 23.07% 4-13
packages/web/src/components/StaticInterval.vue 100% 100% 100% 100%
packages/web/src/components/TagTag.vue 71.42% 100% 0% 71.42% 6-7
packages/web/src/components/TallyCounter.vue 100% 100% 50% 100%
packages/web/src/components/TodoItem.vue 84.9% 75% 37.5% 84.9% 14-16, 28, 32-35
packages/web/src/components/TodoList.vue 71.87% 100% 33.33% 71.87% 10-14, 26-29
packages/web/src/components/TodoText.vue 68.57% 66.66% 66.66% 68.57% 15-18, 21-24, 27, 29-30
packages/web/src/models/Base.ts 94.66% 100% 81.81% 94.66% 34-35, 56-57
packages/web/src/models/BaseCollection.ts 100% 100% 100% 100%
packages/web/src/models/Comment.ts 94.59% 100% 66.66% 94.59% 31-32
packages/web/src/models/CommentCollection.ts 100% 100% 100% 100%
packages/web/src/models/Context.ts 63.63% 100% 33.33% 63.63% 25-28, 31-37, 41-47, 51-52
packages/web/src/models/ContextCollection.ts 100% 100% 100% 100%
packages/web/src/models/Contextable.ts 23.72% 100% 0% 23.72% 13-57
packages/web/src/models/ContextableCollection.ts 100% 100% 100% 100%
packages/web/src/models/Interval.ts 100% 75% 100% 100%
packages/web/src/models/IntervalCollection.ts 100% 100% 100% 100%
packages/web/src/models/Project.ts 83.63% 100% 66.66% 83.63% 41-47, 51-52
packages/web/src/models/ProjectCollection.ts 100% 100% 100% 100%
packages/web/src/models/Projectable.ts 89.83% 100% 62.5% 89.83% 42-43, 46-47, 55-56
packages/web/src/models/ProjectableCollection.ts 100% 100% 100% 100%
packages/web/src/models/Tag.ts 25.86% 100% 0% 25.86% 14-56
packages/web/src/models/TagCollection.ts 80% 100% 0% 80% 6-7
packages/web/src/models/Taggable.ts 23.72% 100% 0% 23.72% 13-57
packages/web/src/models/TaggableCollection.ts 80% 100% 0% 80% 6-7
packages/web/src/models/Tally.ts 94.59% 100% 66.66% 94.59% 31-32
packages/web/src/models/TallyCollection.ts 100% 100% 100% 100%
packages/web/src/models/Todo.ts 87.58% 85.71% 73.33% 87.58% 61-67, 70-71, 74-75, 78-79, 122-124, 139-140
packages/web/src/models/TodoCollection.ts 100% 100% 100% 100%
packages/web/src/plugins/loki.ts 100% 100% 100% 100%
packages/web/src/plugins/pinia.ts 100% 100% 100% 100%
packages/web/src/plugins/timepiece.ts 71.42% 60% 50% 71.42% 14-19
packages/web/src/stores/comments.ts 96.87% 100% 100% 96.87% 14
packages/web/src/stores/contexts.ts 97.29% 100% 100% 97.29% 16
packages/web/src/stores/globals.ts 100% 100% 100% 100%
packages/web/src/stores/intervals.ts 97.95% 100% 100% 97.95% 17
packages/web/src/stores/projects.ts 97.29% 100% 100% 97.29% 16
packages/web/src/stores/tags.ts 24.32% 100% 100% 24.32% 10-37
packages/web/src/stores/tallies.ts 97.14% 100% 100% 97.14% 15
packages/web/src/stores/todos.ts 97.22% 100% 100% 97.22% 14
thombruce commented 1 year ago

Current state: I've simply copied the Context and Contextable models and store and changed the names to Tag and Taggable.

Tags will be a little different, of course, requiring knowledge not just of the tag value but also the tag key. We can also probably inherit much of what goes into tags in projects and contexts, which are like pre-defined tags but will maintain their own separate collections.

I don't know if distinct tag-keys will have their own collections... This is possible, but isn't strictly necessary and probably introduces undesirable complexity.