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

Reworked the ErrorPanel #7004

Merged

Conversation

litetex
Copy link
Member

@litetex litetex commented Aug 28, 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

I tried to fix #7003 quickly as mentioned in #7003 (comment) however I found some major issues with the ErrorPanel that made it very poor understandable, caused #7003 in the first place and decided to fix these instead.

Summary of changes:

  • All element on the error panel are now hidden by default (expect for the errorTextView) as they are only optional shown - depending on the situation and type of the error
    • Added a method to ensure the above (if e.g. the panel is reused)
    • This deduplicates a lot of code
  • Fixed format of some LoC (they were too long)
  • Added new method: showAndSetErrorButtonAction (see JavaDoc for more information)
  • Named buttons more logically: errorButtonAction -> errorActionButton

Before/After Screenshots/Screen Record

  • Before:

- After:

Fixes the following issue(s)

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

* All element on the error panel are now hidden by default (expect for the ``errorTextView``) as they are only optional shown
  * Added a method to ensure the above
  * This deduplicates a lot of code
* Fixed format of some LoC
* Added new method: ``showAndSetErrorButtonAction``
* Fixed  ``showTextError``
* Named buttons more logically: ``errorButtonAction`` -> ``errorActionButton``
@litetex litetex added bug Issue is related to a bug GUI Issue is related to the graphical user interface labels Aug 28, 2021
@TobiGr TobiGr requested a review from Stypox August 30, 2021 20:24
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.

Thank you! I can confirm it works. I don't know why I went with that strange design of setting things only if needed (and thus obviously forgetting something), this looks much better

@Stypox Stypox merged commit faa7a91 into TeamNewPipe:dev Aug 31, 2021
@litetex litetex deleted the fix-showTextError-and-rework-ErrorPanel branch August 31, 2021 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is related to a bug GUI Issue is related to the graphical user interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalid/Malformed error-view is shown on age restricted video
2 participants