NewPipe icon indicating copy to clipboard operation
NewPipe copied to clipboard

Refactor Settings Compose Setup

Open HatakeKakashri opened this issue 6 months ago • 2 comments

What is it?

  • [ ] Bugfix (user facing)
  • [ ] Feature (user facing)
  • [x] Codebase improvement (dev facing)
  • [ ] Meta improvement to the project (dev facing)

Description of the changes in your PR

This PR refines the Settings screen setup using Jetpack Compose:

  • Navigation Routing: Updated navigation logic to use Serialized Routes, as recommended in the official Compose navigation documentation.
  • Screen Title Management: Migrated screen title handling to a Compose-native approach instead of using addOnDestinationChangedListener.
  • Toolbar Enhancements:
    • Refined the toolbar layout and styling to improve alignment with Material theming.
    • Implemented proper ripple effects and consistent color usage.
    • Fixed back navigation behavior to align with Compose conventions.
  • Theming Note: The current Compose-based theme system does not yet fully replicate the color palette used in the legacy (pre-Compose) implementation, especially across different services. A TODO has been added in code, and a separate task will be created to address this comprehensively.

Before/After Screenshots/Screen Record

  • Before:
  • After:

Fixes the following issue(s)

  • Fixes #

Relies on the following changes

  • N/A

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

HatakeKakashri avatar Jun 26 '25 05:06 HatakeKakashri

It would be nice to switch to navigation3 to avoid more migration work whenever that hits stable. I will do that afterwards.

theimpulson avatar Oct 20 '25 09:10 theimpulson

It would be nice to switch to navigation3 to avoid more migration work whenever that hits stable. I will do that afterwards.

That would be nice. I can take a look at Navigation 3. Quick question: are we looking for a specific feature in Navigation 3, or are we considering it mainly because it is newer and designed for Jetpack Compose? I’m a bit skeptical as the official documentation mentions that the library is still in alpha.

HatakeKakashri avatar Oct 22 '25 16:10 HatakeKakashri