MyFinances icon indicating copy to clipboard operation
MyFinances copied to clipboard

idea: Global search

Open TreyWW opened this issue 1 year ago • 13 comments

How big is this feature?

Small

Describe the problem

The ability to globally search for a Client, Invoice (by id), or page (e.g. settings, client dashboard)

Describe a possible solution

Toggleable filters/sections maybe?

TreyWW avatar Jul 24 '24 21:07 TreyWW

Hi,

I would like to take this task and contribute to the project with my knowledge. Can you assign me to this issue?

misoed avatar Oct 08 '24 12:10 misoed

Hi @misoed,

That's fine, may I just ask that you update the issue as you do research/any reviews of the code before you start making changes?

E.g documenting a possible solution, diagrams if easier, model structure, etc.

May I also ask for an ETA when this can be started? Just helps keep it organised. Otherwise we get old issues with no progress.

Thanks!

TreyWW avatar Oct 08 '24 13:10 TreyWW

Hi,

sure, I’ll look into documentation and will discuss it here before I start making changes.

I can start working on it next week. By that time I’ll try to get familiar with the environment.

can you give me some help where to start? On which files should I focus?

misoed avatar Oct 09 '24 14:10 misoed

Sure thing, I'll give you some details maybe tomorrow when I have a bit more time. Much appreciated!

TreyWW avatar Oct 09 '24 14:10 TreyWW

Hey @TreyWW,

I was wondering about the implementation of the issue. Do I understand correctly that you want to implement a search bar where users can search for invoices or clients?

I could also add some toggleable filters based on the data from the databases where the invoices and clients are saved.

The search bar would return a list of matching results, and clicking on any result would display the details.

I believe I would need to add some lines to backend/views to implement the new search functionality.

Are the invoice and client objects queryable? I see that you already have classes for them in backend/models.py.

Feel free to correct me if I'm misunderstanding anything.

misoed avatar Oct 11 '24 20:10 misoed

Hi @misoed thanks for querying it!

So basically the idea was to have a search bar that allows a user to search for:

  • feature groups (e.g. "invoices" and that result redirect them to the invoices dashboard)
  • invoice ids (e.g. an invoice ID, that result will give basic defaults like Invoice ID, Client, etc and if clicked redirect them to manage that invoice)
  • client ids (e.g. a clients name, result if clicked will redirect to manage that client

Not too sure how filterable results would work any more complex then the search string, cause of the different kinds of results. So maybe 3 option toggles: feature, invoice, client (and any other if you think others should be added)

But I dont think there's any more complex filtering that would be worth doing.

Thanks for asking, do let me know if you have any more queries, appreciate the contribution :)

TreyWW avatar Oct 11 '24 20:10 TreyWW

Hey @TreyWW, I was thinking about the implementation of this issue, I would propose placing the button next to the monthly reports at the header. The button will be clickable and after clicking it will show a place for writing. Upon writing it will either directly redirect them or show some queries based on searching input which will redirect after click. What do you think?

misoed avatar Oct 29 '24 13:10 misoed

Hey @misoed thanks for looking into this! Would it not be a better experience to have a search bar on the top and then more options appear on click? I'm not sure if you've used AWS but the AWS search is exactly how I can picture it. You can search for features to view a list; or an exact resource.

To be honest resource searching will be hard as we have number IDs, would be cool to have prefixes like i- or c-

Up to you. If you'd like you could create a drawing (like eraserio) or prototype to see how the ideas feel before working on the backend

TreyWW avatar Oct 29 '24 13:10 TreyWW

If I understand well, you want a search bar that will add parameters from some dropdown list. Something like this issue? https://github.com/wazuh/wazuh-splunk/issues/323 For instance. Upon click I will have the dropdown with some basic filters like ID, user, invoices, receipts ... than other filters or specific queries or specific IDs. It will also accept the parameter from the user so he can set the specific parameter manually.

Of course not as complex as the issue I showed.

misoed avatar Oct 29 '24 13:10 misoed

Ah apologies my initial message was a little bit confusing and I just said the opposite. 🫢

Something like this search bar

image

image

TreyWW avatar Oct 29 '24 14:10 TreyWW

It's the search bar on the top of every page in the header. And you just search either a service name, or a resource name. My idea of filters was instead of resource names. But I thought well maybe we could adopt a naming convention like aws and use prefixes.

Just an idea, would need a big backend rewrite and model change if we adopt prefixes but could definitely have more benefits than drawbacks

TreyWW avatar Oct 29 '24 14:10 TreyWW

I think I got the problem. I can try to make the prototype. It will be search bar with some filters where user can write prompt. The Logic behind will try to determine possible results which will be shown in dropdown where user can select the specific possibility which will later redirect him to specific service or resource.

what do you say?

misoed avatar Oct 29 '24 14:10 misoed

Sounds great! Feel free to do design/flow mock ups before writing the code if you'd prefer - totally up to you!

Thanks for the help :)

TreyWW avatar Oct 31 '24 18:10 TreyWW