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

Convert app to use one spinner attached to JFScene + resize spinner #1515

Merged
merged 10 commits into from
Nov 30, 2023

Conversation

cewert
Copy link
Member

@cewert cewert commented Nov 18, 2023

Changes

  • Use booleans on main JFScene to control loading spinner
    • isLoading and disableRemote
  • Refactor from 3 to 2 main functions to control spinner
    • startLoadingSpinner(disableRemote = true as boolean)
      • Disables the remote as needed with a progressdialog and shows the loading spinner
      • Only display spinner when isLoading = false. This prevents double spinners.
    • stopLoadingSpinner()
      • Removes progressdialogs as needed and hides the loading spinner
  • Modifies every main screne to call stopLoadingSpinner() after the data has been loaded and the screne is ready to be shown
  • Removed custom Spinner components from all scenes and converted them to use the JFScene spinner
  • Resize spinner image from 200px -> 125px and recenter for 1080p resolution. This makes our spinner a similar size and location as the video player spinner
  • Rearrange things a bit in CreateSeasonDetailsGroupByID() so that the loading spinner goes away when the episodes are loaded instead of waiting on the extras/specials logic to finish

@cewert cewert added the general-improvement Quality of life improvements that don't add new functionality. label Nov 18, 2023
@cewert cewert requested a review from a team as a code owner November 18, 2023 22:59
@cewert cewert requested a review from sevenrats November 18, 2023 23:27
@sevenrats
Copy link
Member

just noting here what we discussed in chat, this does not mitigate the black screen that results from slow remote backends.

… booleans on JFScene to control spinner + resize spinner to be similar size as video player spinner
@cewert
Copy link
Member Author

cewert commented Nov 22, 2023

I pretty much redid this whole PR and updated the OP. Added the main logic to JFScene, using 2 booleans on JFScene instead of the 4 component functions, and I added a stopLoadingSpinner() to every main screne when it was done loading data. I also converted all the current custom spinners to use the new JFScene one instead. Our whole app uses one spinner now that can be toggled by using startLoadingSpinner() and stopLoadingSpinner().

@cewert cewert changed the title Use more loading spinners when selecting media with the OK button Convert app to use one spinner attached to JFScene + resize spinner Nov 22, 2023
Copy link
Member

@1hitsong 1hitsong left a comment

Choose a reason for hiding this comment

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

1 small code style change.

components/JFScene.bs Outdated Show resolved Hide resolved
@1hitsong
Copy link
Member

There's still an old spinner ref on line 553 of components\ItemGrid\MusicLibraryView.bs

@1hitsong
Copy link
Member

Inside Main.bs there are still 5 references to m.spinner. The ones without isValid checks are throwing errors, then ones with isValid checks simply aren't showing spinners.

@cewert
Copy link
Member Author

cewert commented Nov 22, 2023

Changes

  • Addressed reviewer feedback
  • Fixed all remaining custom spinner references/bugs
  • Added the spinner to a few more things triggered from the main loop (selecting a series, season, album, play all artist button, instant mix button etc.)
  • Stop showing the spinner a little earlier on audio player view.

@cewert cewert requested a review from 1hitsong November 22, 2023 14:11
@1hitsong
Copy link
Member

1hitsong commented Nov 22, 2023

I have 1 photo in my photo library. Clicking on it results in an infinite spinner that never goes away. Additionally, I'm unable to press back to get out of the spinner. I'm stuck unless I press home.

Quick play on the photo library and on the photo works. This occurs when pressing OK from the grid.

@1hitsong
Copy link
Member

I pressed Play on the Recordings Library. Nothing loaded and I'm again stuck on an infinite spinner.

@sevenrats
Copy link
Member

this now does fix the missing spinner, but that spinner is behind some darkening left over from the progressDialog for some reason. This is not the end of the world but it would be better to fix it somehow.
cewert when you have some time, please let me know how you feel about a solution like this one:
https://github.com/cewert/jellyfin-roku/pull/6/files

@sevenrats
Copy link
Member

also just noticed that there is still no spinner between episodes

@1hitsong
Copy link
Member

1hitsong commented Nov 24, 2023

I pressed Play on the Recordings Library. Nothing loaded and I'm again stuck on an infinite spinner.

This issue is still occurring. All my other issues are resolved.

Think I've got actionable info. Recordings library will quickplay in this PR if I have an unwatched video.

If I mark the one video I have as watched, then I will get stuck at an infinite spinner. I'm guessing the path when there's no video to play doesn't have a stop spinner call.

@cewert
Copy link
Member Author

cewert commented Nov 25, 2023

Changes

source/utils/quickplay.bs Outdated Show resolved Hide resolved
@cewert cewert requested a review from 1hitsong November 28, 2023 21:33
@1hitsong 1hitsong merged commit 39448b7 into jellyfin:unstable Nov 30, 2023
9 checks passed
@cewert cewert deleted the add-more-loading-spinners branch January 14, 2024 01:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
general-improvement Quality of life improvements that don't add new functionality.
Projects
Development

Successfully merging this pull request may close these issues.

3 participants