* [ACS-12451] Add missing ADF upgrade guides * [ACS-12451] CR fix * [ACS-12451] CR fixes
16 KiB
Title
| Title |
|---|
| Upgrading from ADF v8.1.1 to v8.2.1 |
Upgrading from ADF v8.1.1 to v8.2.1
This guide provides instructions on how to upgrade your v8.1.1 ADF projects to v8.2.1 (covering the 8.2.0 and 8.2.1 releases).
Before you begin
Always perform upgrades on a "clean" project state, back up your changes or make a project backup. The steps below may involve code and theme changes — commit or back up your work first.
Contents
Library updates
Update the package.json file with the latest library versions:
{
"dependencies": {
"@alfresco/adf-core": "8.2.1",
"@alfresco/adf-content-services": "8.2.1",
"@alfresco/adf-process-services": "8.2.1",
"@alfresco/adf-process-services-cloud": "8.2.1",
"@alfresco/adf-insights": "8.2.1",
"@alfresco/adf-extensions": "8.2.1",
"@alfresco/js-api": ">=9.2.1"
}
}
Angular, Material, TypeScript, zone.js and Nx are unchanged from 8.1.1 (Angular 19.2). Clean node_modules and
package-lock.json, then npm install.
Breaking changes
Theming layer removed
The ADF SCSS theming layer was removed (AAE-38524). The public theming mixins alfresco-material-theme($theme)
and adf-core-theme($theme, $custom-css-variables) no longer exist, and neither do the _theming.scss /
_typography.scss entry points (the $alfresco-typography config is gone; material.theme.scss's
adf-material-theme() mixin was renamed to globals()). ADF now inherits colours and typography directly from
your application's Angular Material theme with no extra ADF theming step.
If your app did:
@import '~@alfresco/adf-core/theming';
@include alfresco-material-theme($theme); // or @include adf-core-theme($theme);
remove those includes. The --theme-* / --adf-theme-* CSS variables are no longer generated by ADF — if you
rely on them, define them yourself under :root, mapping to Angular Material's system variables (e.g.
--theme-primary-color: var(--mat-sys-primary);) as shown in the updated theming docs. The ADF prebuilt themes
were already removed in 8.0.0.
Removed deprecated components
The following long-deprecated items were removed (ACS-10178). Remove any imports/usages:
| Removed | Selector | Package |
|---|---|---|
LoginDialogComponent, LoginDialogComponentData, LoginDialogService |
adf-login-dialog |
@alfresco/adf-core |
AppListCloudComponent |
adf-cloud-app-list |
@alfresco/adf-process-services-cloud |
AppDetailsCloudComponent |
adf-cloud-app-details |
@alfresco/adf-process-services-cloud |
APP_LIST_CLOUD_DIRECTIVES (const) |
— | @alfresco/adf-process-services-cloud |
FormDefinitionSelectorCloudComponent |
adf-cloud-form-definition-selector |
@alfresco/adf-process-services-cloud |
FormDefinitionSelectorCloudService, FormDefinitionSelectorCloudServiceInterface |
— | @alfresco/adf-process-services-cloud |
Removed deprecated auth methods
The ECM/BPM-specific auth methods deprecated in 8.1.1 were removed (ACS-9768). Migrate:
isEcmLoggedIn()/isBpmLoggedIn()→isLoggedIn()(useisECMProvider()/isBPMProvider()for the provider type).getEcmUsername()/getBpmUsername()→getUsername().BasicAlfrescoAuthService.getTicketEcm()/getTicketBpm()were also removed.
These were removed from AuthenticationServiceInterface, BaseAuthenticationService, AuthenticationService,
BasicAlfrescoAuthService and OidcAuthenticationService.
Clipboard tooltip
ClipboardDirective now uses Angular Material's tooltip instead of a bespoke component:
ClipboardComponentwas removed (along with theadf-copy-content-tooltipselector and the.adf-copy-tooltipCSS /clipboard.theme.scss). Tests querying.adf-copy-tooltipmust switch toMatTooltipHarness.ClipboardDirectiveis nowstandalonewith aMatTooltiphost directive; its constructor changed (addsMatTooltipandTranslateService). Ensure Material animations are provided.
OAuth secret removed
The secret field was removed from the OAuth2 configuration (ACS-10592): from OauthConfigModel, the js-api
Oauth2Config, and app.config.schema.json. A client secret should never be shipped in a browser app; remove
oauth2.secret from your app.config.json. (The token endpoint no longer receives a client_secret.)
Dependency changes
event-emitter→eventemitter3(^5.0.1). TheEventEmittertype used byAuthenticationServiceand the ADF HTTP client (and js-api) now comes fromeventemitter3(new exportedEventEmitterInstance/EventEmitterEventstypes). Theon/off/once/emitAPI is compatible, but the type import origin changed.toPromise()→firstValueFrom/lastValueFrominternally (mechanical; single-emit sources, no behavioural change).- js-api peer requirement raised to
>= 9.2.1.
The
superagentHTTP client was not replaced — a replacement PR was reverted before 8.2.1, sosuperagentremains in place with no consumer impact.
Other API changes
ColumnsSelectorComponent.changeColumnVisibilitysignature changed from(dataColumn: DataColumn)to(event: MatSelectionListChange)(the columns list was rewritten tomat-selection-list).FormBaseComponent.completeTaskForm(outcome?)gained a secondoutcomeId?: stringargument (and outcome completion now requires the outcome'sid);FormCloudComponent.completeForm/completeTaskFormfollow suit. Subclasses overriding these must update.DisplayRichTextWidgetComponentconstructor changed (thesanitizerparam was removed; parsing moved to the newRichTextParserService).ReactiveFormWidgetinterface now requires afield: FormFieldModelmember; newMaybeReactiveFormWidgettype andFormFieldTypes.isReactiveWidget(...).MaxLengthFieldValidatorconstructor now takes optional(supportedTypes, maxLength);FORM_FIELD_VALIDATORSgained an entry that caps NUMBER fields at 10 digits.AmountWidgetComponentconstructor changed (addsCurrencyPipe,TranslationService);ADF_AMOUNT_SETTINGSwas widened to acceptObservable<AmountWidgetSettings> | AmountWidgetSettings; any customTranslationServicemust implement the newgetLocale().SearchFilterAutocompleteChipsComponentconstructor now requiresSitesService(for the new LOCATION facet).- Base
WidgetComponentno longer registers a host(click)binding — widgets that need it now declare their own. - The screen
screen-cloud.modelimport path moved undercomponents/screen-cloud/user-task-screen/(deep imports must update). DataTableCellComponent(the base cell class): the publiccomputedTitle: stringproperty was replaced by atitle = computed(...)signal (backed byprotected rawComputedTitle), andcomputeTitle()changed fromprivatetoprotected. Custom cells subclassing it should overrideprotected computeTitle()and readtitle().StartProcessCloudComponent: the public fieldcustomOutcomewas split intocustomOutcomeName+customOutcomeId, andonCustomOutcomeClicked(outcome)now takes aFormOutcomeEvent(wasstring);FormModel.selectedOutcomeis no longerreadonly.UserTaskCloudComponent.onCompleteTask()gained a second optionaltaskType?: UserTaskTypeargument.BasicAlfrescoAuthService.getTicketEcmBase64()return type narrowed fromstring | nulltostring.ProcessFilterCloudModel— most properties were widened to| nullandparentIdbecame non-optional (relevant to strict-typed consumers constructing the model).
Accessibility-driven changes
A large accessibility batch (ACS-10xxx) added aria labels/roles and keyboard handling. Most are additive, but a
few change the DOM or public members that tests/styles may depend on:
LibraryDialogComponent—@Output() successtype narrowed toEventEmitter<SiteEntry>;visibilityOptionis now astring(the option value, not the option object).NotificationHistoryComponent— itsstorageService/cdconstructor members are nowprivate(were public); the mark-as-read control changed from amat-menu-itemwithid="adf-notification-history-mark-as-read"to an icon button exposingdata-automation-id="adf-notification-history-mark-as-read"(theidwas removed).DynamicChipListComponent— the chip set changedrole="listbox"→role="list"(chips are nowlistitem).- Confirm dialog — the Yes/No buttons swapped order and initial focus moved to the accept button; e2e relying on positional order or initial focus on "No" must update.
- Datatable header — the
$thumbnailcolumn screen-reader title changed from the literal'Thumbnail'to the i18n keyADF-DOCUMENT-LIST.LAYOUT.THUMBNAIL. - A few existing i18n key values changed (e.g.
BREADCRUMB.ARIA-LABEL.DROPDOWN, andCORE.METADATA.ACCESSIBILITY.EDITis now parameterised with{{ sectionName }}), plus many new keys were added.
New components and features
- Repeatable-section form widget —
RepeatWidgetComponent(adf-repeat-widget, newFormFieldTypes.REPEATABLE_SECTION = 'repeatable-section') renders add/remove-row repeatable sections (withinitialNumberOfRows/maxNumberOfRows/allowInitialRowsDeleteparams and a confirm-on-remove dialog). NewContainerRowModel;FormFieldModelgainedrows,addRow(),removeRow(),canAddRow(). - Button form widget —
ButtonWidgetComponent(button-widget, newFormFieldTypes.BUTTON = 'button'), auto-registered inFormRenderingService. - SSO integration API (js-api) —
IntegrationSSOApi.getAccountInformation(repositoryId)+SSOUserAccountCredentialsRepresentation. - Screens on the start-process event —
StartProcessScreenCloudComponent(adf-cloud-start-process-screen-cloud), an abstractBaseScreenCloudComponent, and aTaskTypeResolverService(+UserTaskContentType) to resolve form vs screen tasks. - Count APIs —
ProcessListCloudService.getProcessListCount(...)andTaskListCloudService.getTaskListCount(...)(dedicated/countendpoints, used by the filter components in POST mode). - Custom redirects —
StartProcessCloudComponentgained@Output() customOutcomeSelected(emits the outcome id);FormModel.selectedOutcomeIdwas added. - Rich-text parsing service —
RichTextParserService+RICH_TEXT_PARSER_TOKEN;editorjs-htmlmoved todependencies. - Legacy saved searches —
SavedSearchesServicerefactored onto aSavedSearchStrategybase with a newSavedSearchesLegacyServiceand an optionalSAVED_SEARCHES_SERVICE_PREFERENCEStoken. - Amount locale display — opt-in via
AmountWidgetSettings.enableDisplayBasedOnLocale(formats viaCurrencyPipeby browser locale); newTranslationService.getLocale(). - Search —
SearchDateRangeComponentgained@Input() onReset$+reset(); a new LOCATION (SITE) autocomplete facet (filtered to accessible sites); chip autocomplete now reacts topreselectedOptionschanges. - Model additions:
ApplicationInstanceModel.lastModifiedAtandquickRunDeployment;QueryParams.includewidened tostring; newAppConfigValues.OOI_CONNECTOR_URL(ooiServiceUrl) for Microsoft 365 sessions under Basic auth. ProcessListCloudComponentgained@Input() excludeByProcessCategoryName(with a matchingProcessFilterCloudModelfield) so admins can filter out form-specific processes.- New exported form internals:
RepeatableSectionModelandROW_ID_PREFIX(moved out ofform-field.modelintorepeatable-section.model), andformFieldRuleHandler(handlers/form-field-rule.handler) — enables conditional (dependent) dropdowns inside repeatable sections to resolve per-row. convertObjectToFormDatanow acceptsArray<string | Blob>values (multi-valued property upload).
Behavioural changes
| Area | Change |
|---|---|
| Forms — number | Integer/number fields reject input longer than 10 digits. |
| Forms — dropdown | Multi-select dropdowns work again (value writes are debounced by 100 ms); conditional dropdowns inside repeatable sections resolve per-row. |
| Forms — click | The form widget event handler fires once per click (a double-registration was removed from the base widget). |
| Forms — start process | The process card/start button render only after the form finishes loading (no button flash); setting the process definition programmatically no longer triggers a reload. |
| Search | Queries with non-latin characters are now UTF-8 base64-encoded correctly; resetting the tabbed date filter clears each tab. |
| Viewer | Changing the version inside the viewer reloads the preview; task-attached files with a display-value form field preview correctly. |
| Clipboard | Copy affordance is now a Material tooltip; copying keeps focus on the trigger (e.g. the "Copy link" button). |
| Localisation | Portuguese dates render dd/mm/yyyy; TimeAgoPipe is now impure and reacts to runtime locale changes, as do date/filesize datatable cells. |
| Auth | Under Basic auth, requests to the OOI service receive the content-services ticket (fixes starting a Microsoft 365 session). |
| Notifications / WebSocket | WebSocketService.connectionParams is now a function, so the auth token is re-evaluated on every (re)connect — deployment/websocket updates arrive without closing the panel. |
| Saved searches | SavedSearchesService now falls back to the preferences API on error (and re-throws non-404 errors during migration), fixing an empty sidebar on the first login after a cache clear. |
| Forms — start process | The default start-process error i18n key was corrected (the previous fallback key did not exist, so no error message showed). |
| Forms — button widget | ButtonWidgetComponent no longer uses OnPush, so its disabled state updates when the field object mutates in place. |
| Card view | Text/date item labels now always float (floatLabel="always"); the editable date item gained an adf-property-field class. |