rubyvideo icon indicating copy to clipboard operation
rubyvideo copied to clipboard

Add speaker search on speaker search page

Open hschne opened this issue 2 months ago • 2 comments

This is a revamp of #674 and prep for filtering speakers by location (#1040).

I did some trials with typeahead search (as suggested in the linked issue) and found the UX not so nice. The current implementation refreshes the list of speakers whenever we type. Had to use a turbo frame rather than stream because the lazy loading pagination caused weirdness otherwise. This was the simplest approach I could find to make it work.

I also removed the letter filtering. With the search in place it seems pointless :shrug:

hschne avatar Oct 10 '25 19:10 hschne

I like it 👍

I noticed that the infinite scroll it currently broken, the upcoming collection of speakers in not appended to the correct div with the grid. I think you might want to add an id to this div and target it for the update

I think the PP are a bit too big and they are not perfectly aligned with the text right now Here is a test I did with :sm size for the avatar and an increased y gap to 1rem (gap-y-4) for the grid

CleanShot 2025-10-11 at 11 12 14@2x

To fix the alignement I changed that in _speaker partial

-<div class="relative w-fit">
+<div class="flex w-fit">
   <%= ui_avatar(speaker, size: :sm) %>
</div>

About the picture profile we tried that in the past with Marco. We found out that GitHub has rate limits for those images. So if you scroll down a bit very quickly you end up with only read PP. We now fallback to initials so it is not as bad as it was before with broken images.

I had an initial PR to serve our own PP images to avoid this limit https://github.com/rubyevents/rubyevents/pull/881. This is something that I would like to rework in the future with some kind of active storage.

adrienpoly avatar Oct 11 '25 09:10 adrienpoly

@adrienpoly Changes implemented, pagination works now with searches and without. One minor issue: When searching through the omnibar the URL is updated - searches on the speakers search don't do that, and that can be confusing.

I don't know what the best solution would be, and I think it's a minor issue, hence I didn't touch it. The solution would be to do some history updates via Stimulus I guess... feels weird to do that on auto-submit though. What do you think?

hschne avatar Oct 23 '25 19:10 hschne