Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-24785

Custom widget for comparison

    XMLWordPrintable

    Details

    • Type: User story
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 10.2
    • Component/s: Web UI
    • Release Notes Summary:
      Allows custom element to be added to compare different metadata proprieties. Defines custom elements to be used on blobs, document and user references.
    • Release Notes Description:
      Hide

      Allows custom element to be added to compare different metadata proprieties. Defines custom elements to be used on blobs, document and user references.

      Default comparsion elements
      Blobs: In case of blobs, the name should be the content for comparison. An action should also be present so that if the MD5 of those blobs is different, the action allows the user to launch a blob content comparison (using ARender comparison).

      Doc refs: should compare the document title
      User refs: should compare with the user tag widget

      A custom element was introduced to compare documents: nuxeo-diff. This element now dynamically loads the file diff/imports.html, which imports custom elements from the diff/elements folder and registers them in a global registry using a set of rules. These rules define for what property names or property types should this elements be used to represent the differences (or the raw value in case there are no differences). A sample of a valid diff/imports.html follows:

      <link rel="import" href="elements/nuxeo-default-diff.html">
      <link rel="import" href="elements/nuxeo-blob-diff.html">
      <link rel="import" href="elements/nuxeo-dcdescription-diff.html">
      <script>
        Nuxeo.Diff.registerElement('nuxeo-blob-diff', {type: 'blob'});
        Nuxeo.Diff.registerElement('nuxeo-dcdescription-diff', {property: 'dc:description'});
      </script>
      

      These elements are used as children by nuxeo-object-diff, which is the element responsible for representing a diff for a given property, loading those elements based on the property name or property type. In case no custom element is registered for the given criteria, the default diff element (named nuxeo-default-diff) is used.

      In order to allow the current custom elements to be overridden and new elements to be added, the following files are not vulcanized:

      • nuxeo-diff-page.html
      • diff/imports.html
      • diff/elements/*.html

      The nuxeo-diff-page stamps nuxeo-diff, which can be parameterized. nuxeo-diff exposes several customization properties, including the headers, enrichers and schemas used to fetch the documents. The headers property can be used to determined whether documents are fetched with or without resolved entities.

      Show
      Allows custom element to be added to compare different metadata proprieties. Defines custom elements to be used on blobs, document and user references. Default comparsion elements Blobs: In case of blobs, the name should be the content for comparison. An action should also be present so that if the MD5 of those blobs is different, the action allows the user to launch a blob content comparison (using ARender comparison). Doc refs: should compare the document title User refs: should compare with the user tag widget A custom element was introduced to compare documents: nuxeo-diff . This element now dynamically loads the file diff/imports.html , which imports custom elements from the diff/elements folder and registers them in a global registry using a set of rules. These rules define for what property names or property types should this elements be used to represent the differences (or the raw value in case there are no differences). A sample of a valid diff/imports.html follows: <link rel= " import " href= "elements/nuxeo- default -diff.html" > <link rel= " import " href= "elements/nuxeo-blob-diff.html" > <link rel= " import " href= "elements/nuxeo-dcdescription-diff.html" > <script> Nuxeo.Diff.registerElement( 'nuxeo-blob-diff' , {type: 'blob' }); Nuxeo.Diff.registerElement( 'nuxeo-dcdescription-diff' , {property: 'dc:description' }); </script> These elements are used as children by nuxeo-object-diff , which is the element responsible for representing a diff for a given property, loading those elements based on the property name or property type. In case no custom element is registered for the given criteria, the default diff element (named nuxeo-default-diff ) is used. In order to allow the current custom elements to be overridden and new elements to be added, the following files are not vulcanized: nuxeo-diff-page.html diff/imports.html diff/elements/*.html The nuxeo-diff-page stamps nuxeo-diff , which can be parameterized. nuxeo-diff exposes several customization properties, including the headers , enrichers and schemas used to fetch the documents. The headers property can be used to determined whether documents are fetched with or without resolved entities.
    • Tags:
    • Sprint:
      nxGang Sprint 10.2.5, nxGang Sprint 10.2.6
    • Story Points:
      3

      Description

      As a configuration user I want to setup custom comparsion elements for fields/schemas.

      Description
      There should be a way to allow a developer to setup different elements/widgets for comparison

      Customization should be allowed on field or schema.

      A fast way to go, for now, would be to not vulcanize the elements that decide this pairing.

      Default comparsion elements
      Blobs: In case of blobs, the name should be the content for comparison. An action should also be present so that if the MD5 of those blobs is different, the action allows the user to launch a blob content comparison (using ARender comparison).

      Doc refs: should compare the document title
      User refs: should compare with the user tag widget

      Implementation Details
      Under NXP-24780, a custom element was introduced to compare documents: nuxeo-diff. This element now dynamically loads the file diff/imports.html, which imports custom elements from the diff/elements folder and registers them in a global registry using a set of rules. These rules define for what property names or property types should this elements be used to represent the differences (or the raw value in case there are no differences). A sample of a valid diff/imports.html follows:

      <link rel="import" href="elements/nuxeo-default-diff.html">
      <link rel="import" href="elements/nuxeo-blob-diff.html">
      <link rel="import" href="elements/nuxeo-dcdescription-diff.html">
      <script>
        Nuxeo.Diff.registerElement('nuxeo-blob-diff', {type: 'blob'});
        Nuxeo.Diff.registerElement('nuxeo-dcdescription-diff', {property: 'dc:description'});
      </script>
      

      These elements are used as children by nuxeo-object-diff, which is the element responsible for representing a diff for a given property, loading those elements based on the property name or property type. In case no custom element is registered for the given criteria, the default diff element (named nuxeo-default-diff) is used.

      In order to allow the current custom elements to be overridden and new elements to be added, the following files are not vulcanized:

      • nuxeo-diff-page.html
      • diff/imports.html
      • diff/elements/*.html

      The nuxeo-diff-page stamps nuxeo-diff, which can be parameterized. nuxeo-diff exposes several customization properties, including the headers, enrichers and schemas used to fetch the documents. The headers property can be used to determined whether documents are fetched with or without resolved entities.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 week, 3 days, 4 hours, 40 minutes
                1w 3d 4h 40m

                  PagerDuty

                  Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.