wevisdemo / parliament-watch

Citizens are watching 👀
https://parliamentwatch.wevis.info
Other
61 stars 33 forks source link

#34 navigationbar search function #39

Closed napatswift closed 1 year ago

napatswift commented 1 year ago

This pull request for adding search function.

napatswift commented 1 year ago

I have updated the search part. Here's the result kub.

Screenshot 2566-10-24 at 20 47 36 Screenshot 2566-10-24 at 20 49 07
napatswift commented 1 year ago

To improve search functionality, I also implemented word tokenization using (Intl.Segmenter). But it isn't available in Firefox (see browser_compatibility), for this case it will fall back to use string splitter.

The function: https://github.com/wevisdemo/parliament-watch/blob/fc9bf1218da7350d0da7c239fc4f92b872b84242/src/libs/search.ts#L9-L26

Th1nkK1D commented 1 year ago

LGTM! Thank you for a huge contribution. We'll contact you at the end of this month for the stickers.