* [ACS-12451] Add missing ADF upgrade guides * [ACS-12451] CR fix * [ACS-12451] CR fixes
14 KiB
Title
| Title |
|---|
| Upgrading from ADF v6.5.2 to v6.6.0 |
Upgrading from ADF v6.5.2 to v6.6.0
This guide provides instructions on how to upgrade your v6.5.2 ADF projects to v6.6.0.
Before you begin
Always perform upgrades on a "clean" project state, back up your changes or make a project backup.
Do not skip this task if you want your application to be updated to the most recent version of ADF. Upgrades of multiple versions of ADF cannot be done in one step only, but should follow the chain of sequential updates.
After the upgrade, check the other sections below to see if there are any changes affecting your project.
Contents
- Library updates
- Breaking changes
- New components and features
- Behavioural changes
- Theme changes
- Notable internal changes
Library updates
Update the package.json file with the latest library versions:
{
"dependencies": {
"@alfresco/adf-core": "6.6.0",
"@alfresco/adf-content-services": "6.6.0",
"@alfresco/adf-process-services": "6.6.0",
"@alfresco/adf-process-services-cloud": "6.6.0",
"@alfresco/adf-insights": "6.6.0",
"@alfresco/adf-extensions": "6.6.0",
"@alfresco/js-api": ">=7.5.0"
}
}
Clean your old distribution and dependencies by deleting node_modules and package-lock.json, then reinstall:
npm install
Breaking changes
Search date-range widget replaced
The simple from-to date-range search widget was replaced by the tabbed advanced date-range widget:
- The old
SearchDateRangeComponent(aSearchWidgetwithfrom/tocontrols, selectoradf-search-date-range) was removed. - The advanced components were renamed:
SearchDateRangeAdvancedComponent→SearchDateRangeComponentandSearchDateRangeAdvancedTabbedComponent→SearchDateRangeTabbedComponent. Update TypeScript imports accordingly. Note thatSearchDateRangeComponentnow refers to a different class than before. - The
date-range-advancedwidget selector was removed; thedate-rangeselector now resolves toSearchDateRangeTabbedComponent.
What to change in your search.config / app.config.json:
-
Replace
"selector": "date-range-advanced"with"selector": "date-range". -
Existing
"selector": "date-range"filters now render the tabbed widget. Migrate their settings —fieldnow supports a comma-separated list (one tab per field), and adddisplayedLabelsByField:"component": { "selector": "date-range", "settings": { "field": "cm:created", "dateFormat": "dd-MMM-yy", "maxDate": "today", "displayedLabelsByField": { "cm:created": "Created Date" } } }dateFormatnow defaults todd-MMM-yywhen omitted. Date-range i18n keys were reorganised — re-check any overrides.
Every filter widget in the filter panel now gets default Clear / Apply buttons via a new
SearchFilterCardComponent wrapper (adf-search-filter-card), which adds an extra element between the
expansion panel and adf-search-widget-container — review custom CSS/E2E selectors.
Content metadata property panels
[ContentMetadataComponent](../../lib/content-services/src/lib/content-metadata/components/content-metadata/content-metadata.component.ts)
was reworked so each panel (General Info, Tags, Categories, and each aspect group) is independently
expandable and editable. Consequently:
ContentMetadataComponent.editable@Inputwas removed and replaced by@Input() readOnly(defaultfalse) — note the inverted meaning. Migrate[editable]="x"to[readOnly]="!x".ContentMetadataCardComponentlost its@Output() editableChangeand thetoggleEdit()/toggleExpanded()methods.BaseCardView(core) gained@Input() editable = false;InfoDrawerComponentgained@Input() icon: string | null.- The
CardViewGroupandContentMetadataCustomPanelinterfaces gained optionalexpanded?(andeditable?on the group).
Authentication and SSO renames
Several public authentication members were renamed as part of adding PKCE (authorization-code) flow support:
| Before | After |
|---|---|
LoginComponent.implicitFlow (property) |
LoginComponent.ssoLogin |
LoginComponent.redirectToImplicitLogin() |
LoginComponent.redirectToSSOLogin() |
OidcAuthenticationService.ssoImplicitLogin() |
OidcAuthenticationService.ssoLogin(redirectUrl?: string) |
- New
app.config.jsonOAuth2 keyoauth2.codeFlowenables the PKCE authorization-code flow (setimplicitFlow: false+codeFlow: true). A new Docker env varAPP_CONFIG_OAUTH2_CODE_FLOWmaps to it. - The app-config JSON schema file was renamed from
schema.jsontoapp.config.schema.json. The OAuth2 config now forwards the wholeoauth2object toangular-oauth2-oidc, so additional keys (oidc,issuer,postLogoutRedirectUri,silentRefreshRedirectUri,silentRefreshTimeout,dummyClientSecret,skipIssuerCheck,strictDiscoveryDocumentValidation) are now recognised and passed through.
JS-API integrated into the monorepo
@alfresco/js-api source now lives inside the ADF monorepo (lib/js-api) and is published at 7.5.0. The
package name and import specifier are unchanged (import { … } from '@alfresco/js-api'). However, a number
of Activiti / AGS / Search / Content model classes were converted to interfaces to reduce bundle size —
code that used new SomeModel() or instanceof SomeModel on those models must switch to plain-object usage.
Viewer close button
ViewerComponent and AlfrescoViewerComponent gained a configurable close-button position:
- New exported enum
CloseButtonPosition { Right = 'right', Left = 'left' }. - New
@Input() closeButtonPosition: CloseButtonPosition(defaultCloseButtonPosition.Left) and@Input() hideInfoButton: boolean(defaultfalse). - The close button's
data-automation-idchanged fromadf-toolbar-backtoadf-toolbar-left-back(with a newadf-toolbar-right-back). Update any tests/selectors targetingadf-toolbar-back.
Notification history reverted
The read/unread notification model introduced in the 6.5.x line was reverted in 6.6.0. Relative to 6.5.2:
- The exported
NOTIFICATION_STORAGEconstant was removed; the storage key is again the static fieldNotificationHistoryComponent.NOTIFICATION_STORAGE. NotificationModel.readandNotificationHistoryComponent.unreadNotificationswere removed.- "Mark as read" again clears the notification list (rather than flagging items as read).
If you adopted the 6.5.x read/unread API, revert those usages.
Extension configuration
ExtensionService can now also receive inline ExtensionConfig values, not just JSON file names. This
changed some signatures:
- New provider factory
provideExtensionConfigValues(values: ExtensionConfig[])and injection tokenEXTENSION_JSON_VALUES. ExtensionServiceconstructor gained the injectedEXTENSION_JSON_VALUESargument (the token has a default, so DI apps are unaffected; manual instantiation/tests must pass the extra array).ExtensionLoaderService.load(...)gained an optional 4thextensionValues?: ExtensionConfig[]parameter.
Constructor signature changes
These services gained new constructor dependencies (only relevant if you instantiate them manually or in tests):
ContentService(+ optionalThumbnailService)TagService,CategoryService(+AppConfigService)DialogAspectListService(+TagService,CategoryService)PropertyGroupTranslatorService(NotificationServicereplaced byLogService)
Theme reference variables
Alongside the new design tokens (see Theme changes), a theme refactor repointed many
existing --adf-* custom properties from static $adf-ref-* reference variables to Material palette lookups,
and deleted several $adf-ref-* variables from _reference-variables.scss. Consumers who overrode those
internal SCSS reference variables directly are affected — override the public --adf-* CSS custom properties instead.
New components and features
- Tabbed date-range search — the
date-rangewidget is now a tabbed component supporting ANY / IN LAST / BETWEEN ranges, per-field tabs, per-field labels (displayedLabelsByField), and default Clear/Apply actions (SearchFilterCardComponent). A newTabLabelsPipe(tabLabels) is exported. - Content-metadata property panels — a new standalone
ContentMetadataHeaderComponent(adf-content-metadata-header) and per-panel expand/edit state; the info drawer can show a node icon; newContentServicehelpers (getNodeIcon,isSmartFolder,isRuleFolder,isLinkFolder). - Disable tags / categories — new
app.config.jsonkeysplugins.tagsandplugins.categories(defaulttrue);TagService.areTagsEnabled()/CategoryService.areCategoriesEnabled(); a newAspectListComponent@Input() excludedAspects: string[]; and an optionalSearchCategory.rules.visiblefor conditional search-category visibility. - Document list column persistence —
[DocumentListComponent](../content-services/components/document-list.component.md)gained setter inputssetColumnsVisibility,setColumnsWidths,setColumnsOrderand outputscolumnsVisibilityChanged,columnsWidthChanged,columnsOrderChanged, so a host app can persist and restore column configuration. - Drag-drop column reordering — the
DocumentListPresetRefconfig gaineddraggable?: boolean; disabled columns are skipped as drop targets. - Resizable task/process lists —
TaskListComponentandProcessInstanceListComponentgained@Input() isResizingEnabled(defaultfalse) and@Input() blurOnResize(defaulttrue). - Viewer close-button position — see Viewer close button.
- Inline extension config —
provideExtensionConfigValues([...])(see Extension configuration). - Icon column cell — the
icondata-table column type is now rendered by a dedicatedIconCellComponentwith value validation and tooltip support. - Tag validation — creating a tag now blocks illegal characters (
' : " \ | < > / ?) with an inline error. - Design tokens — new themeable
--adf-*properties forPeopleCloudComponent,GroupCloudComponent,TaskAssignmentFilterCloudComponent, andProcessHeaderCloudComponent(see Theme changes).
Behavioural changes
| Area | Change |
|---|---|
| Auth (basic) | On app load, an invalid/stale ECM ticket now triggers an automatic logout (onLogout) instead of a false "logged-in" state. |
| Auth (js-api) | invalidateSession() on a 401 only fires when js-api owns authentication (avoids spurious invalidation under ADF-managed OAuth). |
| Auth (upload) | The multipart/form-data header is preserved when the body is a real FormData (fixes descriptor import in HXP). |
| Forms | Radio widgets update the form value immediately on selection. |
| Viewer | The PDF viewer works over plain HTTP (no crypto.randomUUID), and AlfrescoViewerComponent shows the original file's mime type icon. |
| Data table | Column headers show a tooltip with the (translated) column title. |
| Search | The search-properties facet clear button now actually clears the underlying query. |
Theme changes
New themeable CSS custom properties were added for several cloud components (defaults derive from the Material theme palette):
- People cloud —
--adf-people-cloud-input-label-default-color,--adf-people-cloud-input-label-focus-color,--adf-people-cloud-autosuggest-result-active-color,--adf-people-cloud-autosuggest-result-disabled-color,--adf-people-cloud-input-caption-error-color. - Group cloud — the
--adf-group-cloud-*equivalents of the above. - Task assignment filter —
--adf-task-assignment-filter-option-default-color,--adf-task-assignment-filter-option-selected-color,--adf-task-assignment-filter-label-default-color,--adf-task-assignment-filter-label-focus-color. - Process header —
--adf-process-header-cloud-card-background.
A new --theme-warn-color-a700 theme color was added (used for stronger warning text/borders, e.g. in the
share dialog). See also Theme reference variables for the removed $adf-ref-* internals.
Notable internal changes
@alfresco/js-apiwas moved into the monorepo (lib/js-api) and published at7.5.0; the public import path is unchanged.- Numerous
!importantdeclarations were removed from component styles (toolbar, pagination, permission list, card-view date item, version list, task form, add-permission panel, etc.) — low impact, but review custom overrides that relied on the old specificity.