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 code in public/src/admin/settings/navigation.js #534

Open
wants to merge 1 commit into
base: f24
Choose a base branch
from

Conversation

zzzannie
Copy link

@zzzannie zzzannie commented Sep 5, 2024

This PR resolves #533 .

  • The SonarCloud raised warning “refactor this code to not nest functions more than 4 levels deep” in public/src/admin/settings/navigation.js at line 100
  • To address the warning, a helper function was added inside the nested function to reduce levels
  • The changes passed linter and test suite, and were executed by UI operations with frontend console logs

Further notes on my attempts:

  • The first issue I tried was Refactoring code in src/upgrades/1.2.0/category_recent_tids.js #468 ; however, after I passed all checks and tried with the UI operations, I realized there were no UI operations for upgrade
  • The second issue I tried was Refactor code in src/database/mongo/sorted.js #515 ; however, when I was addressing the warning, I got a warning NODE_TLS_REJECT_UNAUTHORIZED and wasn't able to fixed it, even cloning again didn't help, so I deleted my fork and restarted
  • For this current issue I resolved, public/src/admin/settings/navigation.js wasn't covered by the testing files; there was even no folder for public/src/admin/settings to add tests

Copy link

sonarcloud bot commented Sep 5, 2024

@coveralls
Copy link

Pull Request Test Coverage Report for Build 10714660412

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 82.671%

Totals Coverage Status
Change from base Build 10607818019: 0.0%
Covered Lines: 22323
Relevant Lines: 25582

💛 - Coveralls

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.

Refactor code in public/src/admin/settings/navigation.js
2 participants