amoraitis/TodoList

Todo should have tag(s)

Closed this issue · 8 comments

Is your feature request related to a problem? Please describe.

It's convinient to use tags to be able to organize our todos.

Describe the solution you'd like

  • In TodoItem.cs add a field for tags. It's clearly a Collection of tags, because the user can apply as many tags he/she wants to.

Describe alternatives you've considered
Another possible solution is to se categories...

Additional context

  • Use search to add the tags, when the user creates a todo, or edits it. User is able to create a tag.
  • Add the entries in the ApplicationDbContext class
  • Extend the ITodoItemService with a method which will return a list of todos based on tags.
  • Update the TodosControlller with a new search endpoint, of your choice to return a view(see the next task) when posting tags.
  • Last but not list, extend the current views to support the functionallity, and/or create your own views(where do you think that we can use this or not)

Hi, I would like to tackle this issue :)

@jenia90 yes, please.

@amoraitis is there any specific reason why we're using arrays rather than generic collections? It could simplify some things, e.g., selecting TodoItem(s) with specific tags.

@amoraitis is there any specific reason why we're using arrays rather than generic collections? It could simplify some things, e.g., selecting TodoItem(s) with specific tags.

@jenia90 As far as I remember I have used ICollection for the DTOs. I have used arrays in some ViewModel classes you are right. But I would like to make use of collections for this one.

@amoraitis do you mind if i change it to IEnumerable<> or ICollection<>?

Nope, but it requires a big set of changes. It's not only the View model classes, it is also, controllers and views. Stick to this for now, we can apply the changes later, or open another PR later.

Nope, but it requires a big set of changes. It's not only the View model classes, it is also, controllers and views. Stick to this for now, we can apply the changes later, or open another PR later.

Sure, I'll open an issue for this.

Solved in #40