Skip to content

Conversation

@henryjonathanquispe
Copy link
Contributor

@henryjonathanquispe henryjonathanquispe commented Dec 5, 2024

Solution

  • Create chunks for vendor.js in webpack.js

Related Tickets & Packages

Code Review Checklist

  • I have pulled this code locally and tested it on my instance, along with any associated packages.
  • This code adheres to ProcessMaker Coding Guidelines.
  • This code includes a unit test or an E2E test that tests its functionality, or is covered by an existing test.
  • This solution fixes the bug reported in the original ticket.
  • This solution does not alter the expected output of a component in a way that would break existing Processes.
  • This solution does not implement any breaking changes that would invalidate documentation or cause existing Processes to fail.
  • This solution has been tested with enterprise packages that rely on its functionality and does not introduce bugs in those packages.
  • This code does not duplicate functionality that already exists in the framework or in ProcessMaker.
  • This ticket conforms to the PRD associated with this part of ProcessMaker.

ci:package-webentry:feature/FOUR-21371
ci:connector-docusign:feature/FOUR-21371

@pmPaulis pmPaulis changed the title FOUR-20583: S2: Improve vendors FOUR-20583: Improve vendors Dec 12, 2024
@pmPaulis pmPaulis changed the title FOUR-20583: Improve vendors FOUR-20583: Improve vendors, boostrap and app-layout Dec 19, 2024
@nolanpro
Copy link
Contributor

nolanpro commented Dec 19, 2024

@pmPaulis @henryjonathanquispe Here are my initial notes and questions:

  • loader*.js files have a lot of duplication. You could extract to a common folder and wrap the differences in if statements and call it like this
import { initializeCommonLoader } from "../next/commonLoader";
import sharedComponents from "../next/libraries/sharedComponents";
import vueFormElements from "../next/libraries/vueFormElements";

initializeCommonLoader({
 includeScreenBuilder: true,
 includeModeler: false,
 includeMonaco: false,
});
  • is accesibility.js being used anywhere?
  • If we make any changes to the logic in bootstrap.js and app-layout.js, do we need to duplicate that logic in the next folder until the entire app is converted to use the new code?
  • What’s the purpose of the badPractices.js file?
  • EventBus, apilient, etc. should be in their own files that are imported as a modules instead of being passed in with globalInput in next/config/*.js files. Can we get rid of globalInput attribute everywhere? If you really need a global import and use the globalVariables.js helper.

@henryjonathanquispe
Copy link
Contributor Author

henryjonathanquispe commented Jan 9, 2025

@pmPaulis
I've created a PR: #7869
for the changes.

@nolanpro
Answered your questions:

Is accessibility.js being used anywhere?
Yes, it is used.

If we make any changes to the logic in bootstrap.js and app-layout.js, do we need to duplicate that logic in the next folder until the entire app is converted to use the new code?
Yes, duplication is necessary for now.

What’s the purpose of the badPractices.js file?
This file no longer exists.

Regarding EventBus, apiClient, etc.: These should now reside in their own files and be imported as modules instead of being passed in with globalInput in next/config/*.js files. Can we get rid of the globalInput attribute everywhere? If a global import is absolutely needed, use the globalVariables.js helper.
I've implemented these changes. The globalInput has been removed.

@pmPaulis pmPaulis changed the title FOUR-20583 : Improve vendors, boostrap and app-layout FOUR-20583 : [WINTER] Improve vendors, boostrap and app-layout Jan 10, 2025
@pmPaulis pmPaulis changed the title FOUR-20583 : [WINTER] Improve vendors, boostrap and app-layout FOUR-20583: [WINTER] Improve vendors, boostrap and app-layout Jan 13, 2025
@caleeli caleeli changed the base branch from epic/FOUR-20336-FOUR-20337 to epic/performance January 14, 2025 13:40
@pmPaulis pmPaulis changed the base branch from epic/performance to epic/FOUR-20336-FOUR-20337 January 14, 2025 13:42
@pmPaulis pmPaulis changed the base branch from epic/FOUR-20336-FOUR-20337 to epic/FOUR-20336 January 14, 2025 15:35
@pmPaulis pmPaulis requested a review from caleeli January 15, 2025 20:36
@pmPaulis
Copy link
Contributor

@pmPaulis pmPaulis changed the title FOUR-20583: [WINTER] Improve vendors, boostrap and app-layout FOUR-20583 FOUR-20336: [WINTER] Improve vendors, boostrap and app-layout Jan 17, 2025
@pmPaulis pmPaulis changed the base branch from epic/FOUR-20336 to release-2025-winter January 23, 2025 15:37
@pmPaulis
Copy link
Contributor

@henryjonathanquispe
the PR has conflicts with the following PR
https://github.com/ProcessMaker/processmaker/pull/7873/files

@processmaker-sonarqube
Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@pmPaulis pmPaulis self-requested a review January 23, 2025 19:05
@pmPaulis
Copy link
Contributor

@ryancooley @boliviacoca
This PR has the following Failing in the unit test, this is not related with the changes but we will review in a specific ticket.

Filter (Tests\Filter)
 ✘ Compare data integer
   │
   │ Failed asserting that actual size 2 matches expected size 1.
   │
   │ /opt/processmaker/tests/unit/ProcessMaker/FilterTest.php:88
   │ /opt/processmaker/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php:176
   │

@ryancooley ryancooley merged commit 706e3bc into release-2025-winter Jan 23, 2025
10 of 11 checks passed
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.

8 participants