Merged
Conversation
package.jsにおいて、散在していたモジュールスコープ変数を単一のpackageContextオブジェクトに集約しました。 これにより、以下の改善が期待されます。 - コードの可読性と推論の容易さの向上 - テストの独立性と安定性の向上 - 将来的な変更による副作用のリスク低減 関連するテストファイルも更新し、変更の正当性を検証済みです。
This change refactors the 'collectRelatedSet' function to be a pure function, taking its dependencies as arguments instead of relying on the 'packageContext' object. This improves testability and decouples the logic from the application state.
This change refactors the 'buildAggregationStatsForFilters' and 'buildAggregationStatsForRelated' functions to be pure, taking their dependencies as arguments instead of relying on the 'packageContext' object. This continues the effort to improve testability and decouple logic from application state.
This change extracts the complex data filtering logic from 'renderPackageDiagram' into a new pure function 'getVisibleDiagramElements'. This improves testability by isolating the logic from DOM side effects and makes the rendering function easier to understand.
This change introduces a 'dom' helper object to encapsulate direct DOM access for the 'renderRelatedFilterTarget' function. This makes the DOM dependency explicit and improves testability by allowing easier mocking of DOM interactions.
This change refactors the 'getOrCreateDiagramErrorBox', 'showDiagramErrorMessage', and 'hideDiagramErrorMessage' functions to use a 'dom' helper object. This encapsulates direct DOM access, making the DOM dependency explicit and improving testability by allowing easier mocking of DOM interactions for error display.
This change refactors the 'renderDiagramSvg' function to use a 'dom' helper object. This encapsulates direct DOM access for diagram content manipulation and attribute removal, improving testability by allowing easier mocking of DOM interactions.
This change refactors the 'getPackageSummaryData' function to use 'dom' helper methods ('getPackageDataScript' and 'getNodeTextContent'). This encapsulates direct DOM access for retrieving initial package data, making the DOM dependency explicit and improving testability by allowing easier mocking of DOM interactions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.