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

SummaryProgressRow refactor #44504

Merged
merged 1 commit into from
Jan 26, 2022

Conversation

maureensturgeon
Copy link
Contributor

As I was working on end-of-lesson dialog/redirect I discovered that the SummaryProgressRow test was testing a prop that was not used, which is what kicked off this refactor.

Changes:

  • Convert SummaryProgressRow to functional component and refactor logic
  • Update tests and test descriptions to better describe what was being tested

PR Checklist:

  • Tests provide adequate coverage
  • Privacy and Security impacts have been assessed
  • Code is well-commented
  • New features are translatable or updates will not break translations
  • Relevant documentation has been added or updated
  • User impact is well-understood and desirable
  • Pull Request is labeled appropriately
  • Follow-up work items (including potential tech debt) are tracked and linked

@maureensturgeon maureensturgeon requested a review from a team January 24, 2022 23:51
Copy link
Contributor

@jamescodeorg jamescodeorg left a comment

Choose a reason for hiding this comment

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

Looks good!

Comment on lines +28 to +32
// The parent component filters out hidden SummaryProgressRows from the student view,
// this check is just to ensure it won't be rendered if it should be hidden for students
if (lessonIsHiddenForStudents && viewAs === ViewType.Participant) {
return null;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we take advantage of this refactoring and use the "participant" terminology here instead (in the comment and in the prop name)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That did cross my mind as I was writing.. "student" just seemed so much more clear to me.. and right next to it is lessonIsHiddenForStudents. I'm going to leave it for now since I don't want to wait for another drone run, in the future I'll use participant

@maureensturgeon maureensturgeon merged commit f0719a1 into staging Jan 26, 2022
@maureensturgeon maureensturgeon deleted the maureen/clean-up-summary-progress-row branch January 26, 2022 01:20
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

2 participants