Skip to content

refactor: extract filter values into variables#121

Open
deeonwuli wants to merge 2 commits intodevelopmentfrom
refactor/glass-submission-report-refactor
Open

refactor: extract filter values into variables#121
deeonwuli wants to merge 2 commits intodevelopmentfrom
refactor/glass-submission-report-refactor

Conversation

@deeonwuli
Copy link
Contributor

📌 References

📝 Implementation

📹 Screenshots/Screen capture

🔥 Notes to the tester

REACT_APP_REPORT_VARIANT=glass-submission
REACT_APP_DHIS2_BASE_URL=https://dev.eyeseetea.com/who-dev-238/

@reviewpad
Copy link

reviewpad bot commented Sep 5, 2023

AI-Generated Summary: This pull request contains refactoring changes in the GLASSDataSubmissionDefaultRepository.ts file. The filter values are extracted into their own constants to make the code clearer and more readable. The logical operations inside if-statements are also streamlined and refactored to decrease code complexity. In addition, the conditional statements are revised to introduce consistency and further improve readability. The changes are all structural and do not affect the functionality of the code.

@reviewpad reviewpad bot added small Pull request is small waiting-for-review labels Sep 5, 2023
@reviewpad
Copy link

reviewpad bot commented Sep 5, 2023

Reviewpad Report

‼️ Errors

  • Unconventional commit detected: 'Merge branch 'development' into refactor/glass-submission-report-refactor' (52d4d48)

@reviewpad
Copy link

reviewpad bot commented Sep 5, 2023

AI-Generated Summary: This pull request refactors parts of the GLASSDataSubmissionDefaultRepository.ts file for better readability and maintainability. The conditional logic within the row filtering functions has been extracted into separate variables, providing clearer expressions of the filtering criteria. This change primarily affects the conditionals that were previously within filter method callbacks. Now, instead of conducting checks within these callbacks, the checks are assigned to their respective variables which makes the code easier to understand, debug, and maintain.

Copy link
Contributor

@anagperal anagperal left a comment

Choose a reason for hiding this comment

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

Thanks @deeonwuli !! Now all conditionals are read much better than before 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

small Pull request is small waiting-for-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants