Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve search bar design on add podcast screen #7249

Merged
merged 2 commits into from
Jul 1, 2024

Conversation

flofriday
Copy link
Contributor

@flofriday flofriday commented Jun 14, 2024

Description

The search bar now looks more up to date with modern android styles. I tried to get it as close to the official documentation for Search as possible.

Eventually, we could update the MDC library to 1.8 and use the SearchBar component from there but, it is not quite easy and in two separate attempts I never got all aspects of the search to work.

For now I think this is a visual improvement.

Screenshot (left: before, right: this PR):
image

Checklist

The search bar now looks more up to date with modern android styles.
@flofriday flofriday changed the title Improve search bar design on add podcast screen WIP: Improve search bar design on add podcast screen Jun 15, 2024
@flofriday
Copy link
Contributor Author

I further tested the PR and figured out that the colors didn't work on dark theme which send me down into a rabbit whole about how we manage colors and I discovered that the colorPrimaryContainer was wrongly set to accent color when it should be more a muted background color only with a tint from the accent.

So I also changed how we set that color and now it works on all themes and even on the oldes Android versions we support (Android 5).

Screenshot (this PR dark and light theme):
telegram-cloud-photo-size-4-6012845504939016801-y

@flofriday flofriday changed the title WIP: Improve search bar design on add podcast screen Improve search bar design on add podcast screen Jun 15, 2024
@ByteHamster
Copy link
Member

Before this change, scrolling looked a bit better, I think. Now the covers disappear behind an invisible white line (see screenshot)

Screenshot_20240623-204735_AntennaPod

@flofriday
Copy link
Contributor Author

True that was from an experiment I did.
However, I don't think the old one looks great either.
Would it look better if the searchbar scrolled with the content?

@keunes
Copy link
Member

keunes commented Jun 25, 2024

To be honest I think the white line is cleaner than directly the search bar. If we want, we could add a shadow if & when scrolling.

@flofriday flofriday force-pushed the material-search-bar branch 2 times, most recently from b071d97 to 6ba94f3 Compare June 25, 2024 14:47
@flofriday
Copy link
Contributor Author

Ok I think I might have found the solution, by making the searchbar part of the appbar and tinting it once scrolled down:

Screencast of the animation:

Screen.Recording.2024-06-25.at.16.41.28.mov

@flofriday flofriday changed the title Improve search bar design on add podcast screen WIP: Improve search bar design on add podcast screen Jun 25, 2024
@flofriday flofriday changed the title WIP: Improve search bar design on add podcast screen Improve search bar design on add podcast screen Jun 25, 2024
@keunes
Copy link
Member

keunes commented Jun 25, 2024

Hmm. It is in line with the material design guidelines but it feels a bit odd to invert the colours. It somehow gives extra prominence to the search bar.

Maybe we should just scroll it away together with the rest of the content. If a user is not searching by the time they scroll, they're probably more interested in the other options (discover, add RSS url) anyway.

@flofriday
Copy link
Contributor Author

flofriday commented Jun 25, 2024

Yeah, I see your point, but I tried that earlier and it looked odd, but I will try to get a video for you tomorrow

The color should be usable as the background for containers with a tint
of the accent color, but it was set to the full accent color.
Now it is much more in line with how it should work.
@flofriday
Copy link
Contributor Author

Actually, this doesn't look as bad as I thought (though tinting the top bar really helps here which I didn't do the last time I tried it). I might actually prefer this solution (it is also a lot simpler code-wise) than the last one, though I am interested in what you think.

Screencast:

Screen.Recording.2024-06-26.at.10.24.50.mov

@keunes
Copy link
Member

keunes commented Jun 26, 2024

Thanks! That looks better, yes :-)

@ByteHamster ByteHamster merged commit 2b7ed40 into AntennaPod:develop Jul 1, 2024
6 checks passed
@ByteHamster
Copy link
Member

Thanks!

@flofriday flofriday deleted the material-search-bar branch July 3, 2024 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants