Hi! I am building a search feature for a resource ...
# avo-2
a
Hi! I am building a search feature for a resource and we wanted to display the search results in the page where the listing of the resource is located, as opposed to the JS-powered popovers that are by default. In other words, similar to the demo of Ransack's simple usage. Is this possible? Thanks
l
That's not supported out of the box. Avo uses the popup for most of the search workloads. We are open for PRs if you want to contribute. That could be done using Hotwire which is built-in Avo
a
Oof. Too much JS and CSS in Avo.
l
oh c'mon. there's really not that much. Just a few Stimulus controllers sprinkled around for tough edge-cases
this is an opportunity to shave some of that off with a PR
a
Haha well I appreciate the encouragement. Part of the friction we are having with Avo adoption on our project is that it does not seem to be designed with being able to apply the pre-existing styles or override UX easily.
*customize UX, i mean
l
you said it well. it's not designed to be changed in that way, yet. it's oppinionated in that way to bring a certain level of UX to the table. we worked on that so you don't have to
think of it like CoC
just like the Rails way needs to be embraced, so are some things with Avo
we are planning to make the interface themable so a developer can customize the colors, borders, shadows, and more
to make it theirs
it's not the kind of gem that you start with a design, and implement the features within that design
it's more of a conversation between the design and development teams
I'm curious, what is the feature/features that attracted you the most to Avo, and made you decide to use it (even with all that friction)?
a
Mostly that we have tried all the rest of the rails admin gems/libs and wanted to try this one because we thought it looked good. Did not do a deep dive up front just wanted to take it for a test drive on a really project. and here i am complaining haha
l
haha
got it. what kind of project are you building? is Avo the actual consumer-facing back-office of the app or an admin panel where just a few core members use?
a
You make a good point with similar to how Rails is opinionated Avo is too. But Avo is too extreme in my opinion with some of its opinions and I think this is one of them. Simple search usage would be to just display a page listing of the search results which would simply be a listing of the resource, same as index. The fancy JS version is an overoptimization for most of our use cases.
For this particular project, Avo is for an admin panel that just a few core members use.
l
oh, yeah. I never said that our version of search is the best
I think there are cases where the other "in-place" kind, with proper Hotwire optimizations might work better
the way most things in Avo are built as "first iteration". initially we didn't know what people will use and what would bring value. If one feature is "priceless" for one user, it may be useless for another and so on
so we took it step by step. made the simplest search we could. I took algolia's js svcript to build the global search
you need something like that for the global search
then. I introduced resource search. what's the first iteration on that? the simplest thing I can do to make that happen. use what I already have and make it work
so I used that plugin, controller methods and all the code I already had
fast-forward to today, you come in and say "you could do better". and I agree. this is validation that someone is using the resource search and that it can be improved
time for the second itearation
you could be that person that brings that on
🙂
...and improve everbody's experience in the process
a
I understand what you're saying with all that. But i have to disagree that the way search works is not "the simplest thing".
So thats the feedback i have for ya and I hope its heard. Thanks
l
I meant do the simplest thing I can do to implement it. I did that using the tools I had at my disposal.
anyway, thank you for the feedback
it was dully noted
maybe someone wants to pick it up
I love guiding people through the codebase
5 Views