ACS-11224 Migrate upload components to Angular control flow#11691
Merged
DenysVuika merged 29 commits intodevelopfrom Feb 26, 2026
Merged
ACS-11224 Migrate upload components to Angular control flow#11691DenysVuika merged 29 commits intodevelopfrom
DenysVuika merged 29 commits intodevelopfrom
Conversation
AleksanderSklorz
approved these changes
Feb 26, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Migrates upload-related Angular templates to the new control flow syntax, while removing legacy upload helpers (pipe/directive) and cleaning up public APIs/docs.
Changes:
- Migrated multiple templates from
*ngIf/*ngForto@if/@forand adjusted component standalone imports accordingly. - Removed
FileUploadErrorPipeandToggleIconDirective, replacing their behavior inFileUploadingListRowComponent. - Refactored/trimmed exported surface area (e.g.,
ContentModule, breadcrumb module export) and updated docs and tooling settings.
Reviewed changes
Copilot reviewed 41 out of 43 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Adds React deps and bumps webpack versions. |
| lib/core/src/lib/viewer/components/viewer.component.spec.ts | Adds MatIconTestingModule and minor formatting cleanup. |
| lib/core/src/lib/pipes/decimal-number.pipe.ts | Inlines DecimalNumberModel as an interface in the pipe file. |
| lib/core/src/lib/models/public-api.ts | Stops exporting decimal-number.model. |
| lib/core/src/lib/models/decimal-number.model.ts | Removes the DecimalNumberModel class. |
| lib/content-services/src/lib/viewer/components/alfresco-viewer.component.spec.ts | Adds MatIconTestingModule to testbed imports. |
| lib/content-services/src/lib/upload/upload.module.ts | Removes FileUploadErrorPipe and ToggleIconDirective from module declarations. |
| lib/content-services/src/lib/upload/public-api.ts | Removes exports for the toggle-icon directive and upload error pipe. |
| lib/content-services/src/lib/upload/pipes/file-upload-error.pipe.ts | Deletes the upload error pipe implementation. |
| lib/content-services/src/lib/upload/pipes/file-upload-error.pipe.spec.ts | Deletes unit tests for the removed pipe. |
| lib/content-services/src/lib/upload/directives/toggle-icon.directive.ts | Deletes the toggle-icon directive implementation. |
| lib/content-services/src/lib/upload/directives/toggle-icon.directive.spec.ts | Deletes unit tests for the removed directive. |
| lib/content-services/src/lib/upload/components/upload-button.component.ts | Drops CommonModule from standalone imports. |
| lib/content-services/src/lib/upload/components/upload-button.component.html | Migrates upload button template to @if control flow. |
| lib/content-services/src/lib/upload/components/file-uploading-list.component.ts | Switches from CommonModule to NgTemplateOutlet import. |
| lib/content-services/src/lib/upload/components/file-uploading-list.component.html | Replaces ngFor template usage with @for + ngTemplateOutlet. |
| lib/content-services/src/lib/upload/components/file-uploading-list-row.component.ts | Replaces directive/pipe usage with internal state + helper method. |
| lib/content-services/src/lib/upload/components/file-uploading-list-row.component.spec.ts | Adds tests for the new helper/state logic. |
| lib/content-services/src/lib/upload/components/file-uploading-list-row.component.html | Migrates to @if and replaces pipe/directive usage. |
| lib/content-services/src/lib/upload/components/file-uploading-dialog.component.ts | Switches focus logic to @ViewChild ref; drops CommonModule. |
| lib/content-services/src/lib/upload/components/file-uploading-dialog.component.html | Migrates template to @if control flow and restructures sections. |
| lib/content-services/src/lib/content.module.ts | Removes several directives/components from ContentModule declarations/exports. |
| lib/content-services/src/lib/content-node-selector/content-node-selector.component.html | Trims trailing whitespace in translate pipe usage. |
| lib/content-services/src/lib/common/services/people-content.service.spec.ts | Inlines fakeEcmUser mock and adds typings. |
| lib/content-services/src/lib/common/public-api.ts | Stops exporting the ECM user mock from common public API. |
| lib/content-services/src/lib/common/mocks/ecm-user.service.mock.ts | Deletes the ECM user mock file. |
| lib/content-services/src/lib/breadcrumb/public-api.ts | Stops exporting BreadcrumbModule. |
| lib/content-services/src/lib/breadcrumb/dropdown-breadcrumb.component.ts | Drops CommonModule from standalone imports. |
| lib/content-services/src/lib/breadcrumb/dropdown-breadcrumb.component.html | Migrates to @if/@for control flow and null-safe name rendering. |
| lib/content-services/src/lib/breadcrumb/breadcrumb.module.ts | Deletes deprecated BreadcrumbModule. |
| lib/content-services/src/lib/breadcrumb/breadcrumb.component.ts | Drops CommonModule from standalone imports. |
| lib/content-services/src/lib/breadcrumb/breadcrumb.component.html | Migrates to @if/@for control flow and null-safe name rendering. |
| docs/versionIndex.md | Removes references to deleted pipe/directive docs. |
| docs/core/pipes/decimal-number.pipe.md | Updates title/linking and type reference for DecimalNumberModel. |
| docs/content-services/pipes/file-upload-error.pipe.md | Deletes documentation page for removed pipe. |
| docs/content-services/directives/toggle-icon.directive.md | Deletes documentation page for removed directive. |
| docs/content-services/components/upload-drag-area.component.md | Removes “see also” link to removed pipe doc. |
| docs/content-services/components/upload-button.component.md | Removes “see also” link to removed pipe doc. |
| docs/content-services/components/file-uploading-dialog.component.md | Removes “see also” link to removed pipe doc. |
| docs/README.md | Removes entries for deleted directive/pipe from docs index. |
| .vscode/settings.json | Adjusts Stylelint config path resolution for VS Code. |
| .nvmrc | Bumps Node version used via nvm. |
Comments suppressed due to low confidence (5)
package.json:1
- The
react/react-domversions^19.2.4look invalid (React 19 has not typically shipped with a 19.2.x line). If these are intended, please confirm the versions exist in npm; otherwise pin to an existing React 19 version (or remove if not required by this workspace) to avoid install failures.
package.json:1 - The
react/react-domversions^19.2.4look invalid (React 19 has not typically shipped with a 19.2.x line). If these are intended, please confirm the versions exist in npm; otherwise pin to an existing React 19 version (or remove if not required by this workspace) to avoid install failures.
lib/core/src/lib/pipes/decimal-number.pipe.ts:1 - This change converts
DecimalNumberModelfrom an exported class (constructible at runtime) into an interface (type-only). Any external consumers that instantiatednew DecimalNumberModel(...)will now break at runtime/compile-time. Consider keeping a backwards-compatible exported symbol (e.g., reintroduce aDecimalNumberModelclass or provide a deprecated class wrapper), and ensure it remains available from the prior public entry point if this is a library API.
lib/core/src/lib/models/public-api.ts:1 - Removing the
decimal-number.modelre-export changes the library's public surface area and will break imports likefrom '@.../models'. If the intent is only to refactor internals, consider continuing to exportDecimalNumberModelfrommodels/public-api.ts(even if it becomes a type alias) and deprecate it with a migration path.
lib/content-services/src/lib/upload/components/file-uploading-dialog.component.ts:61 @ViewChildproperties are assigned by Angular after construction; marking this propertyreadonlyis misleading (and can confuse future refactors where assignment is needed). Consider droppingreadonlyand using a conventional optional/definite-assignment pattern for ViewChild fields.
@ViewChild('uploadDialog', { read: ElementRef })
private readonly uploadDialogRef: ElementRef<HTMLElement> | undefined;
lib/content-services/src/lib/upload/components/file-uploading-list-row.component.html
Outdated
Show resolved
Hide resolved
- Removed the FileUploadErrorPipe and its associated tests to streamline error handling. - Updated the upload button and file uploading list row components to enhance translation handling for error messages. - Adjusted HTML templates to ensure consistent spacing in static titles. - Minor refactoring in the file uploading list row component to introduce a new method for error key retrieval.
- Deleted the Toggle Icon directive implementation and its associated tests. - Updated documentation to reflect the removal of the directive. - Adjusted components to eliminate dependencies on the Toggle Icon directive.
- Introduced unit tests for the toggle icon state in the file uploading list row component. - Added tests for mouse enter, mouse leave, focus, and blur events to ensure correct state management. - Verified independent state handling for toggleIconState and toggleIconCancelState. [ci:force]
- Modified the aria-label attribute in the file uploading list row component to improve translation handling for upload error messages. - Removed unnecessary translation parameter to streamline the error message retrieval process.
- Updated the getFileUploadErrorKey method to accept an optional errorCode parameter, allowing for better handling of undefined or null values. - This change improves the robustness of error message generation in the file uploading list row component.
- Introduced unit tests for the getFileUploadErrorKey method in the file uploading list row component. - Added tests for various error codes (500, 404, 403) and scenarios for null, undefined, and zero values to ensure correct key format retrieval. [ci:force]
- Deleted the File Upload Error Pipe documentation and its references from various components and the version index. - Updated README and component documentation to reflect the removal of the pipe, ensuring consistency across the documentation.
- Deleted the DecimalNumberModel class from the models directory to streamline the codebase. - Updated public API exports to remove references to DecimalNumberModel. - Replaced the class with an interface in the decimal-number.pipe.ts file to maintain functionality while simplifying the implementation.
- Removed several unused components from the ContentModule, including TreeViewComponent, ContentTypeDialogComponent, and others, to streamline the module. - Updated the module's exports and imports accordingly to reflect these changes, enhancing maintainability.
…lity and functionality - Updated breadcrumb.component.html and dropdown-breadcrumb.component.html to use structural directives for better readability and maintainability. - Simplified the rendering of previous nodes and last nodes in the breadcrumb, ensuring proper handling of optional values. - Removed unnecessary imports in dropdown-breadcrumb.component.ts to streamline the component's dependencies.
…ports - Enhanced the breadcrumb.component.html for better readability by restructuring the template and using structural directives. - Streamlined the rendering logic for previous and last nodes in the breadcrumb. - Removed the unused CommonModule import from breadcrumb.component.ts to simplify dependencies.
- Deleted the BreadcrumbModule and its associated directives to streamline the ContentModule. - Updated ContentModule imports and exports to reflect the removal, enhancing maintainability.
- Deleted the export statement for BreadcrumbModule in public-api.ts to reflect its removal from the codebase, enhancing clarity and maintainability.
- Deleted the ecm-user.service.mock file to eliminate unused mock data, enhancing code clarity. - Updated public API exports to remove the reference to the deleted mock file. - Introduced the fakeEcmUser object directly in the people-content.service.spec.ts for improved test isolation and maintainability.
- Revised the Decimal Number Pipe documentation to improve clarity by removing unnecessary links and formatting. - Enhanced the description of the `digitsInfo` parameter and updated the Result section for better readability.
…plates for clarity - Updated dropdown-breadcrumb.component.html to track node IDs instead of nodes for better performance. - Refactored file-uploading-list-row.component.html to enhance readability by restructuring conditional rendering and simplifying the template logic.
- Modified the file-uploading-list.component.html to track file IDs instead of file objects for improved performance and clarity in rendering.
…ndering - Corrected the closing tag syntax in breadcrumb.component.html to ensure proper rendering of the breadcrumb items.
- Replaced switch-case syntax with if-else statements in breadcrumb.component.html to enhance readability and maintainability of the template logic. - Streamlined the rendering of breadcrumb items while preserving functionality.
- Reorganized conditional rendering in file-uploading-dialog.component.html to enhance readability by using if-else statements. - Updated upload-button.component.html to streamline the label rendering logic, ensuring consistent display of static titles and translated text.
…ved path resolution - Changed the stylelint.configFile path to use the workspace folder variable for better compatibility across different environments. - Added stylelint.configBasedir to ensure correct base directory resolution for stylelint configuration.
…handling - Added a template reference variable to the file-uploading-dialog component for better access to the dialog element. - Updated focus handling in ngOnInit to use the new reference, simplifying the code and improving clarity. - Streamlined property initializations for consistency.
Revert "chore: update Node.js version in .nvmrc to 24.13.0" This reverts commit b80309f. chore: clean up package-lock.json by removing redundant workspace dependencies - Removed duplicate entries for workspace dependencies under @nx/cypress and @nx/storybook. - Streamlined the structure of the package-lock.json for better clarity and maintainability. chore: update Node.js version in .nvmrc to 24.14.0 chore: update webpack and acorn dependencies in package.json and package-lock.json - Upgraded webpack from 5.104.1 to 5.105.3 for improved performance and features. - Updated acorn from 8.15.0 to 8.16.0 to incorporate the latest fixes. - Adjusted enhanced-resolve and watchpack versions for compatibility. chore: add React and ReactDOM dependencies to package.json and package-lock.json - Included React version 19.2.4 and ReactDOM version 19.2.4 to enhance UI capabilities. - Updated package-lock.json to reflect the new dependencies and their integrity checks.
- Updated the file-uploading-list-row.component.html to enhance error display by introducing a variable for the translated error label. - Simplified the aria-label and title attributes to use the new variable, improving readability and maintainability of the template.
d344051 to
fc0586d
Compare
- Modified the caching keys in the action.yml file to use a consistent prefix for NPM dependencies, improving cache management and retrieval efficiency.
|
| "nock": "13.5.5", | ||
| "nx": "22.4.1", | ||
| "prettier": "3.6.2", | ||
| "react": "^19.2.4", |
Contributor
There was a problem hiding this comment.
Why do we need react?
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.



Note: this PR is 1 or N PRs to migrate to the control flow
ACS-11224: various upgrades to control flow
FileUploadErrorPipeand its associated tests to streamline error handling.