jdaugherty commented on code in PR #15560:
URL: https://github.com/apache/grails-core/pull/15560#discussion_r3052094627


##########
grails-gsp/plugin/src/main/groovy/org/grails/plugins/web/taglib/ApplicationTagLib.groovy:
##########
@@ -471,4 +471,68 @@ class ApplicationTagLib implements 
ApplicationContextAware, InitializingBean, Gr
         // encoding is handled in GroovyPage.invokeTag and 
GroovyPage.captureTagOutput
         body()
     }
+
+    /**
+     * Renders flash.message, flash.error, and flash.warning as Bootstrap 
alert divs.
+     * Automatically skips rendering if already called during this request, 
preventing
+     * duplicate display when used in both pages and layouts.
+     *
+     * @emptyTag
+     *
+     * @attr messageClass CSS class for flash.message alerts (default: 'alert 
alert-success alert-dismissible fade show')
+     * @attr messageIcon Icon class for flash.message alerts (default: 'bi 
bi-check-circle me-2')
+     * @attr errorClass CSS class for flash.error alerts (default: 'alert 
alert-danger alert-dismissible fade show')
+     * @attr errorIcon Icon class for flash.error alerts (default: 'bi 
bi-exclamation-triangle me-2')
+     * @attr warningClass CSS class for flash.warning alerts (default: 'alert 
alert-warning alert-dismissible fade show')
+     * @attr warningIcon Icon class for flash.warning alerts (default: 'bi 
bi-exclamation-circle me-2')
+     * @attr role ARIA role for alert divs (default: 'alert')
+     * @attr dismissible Whether to show a close button (default: true)
+     */
+    Closure flashMessages = { attrs ->

Review Comment:
   We discussed this in the weekly and we need to release 7.1 soon.  For a 
quick resolution here and to make it in 7.1, we should either make this 
configurable at the app level or move it to the scaffolding project with a 
custom tag lib. Otherwise, we can revisit this in 8.0. 



-- 
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