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

Remove usages of metal-dom in DXP codebase

    Details

      Description

      Epic Information

      As part of our Platform Evolution Roadmap, we want to complete the Removal of Metal.js usage by December 2020.

      About 8 months ago we wrote about The State of Frontend Infrastructure in DXP. In there, we made our position clear about React being our frontend technology pick. In there, we said the following about Metal:

      While it came close to achieving some of those goals, we never hit the performance we wanted and more importantly, it always felt like we were the only people using this technology. We've moved on and recommend you learn from our mistakes and stay away.

      While there are still some useful utilities in metal, most of the usages overlap other libraries already in DXP, so removing usage will help improve our product code consistency, maintenance and overall performance.

      The goal of this particular epic is to replace usages of metal-dom with standard APIs or specific DXP functions when needed.

      Acceptance Criteria

      • There are no usages of metal-dom in DXP's code base
      • For backwards compatibility, metal-dom should still be bundled as part of frontend-js-metal-web
      • There should be no dependencies with metal-dom in any other module in their package.json file

      Additional Resources

      Test Information

      Test scenario

      Requirement Test Scenarios Covered by frontend/backend unit test? (Yes/No) Test Priority (business impact)
       LPS-122383 Given console terminal at liferay portal root
      When run command:
      grep -r "metal-dom" * --include="package.json" 

      Then returns no lines except from frontend-js-metal-web directory if any

      no 3-medium
       LPS-122383 Given console terminal at liferay portal root
      When run command:
      grep -r "metal-dom" *

      Then returns only lines from frontend-js-metal-web directory if any

      yes 3-medium
       LPS-122383 Given console terminal at liferay portal root
      When run command:
      grep -rn "import {[A-Za-z]*\} from 'metal-dom'\|import [A-Za-z]* from 'metal-dom'" * 

      Then returns no lines except from frontend-js-metal-web directory if any

      no 3-medium

      QA To Do: 

      • may want to check poshi paths and macros to see if they rely on waiting for metal-dom events

      QA won't test:

      • won't test UI manually since there's no specific UI associated. It would be impossible to test for everything visually in portal since this replacement covers many modules in portal. So functional testing will rely on existing tests. Manual testing would be considered to investigate existing test failures related to changes from the epic.
      • won't test client side performance, too high cost and effort at this point to create a true independent test for low risk area. FI team expects performance to increase.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              support-lep@liferay.com SE Support
              Reporter:
              jose.balsas Chema Balsas
              Recent user:
              Bruno Fernández
              Participants of an Issue:
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Packages

                  Version Package