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

Fix nuxeo-layout importing twice document layouts when navigating from a Folderish to a non-Folderish doc

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.0
    • Fix Version/s: 2.4.10, 3.0.0
    • Component/s: Filters, Layouts
    • Backlog priority:
      700
    • Browser:
    • Sprint:
      nxNS Sprint 10.3.1, nxNS Sprint 10.3.2, nxNS Sprint 10.3.3, nxNS Sprint 10.3.4, nxNS Sprint 10.3.5, nxNS Sprint 10.10.1, nxNS Sprint 10.10.2, nxNS Sprint 10.10.3, nxNS Sprint 11.1.4, nxNS Sprint 11.1.5, nxNS Sprint 11.1.6, nxNS Sprint 11.1.7
    • Story Points:
      3

      Description

      When navigating from a Folderish to a non-Folderish document, you can see the metadata, view, etc. layouts are imported twice (just break point in nuxeo-layout.html)

      This is probably caused by nuxeo-filter being re-evaluated too late when switching between collapsible document page and document-page:

      <nuxeo-slot-content name="documentViewPage" slot="DOCUMENT_VIEWS_PAGES" order="10">
        <template>
          <nuxeo-filter document="[[document]]" expression="document.facets.indexOf('Folderish') === -1
                                                         && document.facets.indexOf('Collection') === -1">
            <template>
              <nuxeo-document-page name="view" document="[[document]]"></nuxeo-document-page>
            </template>
          </nuxeo-filter>
        </template>
      </nuxeo-slot-content>
      
      <nuxeo-slot-content name="documentCollapsiblePage" slot="DOCUMENT_VIEWS_PAGES" order="10">
        <template>
          <nuxeo-filter document="[[document]]" facet="Folderish,Collection">
            <template>
              <nuxeo-collapsible-document-page name="view" document="[[document]]"></nuxeo-collapsible-document-page>
            </template>
          </nuxeo-filter>
        </template>
      </nuxeo-slot-content>
      

      https://github.com/nuxeo/nuxeo-web-ui/blob/master/elements/nuxeo-web-ui-bundle.html#L323

      This affects navigation performances as we end up loading twice nuxeo-document-preview (pdf, image, video, etc.)

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 6 hours
                  6h

                    PagerDuty

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