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): Add tags on bills (WIP) #1313

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

feat(tags): Add tags on bills (WIP) #1313

wants to merge 2 commits into from

Conversation

almet
Copy link
Member

@almet almet commented May 15, 2024

Tags can now be added in the description of a bill, using a hashtag symbol (#tagname).

There is no way to "manage" the tags, for simplicity, they are part of the "what" field, and are parsed via a regular expression.

Statistics have been updated to include tags per month. Under the hood, a new tag table has been added.


Todolist:

  • Add a new table and relationship
  • Parse the hashtags from the "what" field
  • Create the tags if they do not already exist
  • Display the tags in the bill list table
  • Compute the statistics for the tags as well
  • write tests
  • update the API

@almet
Copy link
Member Author

almet commented May 15, 2024

A few remarks:

  • I'm not even sure we should add a table for this. Maybe having an encoded list would be enough.
  • I would need to expose this with the REST API
  • Migrations would need to be run before adding these changes. It seems they haven't been created on latest mainbranch

Tags can now be added in the description of a bill, using a hashtag
symbol (`#tagname`).

There is no way to "manage" the tags, for simplicity, they are part of
the "what" field, and are parsed via a regular expression.

Statistics have been updated to include tags per month.

Under the hood, a new `tag` table has been added.
@almet
Copy link
Member Author

almet commented May 30, 2024

This now works properly. Tags are displayed on the main bill list, and monthly statistics have been updated.

Here are a few screen captures:

image image image

@Glandos
Copy link
Member

Glandos commented Jun 6, 2024

My little experience on UI told me that we could have a little bit of CSS to show that it's a tag, e.g. using a rounded border and colored background. Like from Material design:
image

@zorun
Copy link
Collaborator

zorun commented Sep 20, 2024

Nice work! I remember trying to convince you a few months ago that tags were more useful than simple categories, happy to see the result ;)

I haven't looked at the code, but I have a few questions UX-wise:

  • what happens when there are lots of tags? Does it generate 100 columns in the statistics page?
  • how does the list of bills look like on mobile with the new column? I remember it's quite tight already
  • is this feature "discoverable", i.e. how can I know that I can enter tags in the "What" field?
  • is there some auto-completion of tags to reuse existing ones, instead of creating slightly different tags? like #animal vs #Animal vs #animals

The statistics page is complex, we would like to show stats per month and per tag, but this is really a lot of data. Maybe something dynamic with javascript? I imagine showing just one amount per month, and then being able to click on tags to enable/disable them individually, and that would update the amount display per month.

Another nice visualisation for stats would be a breakdown: 20% of expenses for food, 10% for transport... Of course the total can be more than 100% if some bills have several tags, so I'm not sure how to present that meaningfully. We would need some user stories to guide the UX.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants