-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
JavaScript libraries bundling #12172
Comments
@nijel This will be a big improvement. To sum up, currently used 3d party code is included in the app by So given the desired results here it is what we will have:
How: Some questions:
|
How about placing it under
Recommendations are welcome.
Probably yes, so that install from Git works without building the js files.
This is another reason to have
I'd start with the migration of a few libraries as a proof of concept. How about starting with Sentry (which needs building anyway) and fonts (to make sure that assets are handled correctly).
|
Uh true the name For the bundler I would recommend Other things I think are great I will continue with it from here. I will implement this starting with sentry. |
This issue has been automatically marked as stale because there wasn’t any recent activity. It will be closed soon if no further action occurs. Thank you for your contributions! |
This has been installed manually since ever, so remove it from deps. See also #12172
@meel-hd I've added list of deps into initial comment, I think now it's time to address theme one by one. |
Since tribute.js has been moved to the new build workflow in #12731. Working on moving |
This commit includes: - Removed the libs from the old scripts/yarn workflow - Removed js.cookie.js.license file. - Removed the old scripts of moment and daterangepicker from base.html - And they are now included automatically by main.js Related: WeblateOrg#12172
This commit includes: - Removed the libs from the old scripts/yarn workflow - Removed js.cookie.js.license file. - Removed the old scripts of moment and daterangepicker from base.html - And they are now included automatically by main.js Related: #12172
Changes Include: - Removed the old scripts/yarn/** dir, as it is no longer needed. - Moved source-code-pro and source-sans to client/ - Built and bundled the fonts. - Updated templates to use the new built fonts and styles. - Added new built bundles license info in REUSE.toml. Note: - The old bundles did not get removed to keep this PR simple for review. TODO: - Remove old fonts bundles. - Update any dependents on them to use the new bundles. - if FONTS_CDN_URL is configured it should be seted up with static/js/vendor/fonts instead of the old font-source/ - Remove the old yarn-update workflow and its configs and workflows Related: WeblateOrg#12172
* Move source-code fonts to new build workflow Changes Include: - Removed the old scripts/yarn/** dir, as it is no longer needed. - Moved source-code-pro and source-sans to client/ - Built and bundled the fonts. - Updated templates to use the new built fonts and styles. - Added new built bundles license info in REUSE.toml. Note: - The old bundles did not get removed to keep this PR simple for review. Related: #12172 * Remove usage of fonts_cdn_url * Delete scripts/yarn-update * Remove old fonts and update dependents * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * use font names instead of hash - Update docs/conf.py - Update test_selenium.py * Fix wrong merge * Fix font extension * Fix failed test on missing font * Include TTF fonts needed for bitmap widgets * Revert "Fix failed test on missing font" This reverts commit 81d77ef. * fix: correct fonts path Co-authored-by: Michal Čihař <[email protected]>
Thank you for your report; the issue you have reported has just been fixed.
|
Some files were wrongly licensed after #12172
Describe the problem
Right now, Weblate uses custom tooling to include vendored libraries (see https://docs.weblate.org/en/latest/contributing/frontend.html#dependency-management). This is tricky to deal with for new contributors and brings issues when updating some libraries (see for example https://github.com/WeblateOrg/weblate/actions/runs/10178733602/job/28152952153?pr=11956 in #11956).
Describe the solution you would like
There should be some standard solution that works for us. Requirements (those can be discussed, though):
Describe alternatives you have considered
Things like webpack could be a solution. It might also replace the currently used django-compressor.
Screenshots
No response
Additional context
List of libraries to migrate:
@tarekraafat/autocomplete.js
Libraries which probably won't be migrated:
Maybe we should focus on #2916 instead.
The text was updated successfully, but these errors were encountered: