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

Upgrade ConnectHelpAlertFragment to Jetpack Compose #3596

Merged
merged 11 commits into from
Sep 10, 2024

Conversation

pascalwei
Copy link
Contributor

Change the XML implementation of ConnectHelpAlertFragment to Jetpack Compose and integrate Material TV as a basis for better theming options in the future.

This is just a trial balloon activity to see if a switch to the new Material design is welcomed or not.

Before:

before

After:

after

@pascalwei pascalwei requested a review from nielsvanvelzen as a code owner May 20, 2024 22:42
@nielsvanvelzen
Copy link
Member

This looks really good (better then my 1-1 rewrite in master...nielsvanvelzen:jellyfin-androidtv:compose-connect-help-alert). Unfortunately there's one major problem, we can't use compose yet for anything interactive as there are still focus issues. Additionally I'm not sure if I want to use tv-material or create our own theme. We've had extremely bad experience with using the androidx.leanback libraries.

From my regular testing the focus issues are solved in the current beta for compose-ui. We don't use alpha/beta releases of the androidx libraries in our app though (except for tvprovider as google stopped updating that library). I'm expecting the new compose-ui version to release as stable in the coming months, we can probably merge this at that point in time.

@nielsvanvelzen nielsvanvelzen added enhancement New feature or request blocked Needs another PR first labels May 21, 2024
<path
android:fillColor="?attr/qrForeground"
android:pathData="m200.177,200.177h8v8h-8zM200.177,192.177h8v8h-8zM200.177,184.177h8v8h-8zM200.177,176.177h8v8h-8zM200.177,152.177h8v8h-8zM200.177,128.177h8v8h-8zM200.177,120.177h8v8h-8zM200.177,104.177h8v8h-8zM200.177,96.177h8v8h-8zM200.177,88.177h8v8h-8zM200.177,72.177h8v8h-8zM200.177,56.177h8v8h-8zM200.177,48.177h8v8h-8zM200.177,40.177h8v8h-8zM200.177,32.177h8v8h-8zM200.177,24.177h8v8h-8zM200.177,16.177h8v8h-8zM200.177,8.177h8v8h-8zM192.177,192.177h8v8h-8zM192.177,184.177h8v8h-8zM192.177,176.177h8v8h-8zM192.177,144.177h8v8h-8zM192.177,136.177h8v8h-8zM192.177,120.177h8v8h-8zM192.177,112.177h8v8h-8zM192.177,96.177h8v8h-8zM192.177,80.177h8v8h-8zM192.177,56.177h8v8h-8zM192.177,8.177h8v8h-8zM184.177,192.177h8v8h-8zM184.177,184.177h8v8h-8zM184.177,144.177h8v8h-8zM184.177,136.177h8v8h-8zM184.177,128.177h8v8h-8zM184.177,120.177h8v8h-8zM184.177,96.177h8v8h-8zM184.177,80.177h8v8h-8zM184.177,56.177h8v8h-8zM184.177,40.177h8v8h-8zM184.177,32.177h8v8h-8zM184.177,24.177h8v8h-8zM184.177,8.177h8v8h-8zM176.177,200.177h8v8h-8zM176.177,184.177h8v8h-8zM176.177,128.177h8v8h-8zM176.177,120.177h8v8h-8zM176.177,96.177h8v8h-8zM176.177,88.177h8v8h-8zM176.177,80.177h8v8h-8zM176.177,56.177h8v8h-8zM176.177,40.177h8v8h-8zM176.177,32.177h8v8h-8zM176.177,24.177h8v8h-8zM176.177,8.177h8v8h-8zM168.177,192.177h8v8h-8zM168.177,184.177h8v8h-8zM168.177,168.177h8v8h-8zM168.177,160.177h8v8h-8zM168.177,152.177h8v8h-8zM168.177,144.177h8v8h-8zM168.177,136.177h8v8h-8zM168.177,120.177h8v8h-8zM168.177,112.177h8v8h-8zM168.177,96.177h8v8h-8zM168.177,80.177h8v8h-8zM168.177,56.177h8v8h-8zM168.177,40.177h8v8h-8zM168.177,32.177h8v8h-8zM168.177,24.177h8v8h-8zM168.177,8.177h8v8h-8zM160.177,192.177h8v8h-8zM160.177,168.177h8v8h-8zM160.177,136.177h8v8h-8zM160.177,128.177h8v8h-8zM160.177,104.177h8v8h-8zM160.177,80.177h8v8h-8zM160.177,56.177h8v8h-8zM160.177,8.177h8v8h-8zM152.177,200.177h8v8h-8zM152.177,176.177h8v8h-8zM152.177,168.177h8v8h-8zM152.177,152.177h8v8h-8zM152.177,136.177h8v8h-8zM152.177,128.177h8v8h-8zM152.177,104.177h8v8h-8zM152.177,96.177h8v8h-8zM152.177,88.177h8v8h-8zM152.177,72.177h8v8h-8zM152.177,56.177h8v8h-8zM152.177,48.177h8v8h-8zM152.177,40.177h8v8h-8zM152.177,32.177h8v8h-8zM152.177,24.177h8v8h-8zM152.177,16.177h8v8h-8zM152.177,8.177h8v8h-8zM144.177,200.177h8v8h-8zM144.177,184.177h8v8h-8zM144.177,176.177h8v8h-8zM144.177,168.177h8v8h-8zM144.177,136.177h8v8h-8zM144.177,120.177h8v8h-8zM136.177,200.177h8v8h-8zM136.177,184.177h8v8h-8zM136.177,176.177h8v8h-8zM136.177,168.177h8v8h-8zM136.177,160.177h8v8h-8zM136.177,152.177h8v8h-8zM136.177,144.177h8v8h-8zM136.177,136.177h8v8h-8zM136.177,120.177h8v8h-8zM136.177,112.177h8v8h-8zM136.177,104.177h8v8h-8zM136.177,96.177h8v8h-8zM136.177,88.177h8v8h-8zM136.177,72.177h8v8h-8zM136.177,64.177h8v8h-8zM136.177,56.177h8v8h-8zM136.177,48.177h8v8h-8zM136.177,32.177h8v8h-8zM128.177,192.177h8v8h-8zM128.177,184.177h8v8h-8zM128.177,176.177h8v8h-8zM128.177,168.177h8v8h-8zM128.177,160.177h8v8h-8zM128.177,136.177h8v8h-8zM128.177,128.177h8v8h-8zM128.177,120.177h8v8h-8zM128.177,112.177h8v8h-8zM128.177,88.177h8v8h-8zM128.177,80.177h8v8h-8zM128.177,64.177h8v8h-8zM128.177,32.177h8v8h-8zM120.177,192.177h8v8h-8zM120.177,176.177h8v8h-8zM120.177,168.177h8v8h-8zM120.177,160.177h8v8h-8zM120.177,120.177h8v8h-8zM120.177,112.177h8v8h-8zM120.177,104.177h8v8h-8zM120.177,96.177h8v8h-8zM120.177,80.177h8v8h-8zM120.177,72.177h8v8h-8zM120.177,64.177h8v8h-8zM120.177,56.177h8v8h-8zM120.177,24.177h8v8h-8zM120.177,8.177h8v8h-8zM112.177,184.177h8v8h-8zM112.177,176.177h8v8h-8zM112.177,160.177h8v8h-8zM112.177,152.177h8v8h-8zM112.177,136.177h8v8h-8zM112.177,88.177h8v8h-8zM112.177,64.177h8v8h-8zM112.177,48.177h8v8h-8zM112.177,32.177h8v8h-8zM112.177,24.177h8v8h-8zM104.177,200.177h8v8h-8zM104.177,192.177h8v8h-8zM104.177,160.177h8v8h-8zM104.177,144.177h8v8h-8zM104.177,136.177h8v8h-8zM104.177,112.177h8v8h-8zM104.177,104.177h8v8h-8zM104.177,88.177h8v8h-8zM104.177,72.177h8v8h-8zM104.177,64.177h8v8h-8zM104.177,56.177h8v8h-8zM104.177,40.177h8v8h-8zM104.177,16.177h8v8h-8zM96.177,200.177h8v8h-8zM96.177,184.177h8v8h-8zM96.177,176.177h8v8h-8zM96.177,160.177h8v8h-8zM96.177,152.177h8v8h-8zM96.177,128.177h8v8h-8zM96.177,48.177h8v8h-8zM96.177,40.177h8v8h-8zM96.177,32.177h8v8h-8zM96.177,24.177h8v8h-8zM96.177,16.177h8v8h-8zM96.177,8.177h8v8h-8zM88.177,200.177h8v8h-8zM88.177,192.177h8v8h-8zM88.177,184.177h8v8h-8zM88.177,176.177h8v8h-8zM88.177,144.177h8v8h-8zM88.177,128.177h8v8h-8zM88.177,112.177h8v8h-8zM88.177,104.177h8v8h-8zM88.177,80.177h8v8h-8zM88.177,56.177h8v8h-8zM88.177,40.177h8v8h-8zM88.177,32.177h8v8h-8zM88.177,8.177h8v8h-8zM80.177,192.177h8v8h-8zM80.177,184.177h8v8h-8zM80.177,168.177h8v8h-8zM80.177,144.177h8v8h-8zM80.177,136.177h8v8h-8zM80.177,128.177h8v8h-8zM80.177,120.177h8v8h-8zM80.177,104.177h8v8h-8zM80.177,88.177h8v8h-8zM80.177,72.177h8v8h-8zM80.177,64.177h8v8h-8zM80.177,48.177h8v8h-8zM80.177,24.177h8v8h-8zM80.177,8.177h8v8h-8zM72.177,200.177h8v8h-8zM72.177,192.177h8v8h-8zM72.177,176.177h8v8h-8zM72.177,168.177h8v8h-8zM72.177,144.177h8v8h-8zM72.177,120.177h8v8h-8zM72.177,96.177h8v8h-8zM72.177,88.177h8v8h-8zM72.177,64.177h8v8h-8zM72.177,56.177h8v8h-8zM72.177,8.177h8v8h-8zM64.177,128.177h8v8h-8zM64.177,104.177h8v8h-8zM64.177,96.177h8v8h-8zM64.177,88.177h8v8h-8zM56.177,200.177h8v8h-8zM56.177,192.177h8v8h-8zM56.177,184.177h8v8h-8zM56.177,176.177h8v8h-8zM56.177,168.177h8v8h-8zM56.177,160.177h8v8h-8zM56.177,152.177h8v8h-8zM56.177,136.177h8v8h-8zM56.177,120.177h8v8h-8zM56.177,104.177h8v8h-8zM56.177,88.177h8v8h-8zM56.177,72.177h8v8h-8zM56.177,56.177h8v8h-8zM56.177,48.177h8v8h-8zM56.177,40.177h8v8h-8zM56.177,32.177h8v8h-8zM56.177,24.177h8v8h-8zM56.177,16.177h8v8h-8zM56.177,8.177h8v8h-8zM48.177,200.177h8v8h-8zM48.177,152.177h8v8h-8zM48.177,120.177h8v8h-8zM48.177,56.177h8v8h-8zM48.177,8.177h8v8h-8zM40.177,200.177h8v8h-8zM40.177,184.177h8v8h-8zM40.177,176.177h8v8h-8zM40.177,168.177h8v8h-8zM40.177,152.177h8v8h-8zM40.177,136.177h8v8h-8zM40.177,128.177h8v8h-8zM40.177,104.177h8v8h-8zM40.177,80.177h8v8h-8zM40.177,72.177h8v8h-8zM40.177,56.177h8v8h-8zM40.177,40.177h8v8h-8zM40.177,32.177h8v8h-8zM40.177,24.177h8v8h-8zM40.177,8.177h8v8h-8zM32.177,200.177h8v8h-8zM32.177,184.177h8v8h-8zM32.177,176.177h8v8h-8zM32.177,168.177h8v8h-8zM32.177,152.177h8v8h-8zM32.177,136.177h8v8h-8zM32.177,128.177h8v8h-8zM32.177,120.177h8v8h-8zM32.177,112.177h8v8h-8zM32.177,72.177h8v8h-8zM32.177,56.177h8v8h-8zM32.177,40.177h8v8h-8zM32.177,32.177h8v8h-8zM32.177,24.177h8v8h-8zM32.177,8.177h8v8h-8zM24.177,200.177h8v8h-8zM24.177,184.177h8v8h-8zM24.177,176.177h8v8h-8zM24.177,168.177h8v8h-8zM24.177,152.177h8v8h-8zM24.177,136.177h8v8h-8zM24.177,120.177h8v8h-8zM24.177,104.177h8v8h-8zM24.177,96.177h8v8h-8zM24.177,56.177h8v8h-8zM24.177,40.177h8v8h-8zM24.177,32.177h8v8h-8zM24.177,24.177h8v8h-8zM24.177,8.177h8v8h-8zM16.177,200.177h8v8h-8zM16.177,152.177h8v8h-8zM16.177,136.177h8v8h-8zM16.177,128.177h8v8h-8zM16.177,112.177h8v8h-8zM16.177,96.177h8v8h-8zM16.177,80.177h8v8h-8zM16.177,72.177h8v8h-8zM16.177,56.177h8v8h-8zM16.177,8.177h8v8h-8zM8.177,200.177h8v8h-8zM8.177,192.177h8v8h-8zM8.177,184.177h8v8h-8zM8.177,176.177h8v8h-8zM8.177,168.177h8v8h-8zM8.177,160.177h8v8h-8zM8.177,152.177h8v8h-8zM8.177,96.177h8v8h-8zM8.177,88.177h8v8h-8zM8.177,80.177h8v8h-8zM8.177,72.177h8v8h-8zM8.177,56.177h8v8h-8zM8.177,48.177h8v8h-8zM8.177,40.177h8v8h-8zM8.177,32.177h8v8h-8zM8.177,24.177h8v8h-8zM8.177,16.177h8v8h-8zM8.177,8.177h8v8h-8z" />
android:pathData="M195.4,195.4H203V203H195.4V195.4ZM195.4,187.8H203V195.4H195.4V187.8ZM195.4,180.2H203V187.8H195.4V180.2ZM195.4,172.6H203V180.2H195.4V172.6ZM195.4,149.8H203V157.4H195.4V149.8ZM195.4,127H203V134.6H195.4V127ZM195.4,119.4H203V127H195.4V119.4ZM195.4,104.2H203V111.8H195.4V104.2ZM195.4,96.6H203V104.2H195.4V96.6ZM195.4,89H203V96.6H195.4V89ZM195.4,73.8H203V81.4H195.4V73.8ZM195.4,58.6H203V66.2H195.4V58.6ZM195.4,51H203V58.6H195.4V51ZM195.4,43.4H203V51H195.4V43.4ZM195.4,35.8H203V43.4H195.4V35.8ZM195.4,28.2H203V35.8H195.4V28.2ZM195.4,20.6H203V28.2H195.4V20.6ZM195.4,13H203V20.6H195.4V13ZM187.8,187.8H195.4V195.4H187.8V187.8ZM187.8,180.2H195.4V187.8H187.8V180.2ZM187.8,172.6H195.4V180.2H187.8V172.6ZM187.8,142.2H195.4V149.8H187.8V142.2ZM187.8,134.6H195.4V142.2H187.8V134.6ZM187.8,119.4H195.4V127H187.8V119.4ZM187.8,111.8H195.4V119.4H187.8V111.8ZM187.8,96.6H195.4V104.2H187.8V96.6ZM187.8,81.4H195.4V89H187.8V81.4ZM187.8,58.6H195.4V66.2H187.8V58.6ZM187.8,13H195.4V20.6H187.8V13ZM180.2,187.8H187.8V195.4H180.2V187.8ZM180.2,180.2H187.8V187.8H180.2V180.2ZM180.2,142.2H187.8V149.8H180.2V142.2ZM180.2,134.6H187.8V142.2H180.2V134.6ZM180.2,127H187.8V134.6H180.2V127ZM180.2,119.4H187.8V127H180.2V119.4ZM180.2,96.6H187.8V104.2H180.2V96.6ZM180.2,81.4H187.8V89H180.2V81.4ZM180.2,58.6H187.8V66.2H180.2V58.6ZM180.2,43.4H187.8V51H180.2V43.4ZM180.2,35.8H187.8V43.4H180.2V35.8ZM180.2,28.2H187.8V35.8H180.2V28.2ZM180.2,13H187.8V20.6H180.2V13ZM172.6,195.4H180.2V203H172.6V195.4ZM172.6,180.2H180.2V187.8H172.6V180.2ZM172.6,127H180.2V134.6H172.6V127ZM172.6,119.4H180.2V127H172.6V119.4ZM172.6,96.6H180.2V104.2H172.6V96.6ZM172.6,89H180.2V96.6H172.6V89ZM172.6,81.4H180.2V89H172.6V81.4ZM172.6,58.6H180.2V66.2H172.6V58.6ZM172.6,43.4H180.2V51H172.6V43.4ZM172.6,35.8H180.2V43.4H172.6V35.8ZM172.6,28.2H180.2V35.8H172.6V28.2ZM172.6,13H180.2V20.6H172.6V13ZM165,187.8H172.6V195.4H165V187.8ZM165,180.2H172.6V187.8H165V180.2ZM165,165H172.6V172.6H165V165ZM165,157.4H172.6V165H165V157.4ZM165,149.8H172.6V157.4H165V149.8ZM165,142.2H172.6V149.8H165V142.2ZM165,134.6H172.6V142.2H165V134.6ZM165,119.4H172.6V127H165V119.4ZM165,111.8H172.6V119.4H165V111.8ZM165,96.6H172.6V104.2H165V96.6ZM165,81.4H172.6V89H165V81.4ZM165,58.6H172.6V66.2H165V58.6ZM165,43.4H172.6V51H165V43.4ZM165,35.8H172.6V43.4H165V35.8ZM165,28.2H172.6V35.8H165V28.2ZM165,13H172.6V20.6H165V13ZM157.4,187.8H165V195.4H157.4V187.8ZM157.4,165H165V172.6H157.4V165ZM157.4,134.6H165V142.2H157.4V134.6ZM157.4,127H165V134.6H157.4V127ZM157.4,104.2H165V111.8H157.4V104.2ZM157.4,81.4H165V89H157.4V81.4ZM157.4,58.6H165V66.2H157.4V58.6ZM157.4,13H165V20.6H157.4V13ZM149.8,195.4H157.4V203H149.8V195.4ZM149.8,172.6H157.4V180.2H149.8V172.6ZM149.8,165H157.4V172.6H149.8V165ZM149.8,149.8H157.4V157.4H149.8V149.8ZM149.8,134.6H157.4V142.2H149.8V134.6ZM149.8,127H157.4V134.6H149.8V127ZM149.8,104.2H157.4V111.8H149.8V104.2ZM149.8,96.6H157.4V104.2H149.8V96.6ZM149.8,89H157.4V96.6H149.8V89ZM149.8,73.8H157.4V81.4H149.8V73.8ZM149.8,58.6H157.4V66.2H149.8V58.6ZM149.8,51H157.4V58.6H149.8V51ZM149.8,43.4H157.4V51H149.8V43.4ZM149.8,35.8H157.4V43.4H149.8V35.8ZM149.8,28.2H157.4V35.8H149.8V28.2ZM149.8,20.6H157.4V28.2H149.8V20.6ZM149.8,13H157.4V20.6H149.8V13ZM142.2,195.4H149.8V203H142.2V195.4ZM142.2,180.2H149.8V187.8H142.2V180.2ZM142.2,172.6H149.8V180.2H142.2V172.6ZM142.2,165H149.8V172.6H142.2V165ZM142.2,134.6H149.8V142.2H142.2V134.6ZM142.2,119.4H149.8V127H142.2V119.4ZM134.6,195.4H142.2V203H134.6V195.4ZM134.6,180.2H142.2V187.8H134.6V180.2ZM134.6,172.6H142.2V180.2H134.6V172.6ZM134.6,165H142.2V172.6H134.6V165ZM134.6,157.4H142.2V165H134.6V157.4ZM134.6,149.8H142.2V157.4H134.6V149.8ZM134.6,142.2H142.2V149.8H134.6V142.2ZM134.6,134.6H142.2V142.2H134.6V134.6ZM134.6,119.4H142.2V127H134.6V119.4ZM134.6,111.8H142.2V119.4H134.6V111.8ZM134.6,104.2H142.2V111.8H134.6V104.2ZM134.6,96.6H142.2V104.2H134.6V96.6ZM134.6,89H142.2V96.6H134.6V89ZM134.6,73.8H142.2V81.4H134.6V73.8ZM134.6,66.2H142.2V73.8H134.6V66.2ZM134.6,58.6H142.2V66.2H134.6V58.6ZM134.6,51H142.2V58.6H134.6V51ZM134.6,35.8H142.2V43.4H134.6V35.8ZM127,187.8H134.6V195.4H127V187.8ZM127,180.2H134.6V187.8H127V180.2ZM127,172.6H134.6V180.2H127V172.6ZM127,165H134.6V172.6H127V165ZM127,157.4H134.6V165H127V157.4ZM127,134.6H134.6V142.2H127V134.6ZM127,127H134.6V134.6H127V127ZM127,119.4H134.6V127H127V119.4ZM127,111.8H134.6V119.4H127V111.8ZM127,89H134.6V96.6H127V89ZM127,81.4H134.6V89H127V81.4ZM127,66.2H134.6V73.8H127V66.2ZM127,35.8H134.6V43.4H127V35.8ZM119.4,187.8H127V195.4H119.4V187.8ZM119.4,172.6H127V180.2H119.4V172.6ZM119.4,165H127V172.6H119.4V165ZM119.4,157.4H127V165H119.4V157.4ZM119.4,119.4H127V127H119.4V119.4ZM119.4,111.8H127V119.4H119.4V111.8ZM119.4,104.2H127V111.8H119.4V104.2ZM119.4,96.6H127V104.2H119.4V96.6ZM119.4,81.4H127V89H119.4V81.4ZM119.4,73.8H127V81.4H119.4V73.8ZM119.4,66.2H127V73.8H119.4V66.2ZM119.4,58.6H127V66.2H119.4V58.6ZM119.4,28.2H127V35.8H119.4V28.2ZM119.4,13H127V20.6H119.4V13ZM111.8,180.2H119.4V187.8H111.8V180.2ZM111.8,172.6H119.4V180.2H111.8V172.6ZM111.8,157.4H119.4V165H111.8V157.4ZM111.8,149.8H119.4V157.4H111.8V149.8ZM111.8,134.6H119.4V142.2H111.8V134.6ZM111.8,89H119.4V96.6H111.8V89ZM111.8,66.2H119.4V73.8H111.8V66.2ZM111.8,51H119.4V58.6H111.8V51ZM111.8,35.8H119.4V43.4H111.8V35.8ZM111.8,28.2H119.4V35.8H111.8V28.2ZM104.2,195.4H111.8V203H104.2V195.4ZM104.2,187.8H111.8V195.4H104.2V187.8ZM104.2,157.4H111.8V165H104.2V157.4ZM104.2,142.2H111.8V149.8H104.2V142.2ZM104.2,134.6H111.8V142.2H104.2V134.6ZM104.2,111.8H111.8V119.4H104.2V111.8ZM104.2,104.2H111.8V111.8H104.2V104.2ZM104.2,89H111.8V96.6H104.2V89ZM104.2,73.8H111.8V81.4H104.2V73.8ZM104.2,66.2H111.8V73.8H104.2V66.2ZM104.2,58.6H111.8V66.2H104.2V58.6ZM104.2,43.4H111.8V51H104.2V43.4ZM104.2,20.6H111.8V28.2H104.2V20.6ZM96.6,195.4H104.2V203H96.6V195.4ZM96.6,180.2H104.2V187.8H96.6V180.2ZM96.6,172.6H104.2V180.2H96.6V172.6ZM96.6,157.4H104.2V165H96.6V157.4ZM96.6,149.8H104.2V157.4H96.6V149.8ZM96.6,127H104.2V134.6H96.6V127ZM96.6,51H104.2V58.6H96.6V51ZM96.6,43.4H104.2V51H96.6V43.4ZM96.6,35.8H104.2V43.4H96.6V35.8ZM96.6,28.2H104.2V35.8H96.6V28.2ZM96.6,20.6H104.2V28.2H96.6V20.6ZM96.6,13H104.2V20.6H96.6V13ZM89,195.4H96.6V203H89V195.4ZM89,187.8H96.6V195.4H89V187.8ZM89,180.2H96.6V187.8H89V180.2ZM89,172.6H96.6V180.2H89V172.6ZM89,142.2H96.6V149.8H89V142.2ZM89,127H96.6V134.6H89V127ZM89,111.8H96.6V119.4H89V111.8ZM89,104.2H96.6V111.8H89V104.2ZM89,81.4H96.6V89H89V81.4ZM89,58.6H96.6V66.2H89V58.6ZM89,43.4H96.6V51H89V43.4ZM89,35.8H96.6V43.4H89V35.8ZM89,13H96.6V20.6H89V13ZM81.4,187.8H89V195.4H81.4V187.8ZM81.4,180.2H89V187.8H81.4V180.2ZM81.4,165H89V172.6H81.4V165ZM81.4,142.2H89V149.8H81.4V142.2ZM81.4,134.6H89V142.2H81.4V134.6ZM81.4,127H89V134.6H81.4V127ZM81.4,119.4H89V127H81.4V119.4ZM81.4,104.2H89V111.8H81.4V104.2ZM81.4,89H89V96.6H81.4V89ZM81.4,73.8H89V81.4H81.4V73.8ZM81.4,66.2H89V73.8H81.4V66.2ZM81.4,51H89V58.6H81.4V51ZM81.4,28.2H89V35.8H81.4V28.2ZM81.4,13H89V20.6H81.4V13ZM73.8,195.4H81.4V203H73.8V195.4ZM73.8,187.8H81.4V195.4H73.8V187.8ZM73.8,172.6H81.4V180.2H73.8V172.6ZM73.8,165H81.4V172.6H73.8V165ZM73.8,142.2H81.4V149.8H73.8V142.2ZM73.8,119.4H81.4V127H73.8V119.4ZM73.8,96.6H81.4V104.2H73.8V96.6ZM73.8,89H81.4V96.6H73.8V89ZM73.8,66.2H81.4V73.8H73.8V66.2ZM73.8,58.6H81.4V66.2H73.8V58.6ZM73.8,13H81.4V20.6H73.8V13ZM66.2,127H73.8V134.6H66.2V127ZM66.2,104.2H73.8V111.8H66.2V104.2ZM66.2,96.6H73.8V104.2H66.2V96.6ZM66.2,89H73.8V96.6H66.2V89ZM58.6,195.4H66.2V203H58.6V195.4ZM58.6,187.8H66.2V195.4H58.6V187.8ZM58.6,180.2H66.2V187.8H58.6V180.2ZM58.6,172.6H66.2V180.2H58.6V172.6ZM58.6,165H66.2V172.6H58.6V165ZM58.6,157.4H66.2V165H58.6V157.4ZM58.6,149.8H66.2V157.4H58.6V149.8ZM58.6,134.6H66.2V142.2H58.6V134.6ZM58.6,119.4H66.2V127H58.6V119.4ZM58.6,104.2H66.2V111.8H58.6V104.2ZM58.6,89H66.2V96.6H58.6V89ZM58.6,73.8H66.2V81.4H58.6V73.8ZM58.6,58.6H66.2V66.2H58.6V58.6ZM58.6,51H66.2V58.6H58.6V51ZM58.6,43.4H66.2V51H58.6V43.4ZM58.6,35.8H66.2V43.4H58.6V35.8ZM58.6,28.2H66.2V35.8H58.6V28.2ZM58.6,20.6H66.2V28.2H58.6V20.6ZM58.6,13H66.2V20.6H58.6V13ZM51,195.4H58.6V203H51V195.4ZM51,149.8H58.6V157.4H51V149.8ZM51,119.4H58.6V127H51V119.4ZM51,58.6H58.6V66.2H51V58.6ZM51,13H58.6V20.6H51V13ZM43.4,195.4H51V203H43.4V195.4ZM43.4,180.2H51V187.8H43.4V180.2ZM43.4,172.6H51V180.2H43.4V172.6ZM43.4,165H51V172.6H43.4V165ZM43.4,149.8H51V157.4H43.4V149.8ZM43.4,134.6H51V142.2H43.4V134.6ZM43.4,127H51V134.6H43.4V127ZM43.4,104.2H51V111.8H43.4V104.2ZM43.4,81.4H51V89H43.4V81.4ZM43.4,73.8H51V81.4H43.4V73.8ZM43.4,58.6H51V66.2H43.4V58.6ZM43.4,43.4H51V51H43.4V43.4ZM43.4,35.8H51V43.4H43.4V35.8ZM43.4,28.2H51V35.8H43.4V28.2ZM43.4,13H51V20.6H43.4V13ZM35.8,195.4H43.4V203H35.8V195.4ZM35.8,180.2H43.4V187.8H35.8V180.2ZM35.8,172.6H43.4V180.2H35.8V172.6ZM35.8,165H43.4V172.6H35.8V165ZM35.8,149.8H43.4V157.4H35.8V149.8ZM35.8,134.6H43.4V142.2H35.8V134.6ZM35.8,127H43.4V134.6H35.8V127ZM35.8,119.4H43.4V127H35.8V119.4ZM35.8,111.8H43.4V119.4H35.8V111.8ZM35.8,73.8H43.4V81.4H35.8V73.8ZM35.8,58.6H43.4V66.2H35.8V58.6ZM35.8,43.4H43.4V51H35.8V43.4ZM35.8,35.8H43.4V43.4H35.8V35.8ZM35.8,28.2H43.4V35.8H35.8V28.2ZM35.8,13H43.4V20.6H35.8V13ZM28.2,195.4H35.8V203H28.2V195.4ZM28.2,180.2H35.8V187.8H28.2V180.2ZM28.2,172.6H35.8V180.2H28.2V172.6ZM28.2,165H35.8V172.6H28.2V165ZM28.2,149.8H35.8V157.4H28.2V149.8ZM28.2,134.6H35.8V142.2H28.2V134.6ZM28.2,119.4H35.8V127H28.2V119.4ZM28.2,104.2H35.8V111.8H28.2V104.2ZM28.2,96.6H35.8V104.2H28.2V96.6ZM28.2,58.6H35.8V66.2H28.2V58.6ZM28.2,43.4H35.8V51H28.2V43.4ZM28.2,35.8H35.8V43.4H28.2V35.8ZM28.2,28.2H35.8V35.8H28.2V28.2ZM28.2,13H35.8V20.6H28.2V13ZM20.6,195.4H28.2V203H20.6V195.4ZM20.6,149.8H28.2V157.4H20.6V149.8ZM20.6,134.6H28.2V142.2H20.6V134.6ZM20.6,127H28.2V134.6H20.6V127ZM20.6,111.8H28.2V119.4H20.6V111.8ZM20.6,96.6H28.2V104.2H20.6V96.6ZM20.6,81.4H28.2V89H20.6V81.4ZM20.6,73.8H28.2V81.4H20.6V73.8ZM20.6,58.6H28.2V66.2H20.6V58.6ZM20.6,13H28.2V20.6H20.6V13ZM13,195.4H20.6V203H13V195.4ZM13,187.8H20.6V195.4H13V187.8ZM13,180.2H20.6V187.8H13V180.2ZM13,172.6H20.6V180.2H13V172.6ZM13,165H20.6V172.6H13V165ZM13,157.4H20.6V165H13V157.4ZM13,149.8H20.6V157.4H13V149.8ZM13,96.6H20.6V104.2H13V96.6ZM13,89H20.6V96.6H13V89ZM13,81.4H20.6V89H13V81.4ZM13,73.8H20.6V81.4H13V73.8ZM13,58.6H20.6V66.2H13V58.6ZM13,51H20.6V58.6H13V51ZM13,43.4H20.6V51H13V43.4ZM13,35.8H20.6V43.4H13V35.8ZM13,28.2H20.6V35.8H13V28.2ZM13,20.6H20.6V28.2H13V20.6ZM13,13H20.6V20.6H13V13Z" />

Check warning

Code scanning / Android Lint

Long vector paths Warning

Very long vector path (10144 characters), which is bad for performance. Considering reducing precision, removing minor details or rasterizing vector.
@pascalwei
Copy link
Contributor Author

pascalwei commented May 21, 2024

Thanks!

I realized the focus was off when I first placed the button. But with FocusRequester I was able work around that issue.

On this specific screen the button doesn't need to be there, we could make the screen non-interactive. In fact if you want to adhere to the design principles, there should be no button on the screen. The "OK" button serves the only purpose to go back, and there's a dedicated button on tv remotes to go back.

I'm unsure what exactly you refer to with "create our own theme". The tv-material library just applies a baseline Material design optimized for tv on the UI elements. Of course we may implement our own theme with a custom typeface, button shapes, colors etc. on top of that.

I don't know what kind of bad experience you had with leanback, but I imagine when you had issues other people had those as well. Maybe it was the early days for Google developing a tv interface and they didn't know how to do x or y best.

After having issues I get that you might be frustrated, but reinventing the wheel because the provided one isn't perfect here or there comes with a huge amount of work. I would give the new generation a shot.

@nielsvanvelzen
Copy link
Member

nielsvanvelzen commented May 27, 2024

After playing around with the androidx.tv.material library in my playground app, I've decided we can use it for now. In #3611 I migrated the existing code to use it too.

Additionally, I think it's fine to remove the "ok" button if we replace it with a guide on how to close. Similar to how our expandable text popup works (see bottom-left):

9280000355

A lot of our users are not too familiar with smart-tv remotes so providing a small hint to press the back button will help them.

@pascalwei
Copy link
Contributor Author

Sure, when our users expect a button we should include one. I don't think there is a significant difference between a guide button in the lower left and a normal button though, as we have the space below the text anyways. I added the previous button back in another commit.

Thank you for taking a look at the library as well. I'll see what else I can port over to Compose.

Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

detekt found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

@nielsvanvelzen
Copy link
Member

We've now updated to compose 1.7 and all focus related issues I encountered before are resolved. This means we should be able to go forward with this pull request! Can you rebase the pull request and revert the custom theme? That one can be added later.

@nielsvanvelzen nielsvanvelzen removed the blocked Needs another PR first label Sep 5, 2024
@pascalwei
Copy link
Contributor Author

Thank you for the heads-up. Without the focus requester on the button it still didn't work to go back in one click, so I left it in there for now. I've removed the theme as you requested, however keep in mind that tv-material3 doesn't share the android-material3 or leanback themes, meaning until we add our own theme it will be inconsistent full white:
image

@nielsvanvelzen
Copy link
Member

The initial commits hardcoded the colors to use using colorResource(), which is fine to use for now.

@nielsvanvelzen nielsvanvelzen added this to the v0.18.0 milestone Sep 10, 2024
@nielsvanvelzen
Copy link
Member

I made some additional changes to the formatting and extracted the composable out of the class definition. Additionally I fixed an issue where the focus effect was not applied to the button because of the .focusable() call (button is already focusable by default and it must be specified before the focus requester).

Thanks for the work on this one!

@nielsvanvelzen nielsvanvelzen enabled auto-merge (squash) September 10, 2024 12:58
@nielsvanvelzen nielsvanvelzen merged commit 51cedee into jellyfin:master Sep 10, 2024
4 checks passed
return binding.root
}
@Composable
private fun ConnectHelpAlert(

Check warning

Code scanning / detekt

One method should have one responsibility. Long methods tend to handle many things at once. Prefer smaller methods to make them easier to understand. Warning

The function ConnectHelpAlert is too long (69). The maximum length is 60.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants