XKit-Rewritten icon indicating copy to clipboard operation
XKit-Rewritten copied to clipboard

Feature: Search Timelines

Open AprilSylph opened this issue 1 year ago • 4 comments

Search Timelines Find posts by text match

I am envisioning a feature that adds a search bar to the top of all known timelines. When this search bar is typed into, each post is checked for a match for the input. If it passes the check (has a match), the post stays visible. If it fails the check (doesn't have a match), the post is hidden.

The search bar should debounce input/change events to avoid re-checking posts more often than needed.

Emptying the search bar should make the feature perform cleanup on the current timeline.

What to check for text matches:

  • Every block in the content array
  • Every block in the trail
  • Every blogname in the trail
  • The post author
  • The reblog parent
  • Tags

What to check within blocks: anything that is, or can become, visible to the user. Text within text blocks is obvious, but also things like inline link URLs, image alt text, link block titles, audio block track/album/artist names, etc.

Matching method: substring. To copy Tumblr's example, a search for "horse" should match a post containing the word "abhorsement".

The following nice-to-haves should not be included in the feature's base implementation, for the sake of reviewer sanity. They may be considered as followup enhancements to the base feature, to be considered and reviewed separately.

  • Match highlighting
  • Preferences for which timelines to activate on

AprilSylph avatar Aug 23 '23 09:08 AprilSylph

the feature should not attempt to hook each timeline up to toggle preferences initially.

Sorry, could you clarify this one?

marcustyphoon avatar Aug 23 '23 09:08 marcustyphoon

It shouldn't have preferences like Collapsed Queue has for controlling which timelines the feature activates on, in the first iteration of the feature.

Just deciding how we would want to split those preferences (i.e. whether we allow enabling it on Drafts but not Posts, or to include every /blog/:blogName/* timeline under the same toggle) is its own cognitive task, and should not be included in the feature's base implementation, but should be considered as an enhancement to the feature afterwards.

AprilSylph avatar Aug 23 '23 09:08 AprilSylph

Ah, gotcha! 👍

marcustyphoon avatar Aug 23 '23 09:08 marcustyphoon

I'm interested in working on this feature, if nobody has started yet.

enchanted-sword avatar Nov 12 '23 15:11 enchanted-sword

@AprilSylph Is this still intended to be active, or should it be closed due to Tumblr's virtual scroller changes that—sort of—enable control-F?

marcustyphoon avatar Jul 16 '24 01:07 marcustyphoon

I think CTRL+F works well enough that this can be closed, yeah.

AprilSylph avatar Jul 16 '24 08:07 AprilSylph