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

Refactoring code in public/src/admin/manage/categories.js #135

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

SubtoFelix
Copy link

@SubtoFelix SubtoFelix commented Jan 23, 2025

The code in the function has been refactored to reduce its cognitive complexity from 21 to 15. New variables were added, if statements were reduced, and a helper function was declared to accomplish this task. Resolves #119. My coverage indicates that some lines in src/meta/errors.js got uncovered; however, this is not related to the change I made in public/src/admin/manage/categories.js. As the code in src/meta/errors.js involves 404 errors and database issues, which is irrelevant to my changed code, which involves the drag and drop of categories in NodeBB admin page.

@SubtoFelix SubtoFelix closed this Jan 24, 2025
@SubtoFelix SubtoFelix reopened this Jan 24, 2025
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.

Refactoring code in public/src/admin/manage/categories.js
1 participant