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

Update DG #126

Merged
merged 10 commits into from
Oct 20, 2020
Merged

Conversation

nweiyue
Copy link

@nweiyue nweiyue commented Oct 19, 2020

Update Ui component
Add switch tabs implementation

@nweiyue nweiyue added this to the v1.3 milestone Oct 19, 2020
Copy link

@marcustw marcustw left a comment

Choose a reason for hiding this comment

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

LGTM


Step 3. `SwitchCommandParser#parse()` checks if there is an argument being passed by the user. If an argument is passed, a `SwitchCommand` will be created and `SwitchCommand#execute()` will be called by the `LogicManager`.

<div markdown="span" class="alert alert-info">:information_source: **Note:** If no arguments is found, a `ParseException` will be thrown and the execution terminates.

Choose a reason for hiding this comment

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

Perhaps "If no arguments are found" ?


</div><br>

Step 4. `SwitchCommand#execute()` will check if the argument pass is an existing tab name. If the argument is valid, a `CommandResult` containing a variable `switchTab` with the value of the target `Tab` will be returned to `MainWindow`.

Choose a reason for hiding this comment

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

Perhaps "if the argument passed in is an"?

Copy link
Author

Choose a reason for hiding this comment

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

Thanks for spotting the mistakes!

@codecov-io
Copy link

codecov-io commented Oct 20, 2020

Codecov Report

Merging #126 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #126   +/-   ##
=========================================
  Coverage     74.33%   74.33%           
  Complexity      747      747           
=========================================
  Files           117      117           
  Lines          2194     2194           
  Branches        228      228           
=========================================
  Hits           1631     1631           
  Misses          505      505           
  Partials         58       58           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 849d348...9fc3bee. Read the comment docs.


</div><br>

Step 4. `SwitchCommand#execute()` will check if the argument passed in is an existing tab name. If the argument is valid, a `CommandResult` containing a variable `switchTab` with the value of the target `Tab` will be return to `MainWindow`.

Choose a reason for hiding this comment

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

Perhaps can combine "If the argument is valid" with no argument ==> If argument is invalid, a ParseException...?

Copy link
Author

Choose a reason for hiding this comment

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

Thanks for the suggestion but if the argument is invalid, it throws a CommandException but if argument is empty it throws a ParseException. Hence, this is why I separated them.

Choose a reason for hiding this comment

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

Thanks for the suggestion but if the argument is invalid, it throws a CommandException but if argument is empty it throws a ParseException. Hence, this is why I separated them.

Noted thanks for clarification

@nweiyue nweiyue merged commit 605ad57 into AY2021S1-CS2103T-W16-4:master Oct 20, 2020
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

Successfully merging this pull request may close these issues.

None yet

4 participants