Add search by instance domain to community search
Requirements
- [x] Is this a feature request? For questions or discussions use https://lemmy.ml/c/lemmy_support or the matrix chat.
- [x] Did you check to see if this issue already exists?
- [x] Is this only a feature request? Do not put multiple feature requests in one issue.
- [x] Is this a backend issue? Use the lemmy-ui repo for UI / frontend issues.
- [x] Do you agree to follow the rules in our Code of Conduct?
Is your proposal related to a problem?
Community search is only search by name. Expanding that to also search by instance domain would make the app much more usable.
Currently lemmy demands from us remembering communities names, which is pretty much impossible given the amount of them. If we don't remember community name, which happens a lot of time, we have to go to that instance original website to recall it which is time consuming, we should be able to quickly get that info from our instance
Describe the solution you'd like.
Typing part of instance domain should be enough, so for example typing "world" should show all communities that have world in name, but also all lemmy.world communities in same list later.
There could be checkboxes in settings above to check if we want to include search by insance name and/or search by community name, and default check could be set in our instance admin settings
Describe alternatives you've considered.
Additional context
No response
The search api takes a parameter community_id (not a plain name string). So this could be implemented by adding a parameter instance_id, with search by domain implemented in the frontend (similar to the selection for instance block).
Very similar to https://github.com/LemmyNet/lemmy/issues/5947
I guess we need to start adding instance_id filters to some endpoints, like post/list, and search.
But I have a few other question:
- Should we make
Instancesa searchable type, so that dropdown selects can search for them, and then the APIs could just take in aninstance_idinstead ofinstance_domain? - An
instance_idfilter would conflict withListingType, which hasAll,Local,Subscribed,ModeratorViewandSuggested. With an instance filter, not all of those would be exclusive, for exampleSubscribedcould be used with an instance_id filter, to show only posts from subscribed communities and that instance.- So we'd probably need to rethink
ListingType... Probably just makingsubscribed,moderator_view, andsuggestedbooleans, and then changingListingTypetoenum InstanceType { All, Local, InstanceId(instance_id) }
- So we'd probably need to rethink