spiral-project / ihatemoney

A simple shared budget manager web application
https://ihatemoney.org
Other
1.21k stars 270 forks source link

Added a filter option to the Bills screen #1308

Open charlieezh opened 7 months ago

charlieezh commented 7 months ago

Closes #1155 Hi, I just implemented a new feature as requested in the issue #1155 that we can filter the bill screen based on start date and end date. I made changes in three files - added a filter form in the list_bills.html template, and added corresponding functions in the model.py and web.py. I hope it would be helpful!

zorun commented 7 months ago

Hi, thanks for the proposal. Is this something you need yourself?

Could you share a screenshot of how this new feature looks like in the interface? As you may have seen, UI/UX considerations are important for the project (see https://github.com/spiral-project/ihatemoney?tab=readme-ov-file#current-direction-as-of-2024)

charlieezh commented 7 months ago

Hi, thanks for the proposal. Is this something you need yourself?

Could you share a screenshot of how this new feature looks like in the interface? As you may have seen, UI/UX considerations are important for the project (see https://github.com/spiral-project/ihatemoney?tab=readme-ov-file#current-direction-as-of-2024)

Hi, this feature is submitted as an issue in #1155 by another user and I implemented it. I also think this is a very useful and fundamental feature since we can sort out the transaction based on a period of time and see how much is being spent within that time. Below is a screenshot of the filter feature in the interface (note that we can always improve the look later using css)

image

After setting the start date to 2024-04-15 and the end date to 2024-04-25, only transactions between this time show up on the screen and the dates input remained in the form, indicating the effectiveness of the functionality. (Note that each members amount did not change on the left, only the transactions shown up have changed.)

image
almet commented 7 months ago

Thanks for this work. I wonder if we should only display it when we have a certain number of bills (maybe when we have more than a page). What do you think?

charlieezh commented 7 months ago

Thanks for this work. I wonder if we should only display it when we have a certain number of bills (maybe when we have more than a page). What do you think?

Personally I would like this option to be consistent to be on the screen no matter how many bills there are, since sometimes people do want to filter and sort out their bills even though there are not many of them.

almet commented 7 months ago

That seems okay to me. I was suggesting this because this can "clutter" the UI, by showing too many options, especially for new projects. Maybe we could hide this behind a "filter bills" link, or something similar?

charlieezh commented 7 months ago

Maybe we could hide this behind a "filter bills

Yea that sounds good to me!

sergiors commented 3 months ago

+1