Skip to content

VCST-3343: Prevent loading stale .html templates #2916

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

Open
wants to merge 6 commits into
base: dev
Choose a base branch
from

Conversation

OlegoO
Copy link
Contributor

@OlegoO OlegoO commented May 26, 2025

Description

feat: Prevent loading stale .html templates by packing them into dist\app.js. Development mode will still read the HTML file from disk.
feat: Added platformWebApp.dynamicTemplateService that allows to ensure that the template is loaded and compiled, regardless of cache status and override an existing template with a custom one.

dynamicTemplateService.ensureTemplateLoaded('Modules/$(VirtoCommerce.Marketing)/Scripts/dynamicConditions/templates.html');
dynamicTemplateService.overrideTemplate('Modules/$(VirtoCommerce.Marketing)/Scripts/dynamicConditions/templates.html', 'ExtensionModules/$(MyCommerce.Marketing)/Scripts/dynamicConditions/templates.html');

References

QA-test:

Jira-link:

https://virtocommerce.atlassian.net/browse/VCST-3295

Artifact URL:

Image tag:
ghcr.io/VirtoCommerce/platform:3.890.0-pr-2916-c9c9-vcst-3295-pack-html-c9c9ff17

fix: Prevent loading stale .html templates by packing them into dist\app.js. Development mode will still read the HTML file from disk.
Copy link
Contributor

@vc-ci vc-ci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test Suite: Test Suites/Modules/module_Assets
Tests: 13
Failures: 0
Errors: 0
Time: 7.237
Timestamp: 26-05-2025T14:32:01

OlegoO added 2 commits May 27, 2025 19:10
…t the template is loaded and compiled, regardless of cache status and Override an existing template with a custom one.
Copy link
Contributor

@vc-ci vc-ci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test Suite: Test Suites/Modules/module_Assets
Tests: 13
Failures: 0
Errors: 0
Time: 7.488
Timestamp: 27-05-2025T17:41:36

Copy link
Contributor

@vc-ci vc-ci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test Suite: Test Suites/Modules/module_Assets
Tests: 13
Failures: 0
Errors: 0
Time: 7.37
Timestamp: 28-05-2025T07:02:47

Copy link
Contributor

@vc-ci vc-ci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test Suite: Test Suites/Modules/module_Assets
Tests: 13
Failures: 0
Errors: 0
Time: 7.606
Timestamp: 02-06-2025T15:16:20

Copy link

sonarqubecloud bot commented Jun 3, 2025

Copy link
Contributor

@vc-ci vc-ci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test Suite: Test Suites/Modules/module_Assets
Tests: 13
Failures: 0
Errors: 0
Time: 7.552
Timestamp: 03-06-2025T10:34:25

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

Successfully merging this pull request may close these issues.

3 participants