• chickentendrils [any, comrade/them]
      ·
      edit-2
      2 years ago

      As far as can tell he wants the most sophisticated "simple" search bar. I've used a few tools that support the kind of search he's looking for... These examples are from an eDiscovery tool I used years ago in an infosec role, mostly handling emails but also any type of searchable file/document.

      • from: or to: and then it'll transform that text into a box or bubble in the search bar and suggest a list of people, ordered by whatever (most recent previous from: or to: queries and then maybe alphabetical or related to those most recent queries as determined by some graph logic - in Twitters case it would probably be ordered similarly to how it would decide which users' posts to show when browsing I guess)
      • received: which would turn into a bubble and spawn a tooltip with a calendar range input (similar date fields were before:, after: for files/emails with checkboxes for "last modified" and "created" timestamps)
      • tag: if someone else in the org had tagged the item, would only show tags that were relevant

      From what I know about Twitter it should be possible to filter based on comment ratios or number of likes using <>= notation.

      Some of the stuff was really heavily feedback-driven, like the received: calendar only letting you pick specific dates where the other inputs in the query actually had records.

      That kind of stuff, I think, very fancy. Usually driven by ElasticSearch and similar backends.

        • mittens [he/him]
          ·
          edit-2
          2 years ago

          I mean I can at least clear up two things regarding his request:

          you can put your javascript code in a minifier to get a one-line implementation. websites that are very concerned with performance often serve the entirety of the client side stuff in a single line.

          and also he's just asking this behavior for the "from" keyword, so the task should be just making the simple search bar detect you typed "from", indicate this by highlighting it or something and removing result previews that match the query "from", which probably maybe isn't super hard stuff to do (i'm not a js dev lol).

          the baffling portion is that there should be plenty of examples that do this thing exactly, third party libraries that do it for you, and also it's shitty UX, most users DON'T wanna use keywords in their search queries.