Skip to content

Full UUID search#14

Open
peterjwest wants to merge 14 commits into
nolenroyalty:mainfrom
peterjwest:feature/full-search
Open

Full UUID search#14
peterjwest wants to merge 14 commits into
nolenroyalty:mainfrom
peterjwest:feature/full-search

Conversation

@peterjwest
Copy link
Copy Markdown

@peterjwest peterjwest commented Jan 5, 2025

This PR adds fully working search, as discussed here: #12

Huge thanks to @wangqr, this would not have been possible without them.

Replaces the Feistal cipher with a random invertible matrix transformation, which does unfortunately mean the UUID order would have to change to accommodate this feature.

The only major problem with this currently is that I use @csquare/random-bytes-seed which is designed to be used server side, requiring a bunch of polyfills and bloating the build size. I'm going to look for an alternative, but I figured I'd show the feature for now.

I've replaced this with random-bytes-seed which does still require Buffer as a polyfill, but is much smaller.

I've also updated the site to allow search to wrap correctly when there are results on the last page. I added a slight highlight to the current search item to make this clearer. I upgraded the scroll logic to only scroll when the search result is out of view (like a browser does), and fixed searching of favourites.

I also noticed the scroll handle didn't resize for the favourites and fixed that.

Have not added tests, but happy to!

@peterjwest peterjwest force-pushed the feature/full-search branch 4 times, most recently from b7c70a1 to d447f03 Compare January 6, 2025 16:27
@peterjwest peterjwest force-pushed the feature/full-search branch 2 times, most recently from f69ba4c to d2238ec Compare January 6, 2025 17:07
@peterjwest peterjwest force-pushed the feature/full-search branch from d2238ec to 6b96eaa Compare January 6, 2025 17:14
Also more natural dragging behaviour
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant