kwin commented on code in PR #63: URL: https://github.com/apache/maven-fluido-skin/pull/63#discussion_r1744285567
########## src/main/resources/META-INF/maven/site-macros.vm: ########## @@ -143,12 +146,12 @@ #* *##set( $style = "" ) #* *##end #* *##set( $style = "$width$height$style" ) -<img class="$class"$src$alt#if( $style ) style="$style"#end />## +<img#if( $class ) class="$class"#end$src$alt#if( $style ) style="$style"#end />## #end ## #macro( banner $banner $id ) #**##if( $banner ) -#* *#<div id="$id"><h1>#link( $banner false false false "set" )</h1></div>## +#* *#<div id="$id"><h1>#link( $banner false false false "set" false "" )</h1></div>## Review Comment: I would rather use `$banner null false null null null "set" ""` (slightly clearer). Using `false` for String arguments is confusing to me. ########## src/main/resources/META-INF/maven/site-macros.vm: ########## @@ -89,8 +89,11 @@ #**##if( !$href && $elemOnEmptyHref ) #* *##set( $wrapElem = $elemOnEmptyHref ) #**##end -#**##if( $elemClass ) -#* *##set( $class = ' class="' + $elemClass + '"' ) +#**##if( $overrideElemClass ) +#* *##set( $class = ' class="' + $overrideElemClass + '"' ) Review Comment: maybe nested if/else to distinguish empty class is clearer. ########## src/main/resources/META-INF/maven/site-macros.vm: ########## @@ -48,7 +48,7 @@ #**##end #end ## -#macro( link $link $icon = false $omitImage = false $elemOnEmptyHref = "a" $dotSlashOnEmptyHref = false $imageClass = "imageLink" $elemClass = false ) +#macro( link $link $icon = false $omitImage = false $elemOnEmptyHref = "a" $dotSlashOnEmptyHref = false $imageClass = "imageLink" $overrideElemClass = false ) Review Comment: for clarity reasons I would only use `false` on boolean toggles but `null` on arguments which may have a String `value` (https://velocity.apache.org/engine/1.7/user-guide.html#if-elseif-else) -- 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: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org