Skip to content

Implement history search in repl via up/down arrows #200

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

Merged
merged 11 commits into from
Jul 17, 2018
Merged

Conversation

ning-y
Copy link
Member

@ning-y ning-y commented Jul 16, 2018

Some possible improvements are documented in #199.

@ning-y ning-y requested a review from remo5000 July 16, 2018 05:05
@coveralls
Copy link

coveralls commented Jul 16, 2018

Pull Request Test Coverage Report for Build 312

  • 5 of 49 (10.2%) changed or added relevant lines in 8 files are covered.
  • 5 unchanged lines in 4 files lost coverage.
  • Overall coverage decreased (-0.4%) to 25.657%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/actions/workspaces.ts 2 4 50.0%
src/containers/assessment/AssessmentWorkspaceContainer.ts 0 2 0.0%
src/containers/PlaygroundContainer.ts 0 2 0.0%
src/containers/academy/grading/GradingWorkspaceContainer.ts 0 2 0.0%
src/components/workspace/ReplInput.tsx 0 6 0.0%
src/reducers/workspaces.ts 0 30 0.0%
Files with Coverage Reduction New Missed Lines %
src/containers/academy/grading/GradingWorkspaceContainer.ts 1 37.5%
src/containers/PlaygroundContainer.ts 1 39.13%
src/containers/assessment/AssessmentWorkspaceContainer.ts 1 36.0%
src/reducers/workspaces.ts 2 8.73%
Totals Coverage Status
Change from base Build 310: -0.4%
Covered Lines: 720
Relevant Lines: 2377

💛 - Coveralls

mac: 'Up'
},
exec: this.execBrowseHistoryUp
},
Copy link
Contributor

Choose a reason for hiding this comment

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

Logic here looks good. The multi-line issue is already addressed, so not going to mention it here

[location]: {
...state[location]
}
if (newReplHistoryRecords.length > 50) {
Copy link
Contributor

Choose a reason for hiding this comment

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

You can consider using a deque or a circular buffer, so that the size does not have to be a concern.

}
case EVAL_EDITOR:
Copy link
Contributor

Choose a reason for hiding this comment

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

I should have added some documentation for this, my bad. It is here to force a re-render in the workspace component, showing the "Stop" button. Can it be added back? The Stop button does not show up when running e.g const fib = (x) => x <= 2? 1 : fib(x-1) + fib(x-2); fib(20);

@ning-y
Copy link
Member Author

ning-y commented Jul 17, 2018

Changes made with c6b0fdc and d4eb7ae.

Copy link
Contributor

@remo5000 remo5000 left a comment

Choose a reason for hiding this comment

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

Thanks!

@ning-y ning-y merged commit 7d81334 into master Jul 17, 2018
@ning-y ning-y deleted the repl-history branch July 17, 2018 11:15
Aulud pushed a commit to Aulud/cadet-frontend that referenced this pull request May 25, 2020
…ce-academy#200)

* Add comment field to the response of AssessmentsController.show

* Address code review
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.

3 participants