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

idea: Global search #456

Open
TreyWW opened this issue Jul 24, 2024 · 13 comments · May be fixed by #536
Open

idea: Global search #456

TreyWW opened this issue Jul 24, 2024 · 13 comments · May be fixed by #536
Assignees
Labels
idea: deciding This idea is being decided + validated idea

Comments

@TreyWW
Copy link
Owner

TreyWW commented Jul 24, 2024

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 TreyWW added idea idea: deciding This idea is being decided + validated labels Jul 24, 2024
@TreyWW TreyWW self-assigned this Jul 24, 2024
@misoed
Copy link

misoed commented Oct 8, 2024

Hi,

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

@TreyWW
Copy link
Owner Author

TreyWW commented Oct 8, 2024

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!

@misoed
Copy link

misoed commented Oct 9, 2024

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?

@TreyWW
Copy link
Owner Author

TreyWW commented Oct 9, 2024

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

@misoed
Copy link

misoed commented Oct 11, 2024

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.

@TreyWW
Copy link
Owner Author

TreyWW commented Oct 11, 2024

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 :)

@misoed
Copy link

misoed commented Oct 29, 2024

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?

@TreyWW
Copy link
Owner Author

TreyWW commented Oct 29, 2024

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

@misoed
Copy link

misoed commented Oct 29, 2024

If I understand well, you want a search bar that will add parameters from some dropdown list.
Something like this issue? wazuh/wazuh-splunk#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.

@TreyWW
Copy link
Owner Author

TreyWW commented Oct 29, 2024

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

Something like this search bar

image

image

@TreyWW
Copy link
Owner Author

TreyWW commented Oct 29, 2024

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

@misoed
Copy link

misoed commented Oct 29, 2024

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?

@TreyWW
Copy link
Owner Author

TreyWW commented Oct 31, 2024

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 TreyWW linked a pull request Dec 1, 2024 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idea: deciding This idea is being decided + validated idea
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants