Copilot commented on code in PR #1479:
URL: https://github.com/apache/camel-website/pull/1479#discussion_r2699224001


##########
antora-ui-camel/src/partials/article.hbs:
##########
@@ -12,6 +12,22 @@ If you typed the URL of this page manually, please double 
check that you entered
 {{#with page.title}}
 <h1 class="page">{{{this}}}</h1>
 {{/with}}
+{{#unless (eq page.attributes.deprecated undefined)}}
+<div class="admonitionblock warning">
+<table>
+<tbody>
+<tr>
+<td class="icon">
+<div class="title">Warning</div>

Review Comment:
   The icon structure doesn't match the expected AsciiDoc admonition format. 
According to the CSS in `src/css/doc.css` (lines 359-369), the icon should 
contain an `<i>` element with a `title` attribute. The CSS rule `.doc 
.admonitionblock .icon i::after` uses `content: attr(title)` to display the 
icon label. Replace `<div class=\"title\">Warning</div>` with `<i 
title=\"Warning\"></i>` to match the standard AsciiDoc admonition structure.
   ```suggestion
   <i title="Warning"></i>
   ```



##########
antora-ui-camel/src/partials/article.hbs:
##########
@@ -12,6 +12,22 @@ If you typed the URL of this page manually, please double 
check that you entered
 {{#with page.title}}
 <h1 class="page">{{{this}}}</h1>
 {{/with}}
+{{#unless (eq page.attributes.deprecated undefined)}}

Review Comment:
   The condition checks if deprecated is NOT undefined, which means the warning 
will appear for any truthy value or even empty string. According to the issue 
#1477, the attribute should be explicitly checked for a truthy value. Consider 
using `{{#if page.attributes.deprecated}}` instead, which provides clearer 
intent and properly handles falsy values.



##########
antora-ui-camel/src/partials/article.hbs:
##########
@@ -12,6 +12,22 @@ If you typed the URL of this page manually, please double 
check that you entered
 {{#with page.title}}
 <h1 class="page">{{{this}}}</h1>
 {{/with}}
+{{#unless (eq page.attributes.deprecated undefined)}}
+<div class="admonitionblock warning">
+<table>
+<tbody>
+<tr>
+<td class="icon">
+<div class="title">Warning</div>
+</td>
+<td class="content">
+This {{or page.attributes.shortname page.title}} is deprecated

Review Comment:
   The message uses raw page.title as fallback, which will include HTML markup 
since page.title can contain formatted text. This could result in HTML tags 
being displayed in the deprecation message. Consider using a plain text 
attribute or sanitizing the output to avoid displaying HTML markup in the 
warning message.
   ```suggestion
   This {{or page.attributes.shortname 'page'}} is deprecated
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to