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

Consolidate edittext alert dialogs into one common layout #6720

Merged
merged 1 commit into from
Jul 27, 2021
Merged

Consolidate edittext alert dialogs into one common layout #6720

merged 1 commit into from
Jul 27, 2021

Conversation

TacoTheDank
Copy link
Member

@TacoTheDank TacoTheDank commented Jul 21, 2021

What is it?

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

Description of the changes in your PR

  • Consolidate alert dialogs with edittexts for views into one common layout, and we can add attributes through the code.
  • Differences:
    • Peertube adding dialog in the Content Settings looks a little bit different (and, dare I say, nicer :)) due to padding.
    • No visual differences in the add-video-to-playlist dialog (apart from the line now being red when the EditText box is selected).
    • I have no idea how to trigger the bookmark fragment dialog with the edittext, but I imagine it doesn't look very different.

(Ignore the comments disabled thing in the background of the second comparison)

By the way, is the AlertDialog buttons being white something we can fix? It looks bad imo, and them being red only seems to take effect in the settings screens.

Before After
Screenshot_20210720-233023_NewPipe Screenshot_20210720-233230_NewPipe alertdialog
Before After
Screenshot_20210720-233718_NewPipe Screenshot_20210720-233727_NewPipe alertdialog

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.

Due diligence

Copy link
Member

@Stypox Stypox left a comment

Choose a reason for hiding this comment

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

I think setMaxLines(1); and setSaveEnabled(true); can be specified in the dialog_edit_text.xml, since:

In particular, only android:maxLines="1" needs to be put in the xml, as android:saveEnabled is true by default.


By the way, is the AlertDialog buttons being white something we can fix? It looks bad imo, and them being red only seems to take effect in the settings screens.

I think we might have to customize the accentColor for dialog buttons. But let's leave this to another PR.

@TacoTheDank
Copy link
Member Author

@Stypox Thanks! Fixed.

Copy link
Member

@Stypox Stypox left a comment

Choose a reason for hiding this comment

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

LGTM :-)

@Stypox Stypox merged commit 5ceec31 into TeamNewPipe:dev Jul 27, 2021
@TobiGr TobiGr added the GUI Issue is related to the graphical user interface label Jul 27, 2021
@TacoTheDank TacoTheDank deleted the alertdialog-edittext branch July 29, 2021 17:17
This was referenced Aug 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GUI Issue is related to the graphical user interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants