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

Implement error/warning dialog in Quark-Jadx integration #2

Open
pulorsok opened this issue May 25, 2021 · 14 comments
Open

Implement error/warning dialog in Quark-Jadx integration #2

pulorsok opened this issue May 25, 2021 · 14 comments

Comments

@pulorsok
Copy link
Member

pulorsok commented May 25, 2021

Showing an error message when something failure will be better for user to understand what's happening (does nothing when the process failed is a bad user experience).
Therefore, I would like to add dialogue with error message when quark executes failed.

@18z
Copy link
Member

18z commented May 25, 2021

Can you show us some dialogue examples you plan to implement?
Are you planning to write error msgs to a log file? If so, what module you would use to generate the log file?

@18z
Copy link
Member

18z commented May 25, 2021

Also, I suggest to develop a templet for issues in this project.

Title: Problem to solve.
Why: Why this problem is important and valuable to solve?
How: How are you going to solve this problem?

@pulorsok
Copy link
Member Author

@18z Thank you for the suggestion, and I apologize that I didn't describe the issues clearly.
I modified the issue and gave it more detail, see below.

Title: Add error dialogue when quark executes failure in Jadx

Why:

In Jadx-GUI, Showing an error message when something failure will be better for user to understand what's happening (does nothing when the process failed is a bad user experience).
Therefore, I would like to add dialogue with error message when quark executes failed.

Currently, the error message (or warning message) only shows in console and jadx log viewer

Log viewer doesn't pop up when the process failed

How:

The dialogue will look like this.

It will pop up when something failure (e.g. quark can't analysis the selected file)

@pulorsok pulorsok changed the title Add error dialogue when quark executes failure. Add error dialogue when quark executes failure in Jadx. May 25, 2021
@18z
Copy link
Member

18z commented May 25, 2021

  1. You didn't specify that this issue is for Jadx. Causing a misunderstand that I think this issue is for quark.
  2. Did you use any grammar check before your submission? I don't understand "quark executes failure".
  3. You should write and check and organize every idea and word you plan to deliver. Otherwise you're wasting our time.

@pulorsok
Copy link
Member Author

pulorsok commented May 25, 2021

Title: Implement error/warning dialog in Quark-Jadx integration

Describe the feature

The error/warning dialog pops up when any Quark process has failed in Jadx-gui (e.g., failed to install Quark). The dialog shows the error/warning message to inform the user why the process has failed.

Why is this feature important?

Currently, in Quark-Jadx integration, error/warning message only output to the logger. However, the user won't understand what's happening until he/she opens the Log Viewer (a Jadx-gui feature for reading log messages).

For a better user experience, users should be able to quickly and easily understand the problem.

How are you going to do it?

The image is the concept of error/warning dialog.

Here is the description for each dialog region:

  • Title: Show the log level (error/warning).
  • Message: Show the error/warning message (e.g., failed to install Quark).
  • Log Viewer Link: Click to see more detail in the Log Viewer.

@pulorsok pulorsok changed the title Add error dialogue when quark executes failure in Jadx. Implement error/warning dialog in Quark-Jadx integration May 26, 2021
@18z
Copy link
Member

18z commented May 27, 2021

3 questions.

  1. Do you think it's necessary to consider more log levels other than just error and warning?
  2. How many scenarios are considered under log level error?
  3. How many scenarios are considered under log level warning?

@pulorsok
Copy link
Member Author

pulorsok commented May 28, 2021

  1. Do you think it's necessary to consider more log levels other than just error and warning?

No, I think error and warning should be enough.
The purpose of the feature is to alert users that Quark does (or maybe) not work correctly. And since Jadx uses 5 log levels (sorted by importance: Error, Warning, Info, Debug, Trace) to logging events, the less important levels (Info, Debug, Trace) are unnecessary to alert users with dialog.

  1. How many scenarios are considered under log level error?
  2. How many scenarios are considered under log level warning?

Here are the principles to choose the log level.

  • Error: Some process has failed, so Quark doesn't work correctly. E.g., "Quark can't analyze the APK file.".
  • Warning: A problem or a situation that might disturb one of the processes, but Quark can continue its work. E.g., "Quark is not the latest version.".

@18z
Copy link
Member

18z commented May 31, 2021

Great!

  1. I want to make sure that the author of jadx requested you to implement dialogs showing just error and warning?
  2. I suggest that the definition of error and warning to be fixed like:
    • Error: Problems occurred, quark can't continue its work.
    • Warning: Problems occurred, quark can still continue its work.

@pulorsok
Copy link
Member Author

pulorsok commented Jun 1, 2021

  1. I want to make sure that the author of jadx requested you to implement dialogs showing just error and warning?

He only requested me to add dialogs showing error, but I think implementing warning dialogs is considerable (to alert users that Quark may not work correctly).

  1. I suggest that the definition of error and warning to be fixed like:
    • Error: Problems occurred, quark can't continue its work.
    • Warning: Problems occurred, quark can still continue its work.

OK, this will make the principles more precise and clear, thanks.

@18z
Copy link
Member

18z commented Jun 1, 2021

Great! I think you're good to go!
So what's your next step?

@pulorsok
Copy link
Member Author

pulorsok commented Jun 1, 2021

Here are my next steps:

  1. Implement this feature.
  2. Deal with the problem when installing Quark in Quark-Jadx integration (especially on Windows).
    I will open another issue in this repository to describe the problem and solution.

@18z
Copy link
Member

18z commented Jun 1, 2021

Nice! Please do!

@pulorsok
Copy link
Member Author

pulorsok commented Jun 2, 2021

Here are the scenarios for using Error and Warning.

Error:

  • Quark is unable to analyze the selected file.
  • Quark is not installed.
  • Failed to install Quark.
  • Failed to execute Quark.
  • Failed to generate Quark report.
  • Failed to load Quark report.

Warning:

  • Quark is not the latest version.
  • The selected file size is too large (over 30M) that may take a long time to analyze.

@18z
Copy link
Member

18z commented Jun 2, 2021

Nice! Please do!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants