do-me / SemanticFinder

SemanticFinder - frontend-only live semantic search with transformers.js
https://do-me.github.io/SemanticFinder/
MIT License
210 stars 14 forks source link

Advanced Settings Dropdown & FOUC (flash of unstyled content) corrections #19

Closed varunneal closed 1 year ago

varunneal commented 1 year ago

I added an advanced settings dropdown and moved the submit button up as mentioned in previous issues. While I retained @lizozom's type-checking and jsdoc changes, my added code does not yet have types.

I implemented some minor changes to correct the pesky FOUC we have been getting, including using MiniCssExtractPlugin to extract the CSS into separate files.

As always, PR live at the site: https://varunnsrivastava.github.io/SemanticFinder/

I'm finding my current implementation of the advanced settings dropdown to be a bit ugly. Any one should feel free to correct it using CSS/bootstrap magic.

do-me commented 1 year ago

This is awesome, great work for adding the different splitting variants and even allowing for regex!

Structure-wise, it's perfect that laypeople can just hit "Submit" (by the way, I was thinking about changing "Submit" to "Find" to stick to the aim of the project "SemanticFinder") and others can play around with the different settings.

There are only two things that I'd change style-wise:

  1. The double arrow seems a little exotic so to say :D I'd just go with a normal one or even better, the material one: image

  2. The "Settings" word is floating around in the middle of nowhere, I guess it should find a more "stable" place, either with some button outline or it might be integrated next to the Submit-Button or even a split-button would be an option. Anyway, I'm lacking the UI phantasy too, so if someone has some good proposals they'd be more than welcome! image

do-me commented 1 year ago

Logic-wise, I might have some proposals for improvement:

  1. (red) Empty spaces should probably be just left out or can you imagine any use case for keeping them?
  2. (violet) If there are plenty of entries for the same word/phrase, it might be nice to have the entry in the overview only once. On tile click, we could kind of expand all sub-tiles in the list so all entries become accessible/clickable. So the mother-tile becomes a collapsible as well, just like the "Settings".

Not pushing for those changes though, just some ideas to discuss.

image

varunneal commented 1 year ago

Empty strings should definitely be removed! What settings are you using to get those results? These problems may be exacerbated by Window's carriage return \r\n.

do-me commented 1 year ago

Sorry for the screenshot above, it's misleading as the settings were these: 
 

I can reproduce the behavior on Windows Chrome and on mobile FF too. Didn't test Linux yet.