-
Notifications
You must be signed in to change notification settings - Fork 6
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
Fix: remove pop up window for help command #317
Fix: remove pop up window for help command #317
Conversation
Now less mouse usage is required. Lets optimize for typists.
Now the checkstyle is fixed. Lets adhere to checkstyle.
Nice now its more keyboard-friendly |
Now tests should pass on gradle checks. Lets help gradle pass.
Now code adheres to checkstyle. lets adhere to checkstyle.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #317 +/- ##
============================================
- Coverage 80.30% 80.23% -0.08%
- Complexity 871 873 +2
============================================
Files 106 106
Lines 2589 2595 +6
Branches 299 299
============================================
+ Hits 2079 2082 +3
- Misses 429 431 +2
- Partials 81 82 +1 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely crucial if we want to ensure our app is optimized for keyboard users
|
||
public static final String SHOWING_HELP_MESSAGE = "Opened help window."; | ||
private void copyToClipboard(StringSelection stringSelection) { | ||
if (GraphicsEnvironment.isHeadless()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great job ensuring the environment allows for the existence of the clipboard
|
||
@Override | ||
public CommandResult execute(Model model) { | ||
return new CommandResult(SHOWING_HELP_MESSAGE, true, false); | ||
copyToClipboard(USER_GUIDE_URL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice abstraction
public static final String COMMAND_WORD = "help"; | ||
|
||
public static final String MESSAGE_USAGE = COMMAND_WORD + ": Shows program usage instructions.\n" | ||
+ "Example: " + COMMAND_WORD; | ||
public static final String SHOWING_HELP_MESSAGE = | ||
"Copied user guide link to clipboard. Open the link in a browser to view it."; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch to optimise the app for keyboard users
Now less mouse usage is required.
Lets optimize for typists.