Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LPD-49326 commerce part of LPD-47718 #5953

Open
wants to merge 1,437 commits into
base: master
Choose a base branch
from

Conversation

izaera
Copy link

@izaera izaera commented Feb 21, 2025

Hi team 👋

This PR is part of LPD-47718.

It refactors your code to import openModal, openToast, etc. from frontend-js-components-web instead of frontend-js-web.

The final goal is to remove those methods from frontend-js-web so that whenever that module is imported the browser doesn't need to pull React and Clay simply because those methods existed there. This will enhance the performance of sites that don't need React or Clay.

Internally, for now, we are only re-exporting those methods from frontend-js-components-web, but once all PRs like this one sent to teams are merged, we (Frontend Infra) will send another final PR to move the methods and remove them completely from frontend-js-web.

The code in this PR (as well as the one we will send to other teams) has been thoroughly tested in this PR but we want to make sure that it doesn't break anything and that's why we send it to you for review.

The expectations are that you run the tests suites you think apply and if nothing breaks you just simply forward the PR to Brian.

Also, it would be great if any new code you write that uses those methods imports them from frontend-js-components-web instead of frontend-js-web so that we don't have to repeat this process again 😬 .

For reference, here is the list of moved methods:

  1. openAlertModal
  2. openCategorySelectionModal
  3. openConfirmModal
  4. openModal
  5. openPortletModal
  6. openPortletWindow
  7. openSelectionModal
  8. openSimpleInputModal
  9. openTagSelectionModal
  10. openToast

@liferay-continuous-integration
Copy link
Collaborator

To conserve resources, the PR Tester does not automatically run for every pull.

If your code changes were already tested in another pull, reference that pull in this pull so the test results can be analyzed.

If your pull was never tested, comment "ci:test" to run the PR Tester for this pull.

@izaera
Copy link
Author

izaera commented Feb 21, 2025

ci:test:sf

@liferay-continuous-integration
Copy link
Collaborator

✔️ ci:test:sf - 1 out of 1 jobs passed in 6 minutes

Click here for more details.

Base Branch:

Branch Name: master
Branch GIT ID: bb62b53077c481ec8a0e32b12f44167900c83e40

Sender Branch:

Branch Name: LPD-47925-LPD-49326-commerce
Branch GIT ID: 4b536d73234543d1f7a6d040296387c6b3518074

1 out of 1jobs PASSED
1 Successful Jobs:
For more details click here.

@liferay-continuous-integration
Copy link
Collaborator

Jenkins Report:jenkins-report.html
Jenkins Suite:sf
Testray Routine:EE Pull Request
Testray Build ID:147065259

@smottal
Copy link
Collaborator

smottal commented Feb 25, 2025

ci:test:um

@liferay-continuous-integration
Copy link
Collaborator

❌ ci:test:um - 206 out of 214 jobs passed in 1 hour 52 minutes

Click here for more details.

Base Branch:

Branch Name: master
Branch GIT ID: c20b2443c4a068aedd20e5cefbf35f51448ecd9b

Upstream Comparison:

Branch GIT ID: c20b2443c4a068aedd20e5cefbf35f51448ecd9b
Jenkins Build URL: EE Development Acceptance (master) - 1207 - 2025-02-24[16:36:49]

ci:test:um - 206 out of 214 jobs PASSED

8 Failed Jobs:

206 Successful Jobs:
    For more details click here.

    Failures unique to this pull:

    1. ...

    @liferay-continuous-integration
    Copy link
    Collaborator

    @izaera
    Copy link
    Author

    izaera commented Feb 25, 2025

    For reference, this PR may need this fix -> liferay-frontend#4759

    @izaera izaera force-pushed the LPD-47925-LPD-49326-commerce branch from 4b536d7 to 21a4f14 Compare February 26, 2025 09:18
    @izaera
    Copy link
    Author

    izaera commented Feb 26, 2025

    I've fixed the rebase conflicts

    @izaera
    Copy link
    Author

    izaera commented Feb 26, 2025

    ci:test:sf

    @izaera
    Copy link
    Author

    izaera commented Feb 26, 2025

    ci:test:relevant

    @izaera
    Copy link
    Author

    izaera commented Feb 26, 2025

    Still waiting for liferay-frontend#4759 so I won't run um suite

    @liferay-continuous-integration
    Copy link
    Collaborator

    ❌ ci:test:sf - 0 out of 1 jobs passed in 4 minutes

    Click here for more details.

    Base Branch:

    Branch Name: master
    Branch GIT ID: 26ff042a7230aca438731909c0ff739a4ecaa938

    Sender Branch:

    Branch Name: LPD-47925-LPD-49326-commerce
    Branch GIT ID: 21a4f14ed45c55b2dc5473e4f73ff94f1b286617

    0 out of 1jobs PASSED
    For more details click here.
         [exec] > Task :packageRunCheckFormat
         [exec] yarn run v1.13.0
         [exec] \$ node-scripts check:ci
         [exec] 
         [exec] ⚙️ Running preflight checks...
         [exec] 
         [exec] ⚙️ Checking outdated tsconfig.json files ...
         [exec] 
         [exec] ⚙️ Running TypeScript checks on modified files...
         [exec] ℹ️ A total of 12 CPUs were detected: launching tsc using 12 workers
         [exec] ❌ Checked apps/commerce/commerce-frontend-js
         [exec]    ../../frontend-js/frontend-js-components-web/src/main/resources/META-INF/resources/feature_indicator/FeatureIndicator.tsx(9,22): error TS2614: Module '"@clayui/popover"' has no exported member 'ALIGN_POSITIONS'. Did you mean to use 'import ALIGN_POSITIONS from "@clayui/popover"' instead?
         [exec]    ../../frontend-js/frontend-js-components-web/src/main/resources/META-INF/resources/translation_manager/TranslationAdminStatusLabel.tsx(6,9): error TS2614: Module '"@clayui/alert"' has no exported member 'DisplayType'. Did you mean to use 'import DisplayType from "@clayui/alert"' instead?
         [exec] 
         [exec] ❌ Checked apps/account/account-admin-web
         [exec]    ../../frontend-js/frontend-js-components-web/src/main/resources/META-INF/resources/feature_indicator/FeatureIndicator.tsx(9,22): error TS2614: Module '"@clayui/popover"' has no exported member 'ALIGN_POSITIONS'. Did you mean to use 'import ALIGN_POSITIONS from "@clayui/popover"' instead?
         [exec]    ../../frontend-js/frontend-js-components-web/src/main/resources/META-INF/resources/translation_manager/TranslationAdminStatusLabel.tsx(6,9): error TS2614: Module '"@clayui/alert"' has no exported member 'DisplayType'. Did you mean to use 'import DisplayType from "@clayui/alert"' instead?
         [exec] 
         [exec] 
         [exec] ⚙️ Running format checks on modified files...
         [exec] ❌ CI checks failed.
         [exec] error Command failed with exit code 1.
         [exec] info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
         [exec] 
         [exec] > Task :packageRunCheckFormat FAILED
         [exec] Gradle build finished at 2025-02-26 09:25:30.112.
         [exec] 
         [exec] 
         [exec] FAILURE: Build failed with an exception.
         [exec] 
         [exec] * What went wrong:
         [exec] Execution failed for task ':packageRunCheckFormat'.
         [exec] > Process 'command '/opt/dev/projects/github/liferay-portal/build/node/bin/node'' finished with non-zero exit value 1
         [exec] 
         [exec] * Try:

    @liferay-continuous-integration
    Copy link
    Collaborator

    Jenkins Report:jenkins-report.html
    Jenkins Suite:sf
    Testray Routine:EE Pull Request
    Testray Build ID:151175581

    @izaera
    Copy link
    Author

    izaera commented Feb 26, 2025

    SF error is known and can be ignored (will be fixed in another PR) -> liferay-frontend#4765

    @izaera
    Copy link
    Author

    izaera commented Feb 26, 2025

    Fix for errors has been merged -> #5953 (comment)

    @liferay-continuous-integration
    Copy link
    Collaborator

    @liferay-continuous-integration
    Copy link
    Collaborator

    ❌ ci:test:commerce-functional - 173 out of 212 jobs passed in 2 hours 28 minutes

    Click here for more details.

    Base Branch:

    Branch Name: master
    Branch GIT ID: 29262a43f1f4cfa4de154c272af8d6dd732879c7

    Upstream Comparison:

    Branch GIT ID: 55d1ceb821cd4bbb0be8f65278556eeb45a6983a
    Jenkins Build URL: EE Development Acceptance (master) - 1209 - 2025-02-25[08:38:59]

    ci:test:commerce-functional - 173 out of 212 jobs PASSED

    39 Failed Jobs:

    173 Successful Jobs:
      For more details click here.

      Failures unique to this pull:

      1. ...

      @liferay-continuous-integration
      Copy link
      Collaborator

      @smottal
      Copy link
      Collaborator

      smottal commented Feb 28, 2025

      ci:report:152684760

      @liferay-continuous-integration
      Copy link
      Collaborator

      Build completed.

      Testray CSV has been generated successfully for testrayBuildID: 152684760.

      Job Link: generate-testray-csv

      Testray CSV Link: testray-results-152684760.csv

      @smottal
      Copy link
      Collaborator

      smottal commented Feb 28, 2025

      ci:test:relevant

      @liferay-continuous-integration
      Copy link
      Collaborator

      ❌ ci:test:stable - 23 out of 24 jobs passed

      ❌ ci:test:relevant - 54 out of 59 jobs passed in 2 hours 36 minutes

      Click here for more details.

      Base Branch:

      Branch Name: master
      Branch GIT ID: a3eeae509ec5c5299f93d233cf94f3f2e7b64129

      Upstream Comparison:

      Branch GIT ID: 55d1ceb821cd4bbb0be8f65278556eeb45a6983a
      Jenkins Build URL: EE Development Acceptance (master) - 1209 - 2025-02-25[08:38:59]

      ci:test:stable - 23 out of 24 jobs PASSED

      1 Failed Jobs:

      23 Successful Jobs:
        ci:test:relevant - 54 out of 59 jobs PASSED

        5 Failed Jobs:

        54 Successful Jobs:
          For more details click here.

          Failures unique to this pull:

          1. js-unit/1/0
            Build was aborted

          Failures in common with acceptance upstream results at 55d1ceb:
          1. ...

          @smottal
          Copy link
          Collaborator

          smottal commented Feb 28, 2025

          ci:test:stable

          @liferay-continuous-integration
          Copy link
          Collaborator

          @liferay-continuous-integration
          Copy link
          Collaborator

          @liferay-continuous-integration
          Copy link
          Collaborator

          Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
          Projects
          None yet
          Development

          Successfully merging this pull request may close these issues.