-
Type:
New Feature
-
Resolution: Fixed
-
Affects Version/s: None
-
Component/s: Main back-end mechanisms (Worker, Logging, etc.)
-
Critical
-
None
-
7.41.1: BETA role out build JS files for faster application loading - currently disabled must be enabled in application.ini
-
None
-
Emptyshow more show less
Problem
The initial loading of the JS and CSS files of translate5 need to be speed up by combining and minifying those files.
Also the usage of a CDN should be evaluated.
Solution
Introduce bash script that will use puppeteer to imitate load of UI by user.
In process we will collect sequence of used ext classes. This is crucial as order of class definition plays big role for Ext app to run.
After queue of js files is collected we will separate them to general App and plugin code.
Then we will concat and minify general App code into 1 file and every plugin code into separate files.
We also will have to redo some localisation logic to fit new js serving logic.
In development mode everything will work as previously.
In prod mode minified files will be served where possible and those that are missing (new plugins, some role based classes, etc) will be loaded with Ext loader as in dev mode.
Usage
Docker repo now has node service.
- create auth token 't5 auth:imp {}user_login*{*}'
- assert that translate5 in development mode
- in docker folder (the one where docker-compose.yml file is) trigger:
docker compose run node sh build_js.sh
- For "Please enter url to translate5 http://php/editor" provide different url only if you setup your docker network differently
- For "User auth token. Choose role with max permissions (like sys-admin): " provide token from p.1
- Result should be "app.min.js" in main repo and specific "*.min.js" file in each plugin that has UI logic
- once version file provided and App switches to prod mode - UI should load much faster
- blocks
-
TRANSLATE-3957 SDLXLIFF diff export struggles when there are entities in the raw content
- Done
- is blocked by
-
TRANSLATE-3951 Missing userGuid in user tracking table
- Done
-
TRANSLATE-5547 Several issues in editor
- Done
- relates to
-
TRANSLATE-5587 JS lib DOMPurify is outdated
- Done