-
Notifications
You must be signed in to change notification settings - Fork 253
Refactored MarksPanel child components #7700
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
base: master
Are you sure you want to change the base?
Refactored MarksPanel child components #7700
Conversation
… Checkbox and Rubric Criterion Input into hook-based function components
Pull Request Test Coverage Report for Build 18637098805Details
💛 - Coveralls |
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.
@lizzie-liu overall I think you've done this refactoring well, so I'm going to extend your assigned task further by asking you to also convert the FlexibleCriterionInput
into a function-based component. This will extend your learning of hook-based components to a more sophisticated use.
Changelog.md
Outdated
- Fixed Rack deprecation warnings by updating HTTP status code symbols (#7675) | ||
- Refactored "Reuse Groups" functionality to use React modal and relocated button to action box row (#7688) | ||
- Updated pre-commit `rubocop-rails` version to 2.33.4 (#7691) | ||
- Refactored MarksPanel child components and converted CheckboxCriterionInput and RubricCriterionInput into hook-based function components |
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.
Please do a merge from master. We've just released v 2.8.2, so now you should ensure the entry you've added is still in the "unreleased" section.
|
||
import safe_marked from "../../common/safe_marked"; | ||
|
||
export class FlexibleCriterionInput extends React.Component { |
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.
You can use a default
export here to align the exports across all three files
}); | ||
|
||
it("renders CheckboxCriterionInput", () => { | ||
render(<CheckboxCriterionInput {...basicProps} />); |
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.
You should improve these tests by looking for particular elements on the screen. It's not enough to just call render
with the components.
…izzie-liu/Markus into refactor-markspanel-components
Proposed Changes
Refactored MarksPanel child components into their own files, and converted CheckboxCriterionInput and RubricCriterionInput into hook-based function components.
Screenshots of your changes (if applicable)
Associated documentation repository pull request (if applicable)
Type of Change
(Write an
X
or a brief description next to the type or types that best describe your changes.)Checklist
(Complete each of the following items for your pull request. Indicate that you have completed an item by changing the
[ ]
into a[x]
in the raw text, or by clicking on the checkbox in the rendered description on GitHub.)Before opening your pull request:
After opening your pull request:
Questions and Comments
(Include any questions or comments you have regarding your changes.)