Skip to content

feat: Changed the constants to variables under account/settings #1249

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

Open
wants to merge 1 commit into
base: feature/distributed-demo
Choose a base branch
from

Conversation

Microchesst
Copy link
Contributor

@Microchesst Microchesst commented May 19, 2025

Add configurable GitLab settings in user account section

Type of Change

  • New feature
  • Bug fix
  • Documentation update
  • Refactoring
  • Security patch
  • UI/UX improvement

Description

This PR addresses issue #1211 by converting hardcoded GitLab constants into settings that users can modify through a new settings form in the Account section.
Key changes include:

Created a new settings Redux slice to manage GitLab configuration

  • Added persistent storage of settings using localStorage
  • Replaced direct constant usage with getter functions throughout the codebase
  • Implemented a settings form UI in the Account section
  • Updated tests to use mocks for the new constant getter functions

These changes allow users to customize:

  • GitLab group name (GROUP_NAME)
  • Digital Twin directory (DT_DIRECTORY)
  • Common library project ID (COMMON_LIBRARY_PROJECT_ID)
  • Runner tag for CI execution (RUNNER_TAG)

Testing

  • Added unit tests to verify the settings slice functions correctly
  • Updated existing tests to use the new constant getter functions
  • Manually tested the settings form to ensure values persist between sessions
  • Verified that changes to settings properly affect GitLab operations

Impact

  • Improves flexibility by allowing users to customize GitLab interactions
  • Enhances user experience by providing a UI to modify these settings
  • Helps with different GitLab configurations without code changes
  • Settings are immediately applied after saving

Additional Information

The settings form includes a reset to defaults option in case someone need to revert their changes.


Checklist

  • My code adheres to the coding and style guidelines of the project.
  • I have added tests for all the new code and any changes made to existing code.

@prasadtalasila
Copy link
Contributor

@Microchesst Please update the settings page as given in this snapshot

settings

Also, the code seems non-functional. The changes made in this tab are not reflected on the digital twins preview page.

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

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.

2 participants