Alfresco / alfresco-ng2-components

Alfresco Angular Components
https://www.alfresco.com/abn/adf/docs/
Apache License 2.0
294 stars 265 forks source link

adf-content-metadata-card configuration driven by node-type doesn't work for cm:content #4992

Open shazada opened 5 years ago

shazada commented 5 years ago

Type of issue: (check with "[x]")

  • [ ] New feature request
  • [x] Bug
  • [ ] Support request
  • [ ] Documentation

Current behaviour: At the moment the only way to display the 'default' properties like name size etc. is by enabling the toggle in the HTML component with [displayDefaultProperties]="true"> The problem is, this creates an additional preset which get's shown per default. When clicking on less information the custom preset is shown and then your custom properties are visible.

According to issue #2893 and the documentation it's possible to configure it like this: https://www.alfresco.com/abn/adf/docs/content-services/components/content-metadata-card.component/#basic-elements

"content-metadata": { "presets": { "file_preset": [{ "title": "File details", "items": [ { "aspect": "cm:titled", "properties": "*"}, { "type": "cm:content", "properties": ["cm:name"]} ]}], ]} }

But if [displayDefaultProperties]="false" cm:content will be called and visible on edit-mode but will have no value.

Expected behavior: Expected to add the default properties within a preset configuration

Steps to reproduce the issue: Just follow the documentation to create a custom preset. Set the [displayDefaultProperties]="false" and define the above preset.

Component name and version: adf-content-metadata-card 3.3.0

Browser and version:

Firefox Quantum

Node version (for build issues):

New feature request:

quasaray commented 3 years ago

I would also be interested to know if this will be fixed.

For what it is worth, sub-types don't appear to be resolved, type properties are only shown if it is the same type