Alfresco / alfresco-ng2-components

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

Possibility to add default properties to custom metadata group #3986

Open MariusGrunenberg opened 5 years ago

MariusGrunenberg commented 5 years ago
  • [x] New feature request
  • [ ] Bug
  • [ ] Support request
  • [ ] Documentation

Current behaviour:

The InfoDrawerComponent metadata information. There is one drawer, with the default properties of a node.

The user is able to add his own aspect properties in the app.config.json, like this:

"content-metadata": {
    "presets": {
      "custom": [
        {
          "title": "APP.CONTENT_METADATA.EXIF_GROUP_TITLE",
          "items": [
            {
              "aspect": "exif:exif",
              "properties": [
                "exif:pixelXDimension",
                "exif:pixelYDimension",
                "exif:dateTimeOriginal",
                "exif:exposureTime",
                "exif:fNumber",
                "exif:flash",
                "exif:focalLength",
                "exif:isoSpeedRatings",
                "exif:orientation",
                "exif:manufacturer",
                "exif:model",
                "exif:software"
              ]
            }
          ]
        }
      ]
}}

which will get displayed as a group of properties in an additional drawer. To view this drawer I need to click on More Information.

Expected behavior:

From a user experience this is not ideally, it should be possible to show the default properties and custom ones in one drawer group.

One possibility would be to make it possible to add default properties to your custom preset, like for example:

"content-metadata": {
    "presets": {
      "custom": [
        {
          "title": "APP.CONTENT_METADATA.EXIF_GROUP_TITLE",
          **"defaultProperties: ["name", "title", "author"],**
          "items": [
            {
              "aspect": "exif:exif",
              "properties": [
                "exif:pixelXDimension",
                "exif:pixelYDimension",
                "exif:dateTimeOriginal",
                "exif:exposureTime",
                "exif:fNumber",
                "exif:flash",
                "exif:focalLength",
                "exif:isoSpeedRatings",
                "exif:orientation",
                "exif:manufacturer",
                "exif:model",
                "exif:software"
              ]
            }
          ]
        }
      ]
}}

Steps to reproduce the issue:

  1. Add your custom preset to the app.config.json
  2. Login
  3. Select a folder/file
  4. Click on the info button to show the info drawer with the metadata tab

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

New feature request: We currently want to display custom metadata in the info drawer together with the default properties.

eromano commented 5 years ago

I guess you can archive the same thing h if you set displayDefaultProperties to true and add in another group the property default that you want

https://github.com/Alfresco/alfresco-ng2-components/blob/development/docs/content-services/content-metadata.component.md

MariusGrunenberg commented 5 years ago

Yes that is one possibility I could do, but then I have two groups (which means two of these group drawers) in my application. One with default properties and one with my custom ones.

But for usability sake I want the user to only open one drawer/group where everything is inside.

eromano commented 5 years ago

got it I will ask @fcorti to craft a story if you want to contribute to ADF you can also create a POC and we can start to work together on it

MariusGrunenberg commented 5 years ago

Yeah Sure, would love to. Just write me when the Story is ready. I can already Look into possible solutions

-------- Original-Nachricht -------- An 29. Nov. 2018, 10:59, Eugenio Romano schrieb:

got it I will ask @fcorti to craft a story if you want to contribute to ADF you can also create a POC and we can start to work together on it

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

fcorti commented 5 years ago

Hi Marius,

Thank you for the suggestion. Accordingly with the documentation we could do something like the following.

"content-metadata": {
    "presets": {
      "custom": [
        {
          "title": "APP.CONTENT_METADATA.EXIF_GROUP_TITLE",
          "items": [
            { "aspect": "cm:...", "properties": ["name", "title", "author"] },
            { "aspect": "exif:exif", "properties": [...] }
          ]
        }
      ]
}}

Why the configuration above is not what you are suggesting? How the defaultProperties settings is supposed to work, compared with the configuration above?

MariusGrunenberg commented 5 years ago

Hi Francesco,

thanks for your response. Sorry I don't know if I understand correctly. In your view it should already work like in your example? I have tried, but it didn't. Looking into the code it makes sense, since the default properties won't get accessed by properties or aspects, but there is a Typescript Nodeobject with properties like "name", "createdBy" and so on, which gets send by the backend.

But in general this approach would be perfect, to manually define these default properties.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ On Thursday, 29. November 2018 12:39, Francesco Corti notifications@github.com wrote:

Hi Marius,

Thank you for the suggestion. Accordingly with the documentation we could do something like the following.

"content-metadata": { "presets": { "custom": [ { "title": "APP.CONTENT_METADATA.EXIF_GROUP_TITLE", "items": [ { "aspect": "cm:...", "properties": ["name", "title", "author"] }, { "aspect": "exif:exif", "properties": [...] } ] } ] }}

Why the configuration above is not what you are suggesting? How the defaultProperties settings is supposed to work, compared with the configuration above?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

eromano commented 5 years ago

@fcorti I guess @MariusGrunenberg is right those "default" property are not aspects are property of the node

nvmadhav commented 5 years ago

Please let us know the prioritization of this issue as this is common requirement for us too.

Sheldor5 commented 3 years ago

This is a MUST HAVE in my opinion, right now I have to make more than 5 clicks to actually see all custom properties of my custom document type ...

  1. click = on the document/list item
  2. click = "View Details" Icon to open the content-metadata-component-card
  3. click = "More Information" to see the groups of my custom properties (properties are groupd by type and aspect ... why???)
  4. click = click on the custom type itself (don't know why the custom properties are in their own group with the custom type name as title)
  5. click = click on the aspect which is a mandatory-aspect to actually see the aspect's properties and values (repeat this for each aspect you have assigned or is a mandatory-aspect on the custom type)

so for a custom type with 5 mandatory aspects I have to make 9 clicks to see ALL custom properties

Also I have to repeat click 3-5 each time I select another document/item in the list

This is a 0/5 rating in UX lmao ...