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

Extract nuxeo-document-content logic to a behavior

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 10.10
    • Component/s: Web UI
    • Release Notes Description:
      Hide
      • added Nuxeo.DocumentContentBehavior
      • removed slot BROWSE_ACTIONS (which was deprecated on 0.9)
      • the params property is now a computed property (previous was set by an observer)
      • the sortOptions property is not a computed property (previously defined on attached, properly overridable)
      • custom elements using Nuxeo.DocumentContentBehavior are expected to have a results element and a page provider (please check on the comments section on how to use custom results and page provider elements)
      Show
      added Nuxeo.DocumentContentBehavior removed slot BROWSE_ACTIONS (which was deprecated on 0.9) the params property is now a computed property (previous was set by an observer) the sortOptions property is not a computed property (previously defined on attached, properly overridable) custom elements using Nuxeo.DocumentContentBehavior are expected to have a results element and a page provider (please check on the comments section on how to use custom results and page provider elements )
    • Impact type:
      API change
    • Upgrade notes:
      Hide

      The params property, formerly set by an observer, is now a computed property. Before this change, the parameters were overridable only if no document was defined on this element (which is unintended usage). If you need to redefined your parameters, please implement your custom document content as documented in https://jira.nuxeo.com/browse/NXP-26184?focusedCommentId=372947&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-372947 and override the _computeParams method.

      The BROWSE_ACTIONS was removed. It was deprecated since version 0.9, replaced by RESULTS_SELECTION_ACTIONS.

      Show
      The params property, formerly set by an observer, is now a computed property. Before this change, the parameters were overridable only if no document was defined on this element (which is unintended usage). If you need to redefined your parameters, please implement your custom document content as documented in https://jira.nuxeo.com/browse/NXP-26184?focusedCommentId=372947&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-372947 and override the _computeParams method. The BROWSE_ACTIONS was removed. It was deprecated since version 0.9, replaced by RESULTS_SELECTION_ACTIONS .
    • Sprint:
      nxGang Sprint 10.10.3, nxGang Sprint 10.10.4, nxGang Sprint 10.10.5
    • Story Points:
      8

      Description

      The original goal of this ticket was to be able to customize the views used in the nuxeo-results used by nuxeo-document-content so users would rely on a visual table editor to easily configure listings for folderish documents. Something along these lines:

      <nuxeo-document-content>
        <nuxeo-data-grid>..</nuxeo-data-grid>
        <nuxeo-data-table>...</nuxeo-data-table>
      </nuxeo-document-content>
      

      However, nuxeo-document-content's customization would still be very verbose. It would require about as much effort as the new approach we adopted: just using the nuxeo-results directly along with the behavior that encapsulates a most of the logics of nuxeo-document-behavior.

      The element nuxeo-document-content still exists solely as a means to prevent duplicated code on Web UI. People wanting to create a custom document content should create an element that:

      1. Has a nuxeo-page-provider
      2. Has a nuxeo-results
      3. Has at least one view inside the results element with class .results
      4. Uses the Nuxeo.DocumentContentBehavior

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                6 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 - 4 days, 5 hours
                  4d 5h