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: Convert Variables to let and const, Improve configuration handling in app.loadConfig() #319

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

Commits on Jul 22, 2023

  1. Configuration menu
    Copy the full SHA
    c23a093 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b48b47d View commit details
    Browse the repository at this point in the history
  3. Refactor: Improve Configuration Handling in app.loadConfig()

    In this commit, I refactored the app.loadConfig() function to improve the handling of configurations. The changes include:
    
    1. Extracted loadNewConfig(), setDefaultValues(), checkConfigChanges(), and checkPortChanges() functions for better code organization and reusability.
    2. Set default values for siteName, enableChangelogs, and boardSize if not specified in the configuration.
    3. Ensured colors are stored as uppercase unique values in app.colours.
    4. Improved the conditional checks for changes in the configuration, database, board size, OAuth settings, and port number.
    5. Restructured the code to handle different scenarios more efficiently.
    
    These refactorings enhance the readability, maintainability, and overall quality of the codebase. The core functionality of app.loadConfig() remains intact, but the code is now more organized and easier to understand.
    Dalia-Alawneh committed Jul 22, 2023
    Configuration menu
    Copy the full SHA
    7a92068 View commit details
    Browse the repository at this point in the history