Uploaded image for project: 'Nuxeo Elements'
  1. Nuxeo Elements
  2. ELEMENTS-812

Fix document actions menu with unresolved elements

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.3.3
    • Component/s: Actions
    • Environment:
      Chrome version 70.0.3538.77
    • Tags:
    • Backlog priority:
      1,100
    • Browser:
    • Sprint:
      nxGang Sprint 10.10.1, nxGang Sprint 10.10.2
    • Story Points:
      2

      Description

      Steps to reproduce:

      Contribute a new document action as follows:

      • Clone the nuxeo-web-ui repository from Github and set up dev environment.
      • Edit elements/nuxeo-document-actions/nuxeo-my-tag-action.html:
        <dom-module id="nuxeo-my-tag-action">
          <template>
            <style>
            </style>
            <paper-icon-button id="tag" icon="icons:pets">
            </paper-icon-button>
            <paper-tooltip>[[i18n('documentMyTagAction.tooltip')]]</paper-tooltip>
          </template>
          <script>
            Polymer({
              is: 'nuxeo-my-tag-action',
              behaviors: [Nuxeo.I18nBehavior],
              properties: {
        
                /**
                 * Input document.
                 */
                document: {
                  type: Object
                }
              }
            });
          </script>
        </dom-module>
        
      • Reference it in elements/elements.html:
        diff --git i/elements/elements.html w/elements/elements.html
        index 1857ca16..230a4930 100644
        --- i/elements/elements.html
        +++ w/elements/elements.html
        @@ -252,6 +252,7 @@ limitations under the License.
         <link rel="import" href="../bower_components/nuxeo-ui-elements/actions/nuxeo-download-button.html">
         <link rel="import" href="nuxeo-document-actions/nuxeo-clipboard-toggle-button.html">
         <link rel="import" href="nuxeo-document-actions/nuxeo-document-edit-button.html">
        +<link rel="import" href="nuxeo-document-actions/nuxeo-my-tag-action.html">
         
         <link rel="import" href="../bower_components/nuxeo-ui-elements/nuxeo-format-behavior.html">
         <link rel="import" href="../bower_components/nuxeo-ui-elements/actions/nuxeo-preview-button.html">
        
      • Add the needed DOCUMENT_ACTIONS slot contribution in elements/nuxeo-web-ui-bundle.html
        <nuxeo-slot-content name="myTagDocumentAction" slot="DOCUMENT_ACTIONS" order="0">
          <template>
           <nuxeo-my-tag-action document="[[document]]"></nuxeo-my-tag-action>
          </template>
        </nuxeo-slot-content>
        
      • Refresh browser to view the new Document Action.
        => Scrollbars appear in order to display all the document actions (see screenshot).

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 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 day, 4 hours
                  1d 4h