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

Redesigned long press menu #12032

Open
wants to merge 18 commits into
base: refactor
Choose a base branch
from
Open

Conversation

Stypox
Copy link
Member

@Stypox Stypox commented Feb 12, 2025

What is it?

  • [ x ] Feature (user facing)
  • [ x ] Codebase improvement (dev facing)

Description of the changes in your PR

This PR replaces InfoItemDialog with a JetpackCompose-based bottom sheet menu. This new menu is supposed to replace all item long press menus across the app, i.e. streams, playlists, channels. The menu contains more details than before about the stream/playlist/channel that was clicked, laid out in a (imo) nice design.

Please provide feedback both on the code and on the UI, but please keep in mind the points below when suggesting an alternative layout. Note that the order of buttons is not yet finalized, and that at the moment the menu only works for streams.

Portrait Landscape/tablet
Before After

Motivation and design goals

  • A text-based menu is difficult to read and only allows for a handful of actions, while an icon-based menu is more compact and also easier to use. There still are some labels to explain what the actions do though.
  • The menu puts the most frequent actions always in the same places, so muscle memory can help perform press the buttons faster.
  • Users keep asking for new long press menu actions, therefore the long press actions system should be easily extendable and the set of actions should possibly even be editable by the user.
  • We want to provide the same experience across the app (hence same menu for streams, playlists, channels), which also deduplicates a lot of code.
  • A menu at the bottom of the screen is easier to use in one-handed mode.
  • The menu adapts well to different screen sizes, e.g. by showing more/less buttons or adapting the header with item information.

Some of these points arose after some discussions in the NewPipe Matrix channel

TODO

  • Also use the dialog for playlists and channels
  • Perform asynchronous stuff with coroutines instead of RxJava3
  • Implement "Start playing from here" actions
  • Handle Kodi action
  • Decide whether to allow the user to customize the menu (there is already a mini settings button in the top right of the menu for that purpose, but now it doesn't do anything)
  • Various other TODOs spread out in code
  • Understand which issues are solved by this PR
  • Add documentation
  • Add UI tests (?)

APK testing

The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR. You can find more info and a video demonstration on this wiki page.

Due diligence

@github-actions github-actions bot added the size/giant PRs with more than 750 changed lines label Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/giant PRs with more than 750 changed lines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant