Repository navigation
refactor(Application): Migrate shared and library UI components to Angular signals and OnPush change detection - #2360
Merged
Merged
Conversation
…ls and add unit test
…s with corresponding tests
…mprehensive unit tests
…ehensive unit tests
|
Coverage Impact Unable to calculate total coverage change because base branch coverage was not found. Modified Files with Diff Coverage (8) 🤖 Increase coverage with AI coding...🚦 See full report on Qlty Cloud » 🛟 Help
|
Member
Author
|
🎉 This PR is included in version 5.249.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.

Changes
Modernize several shared and library UI components to take advantage of Angular signals, signal-based queries/outputs, fine-grained reactivity, and
OnPushchange detection:@Input()and@Output() EventEmitterwithinput(),input.required(),output(), andbooleanAttributetransforms for boolean inputs.@ContentChildand@ViewChildwithcontentChild()andviewChild().ngOnInitandngOnChangesstate syncing with declarativecomputed()signals andeffect()blocks, leveragingtakeUntilDestroyed()for RxJS stream cleanup.OnPushChange Detection: AddedchangeDetection: ChangeDetectionStrategy.OnPushacross components for improved runtime performance.CommonModuleimports with specific directives (NgClass,NgTemplateOutlet,RouterLink) and adopted modern built-in template control flow (@if/@else,@for).Components Updated:
SaveIndicatorComponent(src/app/modules/shared/save-indicator/): Migrated to signal inputs andOnPush.ProjectLanguageChooserComponent(src/app/modules/project/project-language-chooser/): Migrated inputs, selections, and locale mappings to signals andcomputed().ArchiveProjectsButtonComponent(src/app/modules/library/archive-projects-button/): Converted inputs and action outputs toinput()/output().SelectAllItemsCheckboxComponent(src/app/modules/library/select-all-items-checkbox/): ReplacedngOnChangescalculation of selection status withcomputed(), and converted selection events tooutput().BlurbComponent(src/app/modules/shared/blurb/): Converted inputs and content projection templates toinput()andcontentChild().LibraryProjectDisciplinesComponent(src/app/modules/library/library-project-disciplines/): Converted disciplines and translations to signals andcomputed().CallToActionComponent(src/app/modules/shared/call-to-action/): Migrated 8 inputs and 2 template queries to signals, simplified template branching with@else, and addedbooleanAttributecoercion.SearchBarComponent(src/app/modules/shared/search-bar/): Converted inputs to signals, output tooutput({ alias: 'update' }), replacedngOnChangeswith reactiveeffect()syncing, and addedtakeUntilDestroyed().Test
fixture.componentRef.setInput(...)andfakeAsync/tick:save-indicator.component.spec.ts: verified saving, saved, and error state indicators.project-language-chooser.component.spec.ts: verified language selection emissions and label rendering.archive-projects-button.component.spec.ts: verified button states and output emissions.select-all-items-checkbox.component.spec.ts: verified indeterminate, checked, and unchecked states and click event outputs.blurb.component.spec.ts: verified input bindings, image rendering, and projected template refs.library-project-disciplines.component.spec.ts: verified discipline tags and localization.call-to-action.component.spec.ts: verified internalrouterLink, external links, SVG icons, and custom template projections.search-bar.component.spec.ts: verified debounced search emission, input/disable synchronization via effects, and clear button behavior.