* [ACS-12451] Add missing ADF upgrade guides * [ACS-12451] CR fix * [ACS-12451] CR fixes
16 KiB
Title
| Title |
|---|
| Upgrading from ADF v7.0 to v8.0 |
Upgrading from ADF v7.0 to v8.0
This guide provides instructions on how to upgrade your v7.0.0 ADF projects to v8.0.0.
v8.0.0 is a major release. It moves ADF from Angular 17 to 19 (via internal 18 → 19 steps), upgrades
@ngx-translate/core to v16 and @alfresco/js-api to v9, upgrades pdf.js from 3.x to 5.x, and
performs a large theming clean-up (the prebuilt themes and the ADF colour/variable SCSS partials are removed).
Budget time to migrate your Angular version, your theme, your i18n bootstrap, and your PDF viewer worker asset.
Before you begin
Always perform upgrades on a "clean" project state, back up your changes or make a project backup. Because this is a major version with many breaking changes, build, run and re-test your application after upgrading.
Contents
- Library updates
- Major platform changes
- Breaking changes
- Deprecations
- New components and features
- Behavioural changes
Library updates
Update the package.json file with the latest library versions:
{
"dependencies": {
"@alfresco/adf-core": "8.0.0",
"@alfresco/adf-content-services": "8.0.0",
"@alfresco/adf-process-services": "8.0.0",
"@alfresco/adf-process-services-cloud": "8.0.0",
"@alfresco/adf-insights": "8.0.0",
"@alfresco/adf-extensions": "8.0.0",
"@alfresco/js-api": ">=9.0.0",
"@ngx-translate/core": ">=16.0.0"
}
}
Clean your old distribution and dependencies by deleting node_modules and package-lock.json, then reinstall:
npm install
Major platform changes
| Area | 7.0.0 | 8.0.0 |
|---|---|---|
| Angular / Material / CDK | 17.1 | 19.2 |
| TypeScript | 5.3 | 5.8.2 |
| zone.js | 0.14.8 | 0.15.0 |
| Nx | 20.0 | 20.8 |
@ngx-translate/core |
14/15 | >= 16.0.0 |
apollo-angular / @apollo/client |
6.0 / 3.11 | 10.0.3 / 3.13 |
pdfjs-dist |
3.3 | 5.1.91 |
@alfresco/js-api |
>= 8.0.0 | >= 9.0.0 |
Angular Material remains on the M2 (Material 2) theming APIs in 8.0.0 — the Material Design 3 migration was
deferred. Move your own application to Angular 19 / TypeScript 5.8 / zone.js 0.15 / Nx 20.8 in lockstep, and
upgrade apollo-angular (a major bump) if you use GraphQL.
The declared engines.node floor is unchanged (>=18.0.0), but the version the libraries are built and tested
on moved from Node 20 to Node 22 (.nvmrc 20.18.1 → 22.14.0) — align your build/CI Node version.
Breaking changes
Angular 19 and standalone
- Migrate your application to Angular 19. Standalone is the default in Angular 19, so the redundant
standalone: trueflags were dropped from ADF components. Any app NgModule that still declares ADF components must import them as standalone instead.
Internationalisation (i18n)
@ngx-translate/core v16 changed how translation is wired, and CoreModule was modernised:
CoreModuleno longer re-exportsTranslateModule. Components that used thetranslatepipe via a transitiveTranslateModulemust now import ngx-translate's standaloneTranslatePipe(or provide translation themselves).CoreModule.forRoot()no longer auto-providesMomentDateAdapter,TranslateStore, orTranslateService(translation now usesprovideTranslateService), and no longer re-exportsHttpClientModule/ the XSRF module (HTTP is wired viaprovideHttpClient(...)). Provide these yourself if you depended on them transitively.- Prefer the new standalone providers (see New components and features):
provideI18N(...),provideAppConfig(),provideShellRoutes(...)(ShellModuleis deprecated),provideHttpClient().
Theming clean-up
The ADF theming layer was significantly reduced (AAE-34390/AAE-34439/AAE-34458). This is the biggest
source of build/visual breakage for apps with custom themes:
- Prebuilt themes were removed — the
lib/core/src/lib/styles/prebuilt/*themes (adf-blue-orange,adf-indigo-pink, etc.) no longer ship. Replace any@import '@alfresco/adf-core/prebuilt-themes/...'with a custom theme (mat.define-palette+mat.define-light-theme+@include alfresco-material-theme($theme)) or an Angular Material prebuilt theme. - The colour / variable SCSS partials were deleted:
_colors.scss(palettes$alfresco-ecm-blue,$alfresco-accent-orange,$alfresco-warn, the$black-*/-white-*-opacityhelpers, …),_reference-variables.scss(all$adf-ref-*), and_components-variables.scss(theadf-components-variables($theme)mixin). Redefine any of these you referenced in your own theme. - Many
--adf-*component CSS custom properties were removed (card-view, info-drawer tabs, people/group-cloud, header icon-button, edit-task/process-filter, package-list, about-*, identity-user-info, etc.) — these are no longer overridable via CSS variables. A small set of metadata/error/secondary-button/chip/sidenav custom properties is retained. - Removed mixins:
adf-components-variables($theme)andadf-snackbar-theme. The snackbar classes.adf-error-snackbar/.adf-warning-snackbar/.adf-info-snackbarare no longer coloured by ADF — style them in your app. - Default font changed from
MulitoRoboto. - Form widgets no longer render a custom
.adf-asteriskspan for required fields (the native Material required marker is used); a new.adf-form-field-inputclass was added, with placeholder-conditionalfloatLabel. - Docs removed:
basic-theming.md,typography.md, and the "using a prebuilt theme" section oftheming.md.
PDF viewer (pdf.js 5)
pdfjs-dist was upgraded from 3.x to 5.1.91, which changes how the worker is loaded:
- The worker asset was renamed from
pdf.worker.min.jstopdf.worker.min.mjs. Update your build's asset copy (node_modules/pdfjs-dist/build/pdf.worker.min.mjs). The component now fetches the worker and loads it via a BlobworkerPort(to tolerate servers that return the wrong MIME type for.mjs). - New overridable injection tokens
PDFJS_MODULEandPDFJS_VIEWER_MODULE. - pdf.js scale values are now strings (
isSameScale(oldScale: string, newScale: string)), and the viewer container now also carries the nativepdfViewerclass.
Viewer components
ViewerRenderComponent@Input() isLoadingwas removed — loading state is now managed internally and cleared via child-renderer completion outputs / a new publicmarkAsLoaded(). Remove any[isLoading]binding. Custom viewer/preview-extension components should emit acontentLoadedoutput (new onTxtViewerComponentandPreviewExtensionComponent;imageLoaded/canPlay/pagesLoadedon the built-in renderers) to clear the spinner.AlfrescoViewerComponent—readOnlyis now a public@Input()(previously an internal permission-derived field; the permission result moved to an internalcanEditNode). New@Input() showToolbarDividers(also on coreViewerComponent, which gained anadf-viewer-inlinehost class when not in overlay mode).
API signature and model changes
TagService.createTags(tags)now returnsObservable<TagEntry | TagPaging>(wasObservable<TagEntry[]>). Read results viaresult.list.entries[i].entry.tag; importTagPagingfrom@alfresco/js-api. Therefreshoutput now emits the paging object.AspectListServicewas reworked —getAspects(),getStandardAspects()andgetCustomAspects()were removed/repurposed.getAspects(whiteList, opts?)now takes a whitelist and returnsAspectPaging(notAspectEntry[]); newgetAllAspects(...)returns a newCustomAspectPaging. New exportedStandardAspectsWhere/CustomAspectsWhere.- Knowledge Retrieval / Search-AI models changed (
@alfresco/js-api):AiAnswer.questionId→question,AiAnswer.references→objectReferences(newAiAnswerObjectReference), newAiAnswer.complete;AiAnswerReference.referenceTextwas replaced byrank/rankScore. FormBaseComponent.hasVisibleOutcomesgetter was removed — outcome visibility now lives in a new exported pure helperisOutcomeButtonVisible(...)(from the newform/buttons-visibilitypublic export).UserTaskCloudComponent.taskCompletednow emitsboolean(the "open next task" flag) instead of the task idstring;TaskScreenCloudComponent.taskCompleted/UserTaskCustomUi.taskCompletedwere retyped.WidgetComponent.isRequired()return type narrowed fromanytoboolean(returnsfalse, notnull, when not required).- APS (classic) task-filter methods renamed:
TaskFilterService.getInvolvedTasksFilterInstance→getOverdueTasksFilterInstance,getQueuedTasksFilterInstance→getUnassignedTasksFilterInstance; the default filters changed from "Involved/Queued" to "Overdue/Unassigned" (existing user filters are auto-migrated on load). - Dropdown form fields:
FormFieldModel.valuemay now be the full option object{ id, name }rather than a string id.
Constructor / DI changes
Only relevant if you manually instantiate or subclass these:
NodeFavoriteDirective/LibraryFavoriteDirectiveconstructors gainedNotificationService.AlfrescoApiLoaderServiceconstructor gained aSecurityOptionsLoaderServicedependency.
Removed roles and DOM hooks
Update e2e/CSS selectors:
- The datatable row checkbox no longer has
role="checkbox"(usedata-adf-datatable-row-checkbox/[attr.aria-checked]). - The add-user/group search results no longer have
role="listbox". - The viewer file-name spans
.adf-viewer__display-name-without-extension/-extensionwere replaced by a single span; a new publicViewerComponent.displayName(middle-ellipsised at 50 chars) is available.
Deprecations
These still work in 8.0.0 but are slated for removal — migrate when you upgrade:
ShellModule→ useprovideShell(opts?)(@alfresco/adf-core/shell), which takes{ routes, appService?, authGuard?, navBar? }and wires the whole shell (see New components and features).FormBaseModule(@alfresco/adf-core) → import the standalone form components directly.CoreTestingModule(@alfresco/adf-core) → use the standalone components in your test beds.ProcessServicesCloudModule(@alfresco/adf-process-services-cloud) → import the standalone components directly, or replicate the module with providers:providers: [ provideTranslations('adf-process-services-cloud', 'assets/adf-process-services-cloud'), provideCloudPreferences(), provideCloudFormRenderer(), { provide: TASK_LIST_CLOUD_TOKEN, useClass: TaskListCloudService } ]- Dialog / snackbar NgModules are now
@deprecated— import the standalone component directly instead of the module:ConfirmDialogModule,EditJsonDialogModule,UnsavedChangesDialogModule,SnackbarContentModule(@alfresco/adf-core) andDownloadZipDialogModule(@alfresco/adf-content-services).
(The theming layer / prebuilt themes are covered under Theming clean-up.)
New components and features
provideI18N(config?)(core) — standalone i18n bootstrap:provideI18N({ defaultLanguage: 'en', assets: [['app', '/assets/i18n']] }). WrapsprovideTranslateService+provideTranslations(both still available).provideShell(opts?)(@alfresco/adf-core/shell) — the recommended replacement for the deprecatedShellModule; it takes{ routes, appService?, authGuard?, navBar? }and wires the whole shell (calling the narrowerprovideShellRoutes(routes)helper internally). PlusprovideAppConfig(),provideCloudPreferences()andprovideCloudFormRenderer()— standalone provider helpers.auth.withCredentials— a newapp.config.jsonkey (AppConfigValues.AUTH_WITH_CREDENTIALS) that controls the HTTPwithCredentialsflag, so it can be disabled for identity providers that reject credentials. A newSecurityOptionsLoaderService(content-services) applies it early during bootstrap.- New outputs / methods:
CommentsComponent/NodeCommentsComponent@Output() commentAdded;ProcessContentService.getContentRenditionTypePreview(contentId);StorageService.getItems();TaskFilterService.updateTaskFilter(...). - Records management: new
FilePlansApi.getFilePlanRoles(...)plusFilePlanRole*models (js-api), used to verify legal-hold capabilities and hide the RM library join button when unauthorised. - Process / forms: an "Open next task" checkbox for screen-based tasks (
UserTaskCloudComponent/TaskScreenCloudComponentgained@Input() showNextTaskCheckbox,isNextTaskCheckboxCheckedand@Output() nextTaskCheckboxCheckedChanged);ProcessDefinitionCloud.constantValues(newConstantValuestype);rootProcessInstanceIdpropagated to dynamic task screens; the Data Table widget now renders empty tables and a preview placeholder instead of erroring;FormCloudComponent.showCompleteButtoninput. - Categories dialog now validates prohibited symbols (
: " \ | < > / ? *) and trailing dots. - Favorite directives now show snackbar notifications; the
<html lang>attribute now updates on language change.
Behavioural changes
| Area | Change |
|---|---|
| Document list | Navigating to a new folder now resets the active filterValue; custom column visibility/order/width persist across refresh. |
| Forms | Hidden required dropdowns are no longer invalid; clearing a numeric field stores null (not ''); required dropdowns show a single asterisk; async form enrichment now populates date fields and hides the spinner correctly; onProcessFinish fires reliably from onFormLoaded. |
| Content metadata | Content in non-edited panels stays visible while another panel is edited (new isPanelEditing(panelTitle) / editedPanelTitle). |
| Aspect list | All aspects are fetched (paged) when the first call doesn't return them all. |
| Viewer | Loading state is driven by renderer completion; PDF documents scale correctly; the image viewer is no longer cropped; the file name is truncated with a tooltip. |
| Accessibility | Loading bars/spinners gained aria labels; nested interactive controls were removed from the datatable; form tab navigation uses a focus trap. |