Skip to content

feat(*): separating block templating from regular one#2279

Merged
ChronosSF merged 3 commits intomasterfrom
templating-split
Jul 3, 2025
Merged

feat(*): separating block templating from regular one#2279
ChronosSF merged 3 commits intomasterfrom
templating-split

Conversation

@kdinev
Copy link
Member

@kdinev kdinev commented Jul 2, 2025

Closes #ISSUE_NUMBER

Additional information (check all that apply):

  • Bug fix
  • New functionality
  • Documentation
  • Demos
  • CI/CD
  • Refactoring

Checklist:

  • All relevant tags have been applied to this PR
  • This PR includes unit tests covering all the new code
  • This PR includes API docs for newly added methods/properties
  • This PR includes general feature table updates in the root README.MD
  • This PR contains breaking changes
  • This PR includes behavioral changes and the feature specification has been updated with them

This comment was marked as outdated.

@kdinev kdinev requested a review from Copilot July 2, 2025 10:13

This comment was marked as outdated.

@kdinev kdinev requested a review from Copilot July 2, 2025 10:28
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the core templating engine to separate block directives into a new advanced module, updates the build and test configurations to include the advanced engine, and adds localization support for missing advanced templating.

  • Decouple block ({{if}}, {{each}}) handling into infragistics.templating.advanced.js.
  • Refactor infragistics.templating.js to use the global $.ig registry and hook into the advanced module.
  • Update tests, build bundles, linting, instrumentation, and i18n for the advanced templating engine.

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/unit/templating/tests.html Include the advanced templating script in the test harness
src/js/modules/infragistics.templating.js Refactor core engine to use $.ig.*, add cache keys and warnings
src/js/modules/infragistics.templating.advanced.js Add new advanced templating implementation for block directives
src/js/modules/i18n/infragistics.templating-en.js Add noAdvancedTemplating localization string
build/packages/combined-files.js Include the advanced module in the combined bundle
build/config/templating/jshint.json Add advanced module to lint configuration
build/config/templating/instrument.json Include advanced module for test instrumentation
Comments suppressed due to low confidence (2)

tests/unit/templating/tests.html:14

  • No unit tests were added to cover the new {{if}} and {{each}} directives provided by the advanced templating engine; please add test cases for these features.
	<script type="text/javascript" src="../../../src/js/modules/infragistics.templating.advanced.js"></script>

src/js/modules/infragistics.templating.advanced.js:1

  • [nitpick] The new advanced templating module lacks documentation for its public API and usage examples; consider adding JSDoc or inline comments to describe its functions and integration steps.
/*!@license

if (typeof $.ig._tokenizeDirectives === "function") {
tmpl = $.ig._tokenizeDirectives(tmpl);
} else {
console.warn($.ig._getLocaleString("noAdvancedTemplating"));
Copy link

Copilot AI Jul 2, 2025

Choose a reason for hiding this comment

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

[nitpick] Warning logic for missing advanced module is duplicated in multiple branches; extracting it into a central helper would reduce repetition and improve maintainability.

Suggested change
console.warn($.ig._getLocaleString("noAdvancedTemplating"));
$.ig._warnNoAdvancedTemplating();

Copilot uses AI. Check for mistakes.
@kdinev kdinev added 24.2 and removed 24.1 labels Jul 2, 2025
@ChronosSF ChronosSF merged commit 9a3e2c1 into master Jul 3, 2025
4 checks passed
@ChronosSF ChronosSF deleted the templating-split branch July 3, 2025 14:56
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.

4 participants