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

Fix: remove pop up window for help command #317

Merged

Conversation

Zer0Legion
Copy link

Now less mouse usage is required.

Lets optimize for typists.

Now less mouse usage is required.

Lets optimize for typists.
@Zer0Legion Zer0Legion added type.Task Something that needs to be done, but not a story, bug, or an epic. e.g. Move testing code into a new priority.High Must do labels Apr 3, 2024
@Zer0Legion Zer0Legion added this to the v1.3 milestone Apr 3, 2024
@Zer0Legion Zer0Legion self-assigned this Apr 3, 2024
Now the checkstyle is fixed.

Lets adhere to checkstyle.
@Pughal77
Copy link

Pughal77 commented Apr 3, 2024

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.
Copy link

codecov bot commented Apr 3, 2024

Codecov Report

Attention: Patch coverage is 57.14286% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 80.23%. Comparing base (d625798) to head (9944393).

Files Patch % Lines
...java/seedu/address/logic/commands/HelpCommand.java 57.14% 2 Missing and 1 partial ⚠️
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.
📢 Have feedback on the report? Share it here.

Copy link

@jayllo-c jayllo-c left a 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()) {
Copy link

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);
Copy link

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.";

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

@jayllo-c jayllo-c merged commit 61c0121 into AY2324S2-CS2103T-T10-1:master Apr 3, 2024
3 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority.High Must do type.Task Something that needs to be done, but not a story, bug, or an epic. e.g. Move testing code into a new
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants