Skip to content

Conversation

@NivinCNC
Copy link
Contributor

@NivinCNC NivinCNC commented Dec 3, 2025

Implemented search suggestions using Google's autocomplete API. Added SearchSuggestionAdapter, SearchSuggestionApi, and related UI components to display and interact with suggestions in both mobile and TV search fragments. Suggestions are fetched with debounce and can be selected to search or fill the search box.

Implemented search suggestions using Google's autocomplete API. Added SearchSuggestionAdapter, SearchSuggestionApi, and related UI components to display and interact with suggestions in both mobile and TV search fragments. Suggestions are fetched with debounce and can be selected to search or fill the search box.
Changed root layout from LinearLayout to FrameLayout in both search and search_tv fragments. Moved search suggestions RecyclerView to overlay above content for better UI layering and increased elevation for improved visibility.
Copy link
Collaborator

@fire-light42 fire-light42 left a comment

Choose a reason for hiding this comment

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

Very cool pull request!

I only have minor code and UI+UX considerations.

Introduces a new setting to enable or disable search suggestions while typing. Updates UI logic to respect this setting, improves suggestion parsing, and adjusts search suggestion recycler margin for better layout.
@NivinCNC
Copy link
Contributor Author

NivinCNC commented Dec 4, 2025

Resolved.

@NivinCNC NivinCNC requested a review from fire-light42 December 4, 2025 12:04
Updated the text size of search suggestions from 16sp to 18sp for improved readability in the UI.
Copy link
Collaborator

@fire-light42 fire-light42 left a comment

Choose a reason for hiding this comment

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

This is virtually unusable on TV due to the focus loss. I am unsure if we only want the focus loss on phone layout or if we disable this feature on TV.

Introduces a clear suggestions button to the search suggestions overlay, visible on TV layouts. Refactors the suggestions overlay into a FrameLayout to support the button, updates focus handling for TV, and adds a new string resource for the button label.
@NivinCNC
Copy link
Contributor Author

NivinCNC commented Dec 5, 2025

This is virtually unusable on TV due to the focus loss. I am unsure if we only want the focus loss on phone layout or if we disable this feature on TV.

Removed focus loss for tv layout, alternatively added a clear suggestion button for tv layout to hide the suggestions and even enter or ok button also hides the suggestions in all layouts

@NivinCNC NivinCNC requested a review from fire-light42 December 5, 2025 10:59
@NivinCNC
Copy link
Contributor Author

NivinCNC commented Dec 5, 2025

Removed focus loss for tv layout, alternatively added a clear suggestion button for tv layout to hide the suggestions and even enter or ok button also hides the suggestions in all layouts

same done for emulator layout

@NivinCNC NivinCNC closed this Dec 5, 2025
@NivinCNC NivinCNC reopened this Dec 5, 2025
@NivinCNC
Copy link
Contributor Author

NivinCNC commented Dec 9, 2025

This is virtually unusable on TV due to the focus loss. I am unsure if we only want the focus loss on phone layout or if we disable this feature on TV.

Kindly recheck with the updated layout

Copy link
Collaborator

@fire-light42 fire-light42 left a comment

Choose a reason for hiding this comment

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

Good changes! I have some additional comments on TV layout specifically.

Moved 'clear history' and 'clear suggestions' buttons into adapter footers for TV and emulator layouts, removing them from the main fragment layouts. Updated SearchHistoryAdaptor and SearchSuggestionAdapter to support footers, and adjusted SearchFragment logic to handle new clear actions. This improves modularity and focus handling, especially for non-phone devices.
Copy link
Collaborator

@fire-light42 fire-light42 left a comment

Choose a reason for hiding this comment

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

Good changes, I just have a comment about the removal of the search button on phone. Is that a copy paste error? Because I see no clear reason why we should remove it from phone.

Changed SearchHistoryAdaptor and SearchSuggestionAdapter to always display the footer regardless of layout, instead of only on TV or EMULATOR. Updated footer visibility logic to use isGone when the list is empty and ensured footers rebind on list changes to update their state.
Added import for androidx.core.view.isGone in both SearchHistoryAdaptor and SearchSuggestionAdapter. This prepares the adapters to use the isGone extension for view visibility handling.
Copy link
Collaborator

@fire-light42 fire-light42 left a comment

Choose a reason for hiding this comment

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

Everything looks good 🔥 , will merge after testing if no problem is found.

@rockhero1234
Copy link
Contributor

rockhero1234 commented Dec 13, 2025

@NivinCNC I think we should not use clear history btn as footer in search history, it will be kill the purpose as you need to scroll through the complete history to the end to clean history.
I noticed one more thing the search history shows end of list , it is intended to show the latest search history

Ensures the search history recycler view scrolls to the top when new items are added, so the newest entries are always visible first.
@NivinCNC
Copy link
Contributor Author

NivinCNC commented Dec 13, 2025

@NivinCNC I think we should not use clear history btn as footer in search history, it will be kill the purpose as you need to scroll through the complete history to the end to clean history. I noticed one more thing the search history shows end of list , it is intended to show the latest search history

Fixed "search history shows end of list , it is intended to show the latest search history". But need to know whether i have to revert clear history btn logic to the older one that has the fixed button at the bottom or is there any workaround to firelights suggection?

This has clear focus issues. It is a lot better it make the SearchSuggestionAdapter have a footer view instead. See onBindFooter and onCreateFooter.

I know that you copied search_clear_call_history and that should also be updated for the same issue.

@rockhero1234
Copy link
Contributor

rockhero1234 commented Dec 13, 2025

I think he asked to have footer on suggestion area because of focus issue on tv. You can revert clear history as was before

@fire-light42
Copy link
Collaborator

fire-light42 commented Dec 13, 2025

I think he asked to have footer on suggestion area because of focus issue on tv. You can revert clear history as was before

No, clear history should be like this on TV as it also has some focus issues. However on Phone it does not matter exactly where it is placed. Nevertheless, you have a great point, and it might be better for the UX to place it in a static location (on phone only). The main problem I wanted @NivinCNC solve was that of inaccessible/finicky navigation on TV.

@recloudstream recloudstream deleted a comment from SidharthRanga Dec 14, 2025
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.

3 participants