-
-
Notifications
You must be signed in to change notification settings - Fork 527
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
fix(Android): Change elements visibility on search bar open #1903
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a possibility that this won't be fired, for example is we navigated when the search bar was open?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@WoLewicki I thought about that already and I'm unable to reproduce the scenario where the user comes back from the search bar and in the same action comes to the previous screen. Is it even possible? 🤔
Screen.Recording.2023-09-29.at.13.21.50.mov
To test this I've changed the logic of
handleClose
to change the visibility of elements toINVISIBLE
- that's why the element on the current screen hides.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, I figured out how to do that (I'm calling
navigation.navigate('Main')
ononClose
) and it's doing fine!Screen.Recording.2023-09-29.at.13.53.02.mov
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a better example would be to navigate forward and see what happens when you go back.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean navigation forward without opening the search bar? If so, then nothing would happen - state of the header subviews is only being changed on
open
andclose
searchBar events. If you mean that I should navigate forward, open the search bar and try to close it with trying to go back with back button, then (as seen above):So it shouldn't hide, as it's not possible to return to the previous screen without closing the search bar, I guess.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@WoLewicki So I've checked the scenario that you've suggested and looks like everything still works - I can't manage to have search bar closed when I'm going to the next screen and coming to the previous one.
8mb.video-bqT-PgqBQjkb.mp4
I'm still thinking if changing the visibility of the element could still break at some point. Do you think we should correct the change just to make sure that we will avoid side-effects?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be some weird edge case and we can leave it as it is for now, and if the issues arise in the future, we will fix it then.