Skip to content

fixes repositoryId issue and adds selection type of single or multiple - #11261

Open
Mike Reynolds (MikeDReynolds68) wants to merge 2 commits into
masterfrom
bugfix/selection-type
Open

fixes repositoryId issue and adds selection type of single or multiple#11261
Mike Reynolds (MikeDReynolds68) wants to merge 2 commits into
masterfrom
bugfix/selection-type

Conversation

@MikeDReynolds68

@MikeDReynolds68 Mike Reynolds (MikeDReynolds68) commented Aug 4, 2026

Copy link
Copy Markdown

Purpose

This update adds following capabilities:

  • The repositoryId property was missing from the Adobe Content Advisor config properties and has been added so it can be used for restricting user access to a single repository
  • The selectedAssets property has been added to the Content Advisor config properties to persist previously selected assets and uses the asset ids from the current field value if the prefillSelectedAssets config value is 'Yes'
  • The CustomUpdateStateValueFn has been added to modify the save functionality so the app replaces the existing field values with the new selections if the prefillSelectedAssets config value is 'Yes' and adds the new selections to the previously selected assets if the value is 'No'
  • The prefillSelectedAssets config has been added to support the selectedAssets property in the Content Advisor props and the CustomUpdateStateValueFn
  • The selectionType property has been added to the Content Advisor props to support the creation of asset fields that contain a 'single' asset or 'multiple' assets (the selectionType property is populated from the value of a new instance config property of the same name with the following options: single, multiple
  • The aemTierType config property has been changed from text to a dropdown to prevent invalid values and contains the following options: delivery, author
  • The env config property has been changed from text to a dropdown to prevent invalid values and contains the following options: prod, stage

Approach

The changes were made in accordance with the capabilities provided by the contentful/dam-app-base package, the Adobe Content Advisor front-end-as-a-service app, and best practices for installation and instance config properties.

Testing steps

The following tests should be passed:

  • Providing the repositoryId in the application's installation config restricts users to the identified repository and no others
  • Omitting the repositoryId in the application's installation config allows users to see all repositories available to them based on their AEM Assets permissions
  • Setting prefillSelectedAssets to 'Yes' selects all previously selected assets when opening the Adobe Content Advisor modal
  • Setting prefillSelectedAssets to 'Yes' causes the previously selected assets to be replaced with the assets selected in the Adobe Content Advisor modal
  • Setting prefillSelectedAssets to 'No' leaves the previously selected assets unselected when opening the Adobe Content Advisor modal
  • Setting prefillSelectedAssets to 'No' cause the assets selected in the Adobe Content Advisor modal to be added to the previously selected assets
  • Setting selectionType to 'single' restricts the user to the selection of a single asset in the Adobe Content Advisor modal
  • Setting selectionType to 'multiple' allows the user to select multiple assets in the Adobe Content Advisor modal
  • Setting aemTierType to 'delivery' or 'stage' restricts the user to repositories of the selected type
  • Setting env to 'prod' or 'stage' restricts the user to repositories in the selected environment

Breaking Changes

None

Dependencies and/or References

All changes are based on information collected in zoom calls, email or slack

Deployment

None that I am aware of

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant