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

Modify to change the display message based on whether the search text is empty or not #843

Merged

Conversation

nishimy432
Copy link
Contributor

Issue

Overview (Required)

  • Added a message to the strings file to be displayed when there are no results and no search input.
  • Modified to change the display message based on whether the search text is empty or not.

Links

Screenshot (Optional if screenshot test is present or unrelated to UI)

Before After

When there is input

@github-actions github-actions bot temporarily deployed to deploygate-distribution August 28, 2024 05:00 Inactive
@takahirom
Copy link
Member

takahirom commented Aug 28, 2024

Sorry, I should have shared this earlier. 🙇
When we open this screen, we shouldn't show the image or display the message Nothing matched....
When searching and the text is changed to blank, it should display this screen.
So, I think we need a flag for this.

@nishimy432
Copy link
Contributor Author

nishimy432 commented Aug 30, 2024

@takahirom
Thank you for confirming!
In the current implementation, when you search and change the text to a blank, the image and message are not displayed.
The condition for displaying the image or message is only when the filter is not empty and the filtered sessions are empty.

filters.isNotEmpty() && filteredSessions.isEmpty() -> {
SearchScreenUiState.Empty(

Are you referring to a different case?

input_and_filter_and_empty_and_batsu.mp4

@takahirom
Copy link
Member

takahirom commented Aug 30, 2024

Thank you for providing the video. In the video, I would like to have a UFO image and text appear at the 8-second and 20-second points. I would also like to display a UFO image when the text is empty after searchs.

@nishimy432
Copy link
Contributor Author

I see. So, are the conditions for displaying the image and message as follows?

  • When a search word is entered and the search results are empty
  • When the search word is empty and filters are set
  • When a search has been performed once and the search word is cleared

Conversely, the image and message are not displayed under the following condition:

  • When the search screen is opened for the first time

@takahirom
Copy link
Member

Your understanding seems correct. I have checked with the designer regarding when this specification came from them.

@nishimy432
Copy link
Contributor Author

nishimy432 commented Sep 2, 2024

Thank you very much!
Sorry, but could I confirm one more thing?
As shown in the video, if the search results become empty after removing the value from the category, should an image and message be displayed?

input_category_and_empty.mp4

@takahirom
Copy link
Member

I don't think it is a major use case. I think you can decide based on which implementation is easier.

@nishimy432
Copy link
Contributor Author

OK, then I will not handle searches with only categories.
The final behavior is as shown in the following video.

finaly_input_and_empty.mp4

Copy link

github-actions bot commented Sep 2, 2024

Detekt check failed. Please run ./gradlew detekt --auto-correct to fix the issues.

@github-actions github-actions bot temporarily deployed to deploygate-distribution September 2, 2024 11:05 Inactive
@@ -50,6 +50,7 @@ fun searchScreenPresenter(
val sessions by rememberUpdatedState(sessionsRepository.timetable())

var searchWord by rememberRetained { mutableStateOf("") }
var hasSearched by rememberRetained { mutableStateOf(false) }
Copy link
Member

Choose a reason for hiding this comment

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

👍

Copy link
Member

@takahirom takahirom left a comment

Choose a reason for hiding this comment

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

Looks great! Thank you for collaborating with us.

@takahirom takahirom merged commit 4eeb9c3 into DroidKaigi:main Sep 2, 2024
7 checks passed
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.

In SearchScreen, design is added for there were no search results using filters with no input values
2 participants