Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-122454

Remove {exitDocument} usages of metal-dom

Details

    • Task
    • Status: Closed
    • Minor
    • Resolution: Completed
    • None
    • 7.4.13 DXP GA1, Master
    • Metal.js
    • None

    Description

      Part of our plan to Remove usages of metal-dom in DXP codebase.

      The goal of this task is to remove all usages of exitDocument from the metal-dom package.

      Traditionally, removeChild was the only way to remove elements from the DOM, which drives our current exitDocument implmentation:

      export function exitDocument(node) {
      	if (node && node.parentNode) {
      		node.parentNode.removeChild(node);
      	}
      }
      

      Now that IE11 is not a factor, ChildNode.remove should do the trick and simplify how nodes are removed from the DOM.

      Acceptance Criteria

      • All usages of exitDocument from metal-dom have been replaced

      Additional Resources

      Posisble occurrences of exitDocument (Deduped list of modules on git grep 'exitDocument(' *.js*)

      • modules/apps/asset/asset-list-web
      • modules/apps/asset/asset-publisher-web
      • modules/apps/asset/asset-tags-admin-web
      • modules/apps/document-library/document-library-web
      • modules/apps/dynamic-data-mapping/dynamic-data-mapping-form-builder
      • modules/apps/dynamic-data-mapping/dynamic-data-mapping-form-builder/test/js/components/FormBuilder/FormBuilder.es.js: dom.exitDocument(addButton);
      • modules/apps/dynamic-data-mapping/dynamic-data-mapping-form-builder/test/js/components/FormBuilder/FormBuilder.es.js: dom.exitDocument(basicInfo);
      • modules/apps/dynamic-data-mapping/dynamic-data-mapping-form-builder/test/js/components/FormBuilder/FormBuilder.es.js: dom.exitDocument(translationManager);
      • modules/apps/dynamic-data-mapping/dynamic-data-mapping-form-builder/test/js/components/RuleBuilder/RuleBuilder.es.js: dom.exitDocument(addbutton);
      • modules/apps/dynamic-data-mapping/dynamic-data-mapping-form-web
      • modules/apps/dynamic-data-mapping/dynamic-data-mapping-form-web/test/js/util/AutoSave.es.js:
      • modules/apps/frontend-js/frontend-js-web
      • modules/apps/users-admin/users-admin-web

      Attachments

        Activity

          People

            team-frontend-infrastructure Product Team Frontend Infrastructure
            jose.balsas Chema Balsas (Inactive)
            Diego Nascimento Diego Nascimento (Inactive)
            Kiyoshi Lee Kiyoshi Lee
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Packages

                Version Package
                7.4.13 DXP GA1
                Master