Skip to content

SearchFragment: show service name in search hint#12258

Merged
Stypox merged 3 commits intoTeamNewPipe:devfrom
Profpatsch:show-service-name-in-search
Jul 16, 2025
Merged

SearchFragment: show service name in search hint#12258
Stypox merged 3 commits intoTeamNewPipe:devfrom
Profpatsch:show-service-name-in-search

Conversation

@Profpatsch
Copy link
Contributor

@Profpatsch Profpatsch commented May 7, 2025

What is it?

  • Bugfix (user facing)
  • Feature (user facing)
  • Codebase improvement (dev facing)
  • Meta improvement to the project (dev facing)

Description of the changes in your PR

The only hint (haha) which service one is searching in is currently the color of the background. This is super confusing, yesterday a friend tried to search for a video on youtube and the app was set to Bandcamp, and they were super confused why nothing turned up.

So let’s put the name of the service in the hint!

The updateService() thing is a little confused, but I didn’t want to refactor to improve the logic. It’s not doing anything computationally intensive anyway.

For PeerTube, the sidebar calls it FramaTube but the service name is PeerTube, I’m not sure why that is the case. Looks like the string depends on the name of the instance? Hm, can be improved later I think.

Before/After Screenshots/Screen Record

after:

newpipe_search_service_name.mp4

APK testing

The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR. You can find more info and a video demonstration on this wiki page.

Due diligence

The only hint (haha) which service one is searching in is currently
the color of the background. This is super confusing, yesterday a
friend tried to search for a video on youtube and the app was set to
Bandcamp, and they were super confused why nothing turned up.

So let’s put the name of the service in the hint!

The `updateService()` thing is a little confused, but I didn’t want
to refactor to improve the logic. It’s not doing anything
computationally intensive anyway.

For PeerTube, the sidebar calls it FramaTube but the service name is
PeerTube, I’m not sure why that is the case. Looks like the string
depends on the name of the instance? Hm, can be improved later I
think.
@github-actions github-actions bot added the size/small PRs with less than 50 changed lines label May 7, 2025
@Profpatsch Profpatsch requested a review from Copilot May 7, 2025 08:19

This comment was marked as off-topic.

@AudricV AudricV added feature request Issue is related to a feature in the app GUI Issue is related to the graphical user interface multiservice Issues related to multiple services search Anything related to the search function labels May 7, 2025
@ShareASmile ShareASmile added the waiting for author If the author doesn't respond, the issue will be auto-closed. Otherwise the label will be removed. label Jun 1, 2025
Copy link
Member

@Stypox Stypox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Feel free to merge after @snaik20 approves :-)

Copy link
Contributor Author

@Profpatsch Profpatsch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Not happy with this, the original idea was that the service gets displayed, but now this does not show the service anymore when there’s a filter

@Profpatsch
Copy link
Contributor Author

Not even talking about the fact that there’s no distinction between youtube music playlists and youtube playlists for example.

@github-actions github-actions bot removed the waiting for author If the author doesn't respond, the issue will be auto-closed. Otherwise the label will be removed. label Jun 5, 2025
This is still not perfect, but it will show the selected search filter
in addition to the service name, like: “Search YouTube (Playlists)”.

It will not distinguish between a YouTube Music and Youtube filter, so
it will display the same thing. Could be improved, but then the text
gets too long! :(
@Profpatsch
Copy link
Contributor Author

Okay, now it’s better:
image

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 5, 2025

@ShareASmile ShareASmile added the ready for review Most of the work is done, PR is now ready for a review label Jun 18, 2025
Copy link
Contributor

@HatakeKakashri HatakeKakashri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 🎉 🚢

service.getServiceInfo().getName()));
} else {
searchEditText.setHint(getString(R.string.search_with_service_name, item.getTitle()));
if (service != null) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this assumes the service is nonnull, because if it is null it won't show anything... But anyway, it doesn't make sense for the service to be null sooo...

@Stypox Stypox merged commit 4e94b26 into TeamNewPipe:dev Jul 16, 2025
7 checks passed
@ShareASmile ShareASmile removed the ready for review Most of the work is done, PR is now ready for a review label Jul 16, 2025
@Stypox Stypox mentioned this pull request Jul 17, 2025
11 tasks
whistlingwoods pushed a commit to whistlingwoods/FoxPipe that referenced this pull request Sep 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature request Issue is related to a feature in the app GUI Issue is related to the graphical user interface multiservice Issues related to multiple services search Anything related to the search function size/small PRs with less than 50 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants