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

feat: split up management file #592

Merged
merged 1 commit into from
Dec 17, 2024
Merged

feat: split up management file #592

merged 1 commit into from
Dec 17, 2024

Conversation

Dominikkq
Copy link
Collaborator

What:
Split up management.html file into multiple file
Refactored getConfig

Task:
GBI-2370

Copy link

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Manifest Files

Copy link

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think most of the functions defined inside the listener of DOMContentLoaded can be moved outside the listener, the listener should be only for calling the functions

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not an AC, will make a separate task for these changes.

Copy link
Collaborator

Choose a reason for hiding this comment

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

The purpose of the split is to increase the clarity and maintainability of the files of the management UI, copy-pasting the code inside of the management UI leave us in more or less the same situation as if the split never happened. Therefore, it makes sense that this change should be part of this task and not of a separated one.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We should not modify AC of a task after the PR is already out in review.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I recommend to try to minimize the access to data object from inside the functions, it should be received as a parameter instead so we don't use it as a global variable, that will make the function more readable and less error prone

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not an AC, will make a separate task for these changes.

Copy link
Collaborator

@Luisfc68 Luisfc68 Dec 16, 2024

Choose a reason for hiding this comment

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

The purpose of the split is to increase the clarity and maintainability of the files of the management UI. Using a global variable inside most of the management UI functions is the oposite from the purpose of the task, as it increases the chances of generating side-effects on the call to those functions, so in that case we would degrade the code quality rather than increasing it, as it was originally intended.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Purpose of this task was to split up the management.html and getConfig function. Code refactorings can be done in a separate task where it wont impact visibility of this PR's code changes. If I add refactoring here it will be difficult to see new code from code that has been moved during split.

@Dominikkq Dominikkq requested a review from Luisfc68 December 16, 2024 09:27
Copy link
Collaborator

@Luisfc68 Luisfc68 left a comment

Choose a reason for hiding this comment

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

Used the same conversations from the previous review

@Dominikkq Dominikkq requested a review from Luisfc68 December 16, 2024 13:22
@Dominikkq Dominikkq merged commit 0d6558d into flyover-2.1.1 Dec 17, 2024
7 checks passed
@Dominikkq Dominikkq deleted the feat-GBI-2370 branch December 17, 2024 12:37
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.

3 participants