Skip to content
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

Feature/switch to knotx template engine #33

Merged
merged 8 commits into from
Nov 30, 2018

Conversation

malaskowski
Copy link
Member

Description

Replace HBS Knot with Template Engine

Motivation and Context

HBS Knot is outdated implementation, it will be replaced by dedicated module Knot.x Template Engine

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

I hereby agree to the terms of the Knot.x Contributor License Agreement.

@@ -77,7 +77,7 @@ public void before() {
expectedHeaders.clear();
expectedHeaders.add("Access-Control-Allow-Origin", "*");
expectedHeaders.add("Content-Type", "text/html; charset=UTF-8");
expectedHeaders.add("content-length", "2995");
expectedHeaders.add("content-length", "2971");
Copy link
Member

Choose a reason for hiding this comment

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

Can we check if that header exists instead of the value?

@@ -42,7 +42,7 @@ <h2>
</div>
</div>
<div class="row">
<script data-knotx-knots="databridge,handlebars"
<script data-knotx-knots="databridge,te"
Copy link
Member

Choose a reason for hiding this comment

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

Can we simplify this test to one service invocation, we test databridge namespaces in module tests.

@@ -56,9 +56,7 @@ <h2>Snippet1 - {[_result.message]}</h2>
<div class="col-md-4">
<h2>Snippet1 - {[second._result.message]}</h2>
Copy link
Member

Choose a reason for hiding this comment

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

Can we make the custom simple more visible like &&value&& instead of {[value]}.

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually it makes more sense to move tests with custom delimiter to knotx-template-engine module.

@@ -42,7 +42,7 @@ <h2>
</div>
</div>
<div class="row">
<script data-knotx-knots="databridge,handlebars"
<script data-knotx-knots="databridge,te"
Copy link
Member

Choose a reason for hiding this comment

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

Can we use change snippet options:

  1. tag name from <script> to <knotx:snippet>
  2. attribute prefix = '', ex. knots="..."

@@ -26,7 +26,7 @@
<body>
<div class="container-fluid">
<div class="row">
<script data-knotx-knots="databridge,handlebars"
<script data-knotx-knots="databridge,te"
Copy link
Member

Choose a reason for hiding this comment

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

Can we limit the html file to this snippet only?

@@ -43,7 +43,7 @@ <h2>
</div>
Copy link
Member

Choose a reason for hiding this comment

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

Can we limit the html file content?

Copy link
Member Author

Choose a reason for hiding this comment

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

There are too many changes that are not connected with introducing template engine.
I've created #34 to do them.

@@ -42,7 +42,7 @@ <h2>
</div>
Copy link
Member

Choose a reason for hiding this comment

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

Can we limit the html file to this snippet only?

@@ -42,7 +42,7 @@ <h2>
</div>
Copy link
Member

Choose a reason for hiding this comment

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

Do we want to keep the same files in the same once?

@malaskowski malaskowski mentioned this pull request Nov 30, 2018
@tomaszmichalak tomaszmichalak merged commit 1cb9f3a into master Nov 30, 2018
@tomaszmichalak tomaszmichalak deleted the feature/switch-to-knotx-template-engine branch November 30, 2018 14:01
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.

2 participants