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

refactor(ProjectService): Clean up calculateNodeNumbersHelper() #1510

Merged

Conversation

geoffreykwan
Copy link
Member

@geoffreykwan geoffreykwan commented Nov 6, 2023

Changes

  • Broke down calculateNodeNumbersHelper() function into smaller functions
  • Removed some null checks

Test

Make sure lesson and step numbers are still calculated correctly in

  • Authoring Tool
  • Classroom Monitor
  • VLE

Closes #1274

@geoffreykwan geoffreykwan self-assigned this Nov 6, 2023
@geoffreykwan geoffreykwan marked this pull request as ready for review November 6, 2023 22:59
Copy link
Member

@hirokiterashima hirokiterashima 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.

Looks like you can make calculateNodeNumbersHelper() private and remove the unused max import in projectService.ts.

It'd be great if we can move this into its own class/service in the future and make ProjectService smaller.

@geoffreykwan geoffreykwan merged commit 8376397 into develop Nov 7, 2023
2 checks passed
@geoffreykwan geoffreykwan deleted the issue-1274-refactor-calculate-node-numbers-helper branch November 7, 2023 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

refactor(ProjectService): calculateNodeNumbersHelper() part 1
2 participants