Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: tags page with tons more detail #396

Closed
1 task done
nelsonic opened this issue Jul 18, 2023 · 13 comments
Closed
1 task done

Feat: tags page with tons more detail #396

nelsonic opened this issue Jul 18, 2023 · 13 comments
Assignees
Labels
discuss Share your constructive thoughts on how to make progress with this issue elixir Pull requests that update Elixir code enhancement New feature or enhancement of existing functionality help wanted If you can help make progress with this issue, please comment! priority-2 Second highest priority, should be worked on as soon as the Priority-1 issues are finished T4h Time Estimate 4 Hours technical A technical issue that requires understanding of the code, infrastructure or dependencies

Comments

@nelsonic
Copy link
Member

nelsonic commented Jul 18, 2023

As noted by @panoramix360 in #140 (comment) πŸ’¬
At present the /tags page is quite basic: https://mvp.fly.dev/tags this is my tags page:
mvp-nelson-tags
I have 118 tags at the time of writing:

dwyl-mvp-tags-nelson

Some of these are duplicates and there are a few typos. πŸ€¦β€β™‚οΈ
So in an ideal world, we'd also have a way of "merging" tags. πŸ’­
But I suspect I'm the only person with this "problem" right now. πŸ™ƒ
So let's just focus on adding useful details to this page before doing anything "fancy" ... πŸ‘

Todo

  • Re-work/enhance the /tags page to include a lot more info in a sortable table.

Columns:

  • tag.text - the "pill" of the tag with the tag.color applied (the current appearance, see above)
  • tag.color - the hex code for the tag.color - ideally clicking/tapping on this will open the color picker.
  • created_at - when the tag was created
  • latest - the last time an item was tagged with this tag.
  • items count - the of the number of items with this tag - clicking/tapping on the count will take you back to the items view with with the filter=tag_name so that you are seeing the items with that tag applied.
  • time - the total time that has been logged on items with this tag
  • edit - the edit button for editing
  • delete - delete the tag (though I'm not a fan of this permanent destruction ...)

This is a perfect opportunity to make this a look good by using Tailwind UI -> With sortable headings:
https://tailwindui.com/components/application-ui/lists/tables#component-7b5a46e74e475708d966ca31716f1771
image

@nelsonic nelsonic added enhancement New feature or enhancement of existing functionality help wanted If you can help make progress with this issue, please comment! technical A technical issue that requires understanding of the code, infrastructure or dependencies T4h Time Estimate 4 Hours priority-2 Second highest priority, should be worked on as soon as the Priority-1 issues are finished discuss Share your constructive thoughts on how to make progress with this issue elixir Pull requests that update Elixir code labels Jul 18, 2023
@panoramix360
Copy link
Collaborator

hey everyone!

Do you think this is ready to be developed?

I can take it :D

@nelsonic
Copy link
Member Author

nelsonic commented Sep 6, 2023

@panoramix360 go for it. πŸ™

@panoramix360
Copy link
Collaborator

hey! I began the task :D

I was looking through the tags structure, and it seems it's not a LiveComponent, do you think we will need to transform it to a LiveComponent so we can make the sorting work?

I think we need to hehe, let me know what you guys think!

@nelsonic
Copy link
Member Author

Please go ahead. Thanks. πŸ™

@panoramix360
Copy link
Collaborator

panoramix360 commented Oct 17, 2023

hey! 'll give you guys an update.

I'm close to finishing this feature!

It's just missing:

  • clicking/tapping on the count will take you back to the items view with the filter=tag_name so that you see the items with that tag applied.
  • the total time that has been logged on items with this tag
image

:D

@LuchoTurtle
Copy link
Member

@panoramix360 looks amazing 😍 Thank you so much for your contributions, they're very much super appreciated!
Whenever you feel comfortable, you can open a PR so we can also help you out, if case need be :)

@panoramix360
Copy link
Collaborator

panoramix360 commented Oct 24, 2023

Draft PR created so you guys can begin the review πŸ•Ί

image

I have to add the tests for the new screen πŸ˜…

I have one problem that I want to ask for your help with so we can see how we can solve it.

I was able to build the sorting mechanism in the query, but it's not working with the virtual/calculated fields, I tried some stuff but only could make it work if I wrote hardcoded, but it does not work dynamically.

Do you have any idea what we could do? I'm thinking that maybe we will need to rewrite the query using Ecto Macros for it to work.

@nelsonic
Copy link
Member Author

Hard-coded is already a good start.
I'd much rather use a client-side package to sort data and just leave the Ecto query as simple as possible.
e.g: sortable
image

Note: there are many libraries we can use ... we want something lightweight.
Feel free to research and suggest one that has filtering
so people who have many tags can type a few characters and see the matching tags.
e.g: https://www.bu.edu/tech/services/cccs/websites/www/wordpress/how-to/sortable-searchable-tables/

@panoramix360
Copy link
Collaborator

understood, but I think this probably should be an issue by itself, no?

Maybe just for now, I could sort using Elixir in the context of the LiveView (not using Ecto), what do you think?

I think that sorting by some library could be changed on a different PR.

@nelsonic
Copy link
Member Author

Yeah, we can have a separate issue on sortable tables using a JS library. πŸ‘Œ
The progress you’ve already made on the /tags page is excellent. 🀩

@nelsonic
Copy link
Member Author

Dedicated (separate) issue for the sorting/filtering: #436

@panoramix360
Copy link
Collaborator

Probably this Issue could be solved after the PR merged :D

@LuchoTurtle
Copy link
Member

Closing this off since #435 was merged :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss Share your constructive thoughts on how to make progress with this issue elixir Pull requests that update Elixir code enhancement New feature or enhancement of existing functionality help wanted If you can help make progress with this issue, please comment! priority-2 Second highest priority, should be worked on as soon as the Priority-1 issues are finished T4h Time Estimate 4 Hours technical A technical issue that requires understanding of the code, infrastructure or dependencies
Projects
Status: βœ… Done
Development

No branches or pull requests

3 participants