AprilSylph / XKit-Rewritten

🧰 The enhancement suite for Tumblr's new web interface
GNU General Public License v3.0
274 stars 45 forks source link

Feature: Search Timelines #1236

Open AprilSylph opened 10 months ago

AprilSylph commented 10 months ago

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:

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.

marcustyphoon commented 10 months ago

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

Sorry, could you clarify this one?

AprilSylph commented 10 months ago

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.

marcustyphoon commented 10 months ago

Ah, gotcha! 👍

enchanted-sword commented 7 months ago

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