Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request Description
This PR addresses the URL search type.
This one's a strange beast because, while the others like Posts and Comments, denote the type of object to search, URL denotes a field to search. And in fact, by looking at the Lemmy server code, you can see that it only ever returns Post results.
https://github.com/LemmyNet/lemmy/blob/cb01427dcff14b3d88e30220695fc97978786a9a/crates/apub/src/api/search.rs#L183-L184
Therefore, I attempted to implement this as a smart toggle.
Hopefully this makes sense and is a reasonable implementation of this feature in our UI.
Issue Being Fixed
Issue Number: #273
Screenshots / Recordings
search-by-url.mp4
Checklist
semanticLabel
s where applicable for accessibility?