interface icon indicating copy to clipboard operation
interface copied to clipboard

Allow for searching governance proposals

Open drewcook opened this issue 3 years ago • 2 comments

Is your feature request related to a problem? Please describe.

As a user, I'd like to be able to search for a proposal by keyword and find what I'm looking for more easily. Currently, as a user, I have to scroll through a list of many proposals to find what I'm looking for, and often I am not sure which proposal includes the information I'm looking for.

Describe the solution you'd like

It would be great to have a search bar at the top of the proposals on the right hand side of the UI next to the filter dropdown on /governance. The search bar would filter through the proposals on key-up commands with a slight debounce for a bit of optimization. The keywords should filter by title as a primary target, and prioritize these results first. I believe the keyword should also filter through proposals in the body of the proposal, but secondarily and de-prioritized. For example, FEI may not be in a title, but included in the body. The title was a generic title Risk Parameter Updates.

Describe alternatives you've considered

n/a

Additional context

My use case last week was searching for when FEI USD got frozen. I could have easily searched "frozen" instead or FEI to find it more quickly. I eventually had to reach out to the Aave team on which proposal included this change after about 10 minutes of searching and clicking.

drewcook avatar Oct 31 '22 15:10 drewcook

Query by date could also be useful to see proposals in a given time period.

foodaka avatar Oct 31 '22 15:10 foodaka

Just 2ct on this as i was recently looking into proposal search (on a different ui), but i think same/similar findings apply.

If you want to keep the ui decentralized and hosted on ipfs: loading all the ipfs and doing some sort of client size fuzzy search "works", but does not scale at all. The issue is that you would need to load all ipfs content which right now would be close to 600kb already and steadily increasing (by 2-8kb per proposal). Also it's getting obviously a bit slower with each added proposal (not so much with db search index but noticeable with js fuzzy library i tried)

One way "around" this might be to extract keywords on build, so keep initial load low and pass it alongside the title (didn't try that).

Doing only title search doesn't bring much benefits over ctrl + f(it's slower), but might make sense when table is virtualized. As it isn't right now, doesn't make much sense imo.

Without a search index & a db, i think there's no good way of achieving sth useful*

*even with search index results were mixed as lot's of proposal titles are bad and content sometimes also is not great (e.g. "fei" might yield 10+ results) - did simple text search, perhaps sth more sophisticated would work


In the end i ended up not implementing search(for now) as i didn't want to sacrifice decentralization & the pros didn't outweigh the cons. Especially as i noticed that google search is actually quite good and I expect ppl to rather come through google then digging trough ui image

sakulstra avatar Nov 04 '22 14:11 sakulstra

Shipped.

0x4Graham avatar Mar 08 '23 12:03 0x4Graham