-
Notifications
You must be signed in to change notification settings - Fork 253
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(templates): replace HTML comments with HBS ones (#4681)
Replaces the HTML comments inside the HBS templates with HBS comments as suggested in the related issue and following the [official docs](https://handlebarsjs.com/examples/comments.html). The HBS comments are stripped from the output and are available only to developers at DEV time, while the HTML ones are part of the output and could be observed in the browser. After this change only the lit-html comments can be seen. Previously (the comment is part of the lit template) ```js const block0 = (context, tags, suffix) => html`<div class="ui5-panel-root"><!-- header: either header or h1 with header text --><div @click="${context._headerClick}" ``` After (the comment is removed) ```js const block0 = (context, tags, suffix) => html`<div class="ui5-panel-root"><div @click="${context._headerClick}" ``` As the related issue suggests, I went trough the list of tasks: - [ ] investigate the hbs2lit script's handling of comments - we can look at this more closely, so far haven't found anything specific to comments, the following [line] somehow seems relevant at least it has "comment" in the name (https://github.com/SAP/ui5-webcomponents/blob/master/packages/tools/lib/hbs2lit/src/partialsVisitor.js#L95) ```js CommentStatement: function(/* comment */) {}, ``` - [X] add support for hbs comments, if necessary - have not found issues so far, HBS comments work as expected - [x] use hbs comments everywhere (fix all current templates) - done with the change Related to: #2802
- Loading branch information
Showing
5 changed files
with
9 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters