Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[!!!][FEATURE] Flash message view helper add deferred rendering
Deprecate renderMode in favor of a flexible deferred rendering of flash messages in the Fluid template. This means that flash messages should no longer contain HTML tags but only plain text, if rendered by the default rendering. The rendered output will by default now be a <ul> list. The usage of renderMode in the Core is removed and styles are adapted to match the previous output. The core is adapted to now use htmlspecialchars in a controller context for user input. Encoding is now taken care of during rendering of the Fluid template. Resolves: #63453 Releases: master Change-Id: Ie02d2e1441ca2b3c7c159ffa917f7040f50327b5 Reviewed-on: http://review.typo3.org/34818 Reviewed-by: Markus Klein <markus.klein@typo3.org> Tested-by: Markus Klein <markus.klein@typo3.org> Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl> Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de> Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
- Loading branch information
Showing
35 changed files
with
301 additions
and
127 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
40 changes: 40 additions & 0 deletions
40
...n/Changelog/master/Breaking-63453-ChangedRenderingOfFlashMessagesViewHelper.rst
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
=============================================================== | ||
Breaking: #63453 - Changed rendering of FlashMessagesViewHelper | ||
=============================================================== | ||
|
||
Description | ||
=========== | ||
|
||
The default (``renderMode="ul"``) rendering output of the ``FlashMessagesViewHelper`` has been changed. | ||
|
||
By default the view helper rendered an unordered list, each list item containing one message. | ||
This output has been adjusted and more markup is added. | ||
|
||
|
||
Impact | ||
====== | ||
|
||
You may see unexpected formatting of flash messages. | ||
|
||
|
||
Affected Installations | ||
====================== | ||
|
||
Any template using the ``FlashMessagesViewHelper`` unless the attribute ``renderMode`` is set to "div". | ||
Be aware, though, that the ``renderMode`` attribute is deprecated. | ||
|
||
|
||
Migration | ||
========= | ||
|
||
Add a custom rendering template for the flash messages, like outlined in the example, to obtain the same output as before. | ||
|
||
.. code-block:: html | ||
|
||
<f:flashMessages as="flashMessages"> | ||
<ul class="myFlashMessages"> | ||
<f:for each="{flashMessages}" as="flashMessage"> | ||
<li>{flashMessage.message}</li> | ||
</f:for> | ||
</ul> | ||
</f:flashMessages> |
40 changes: 40 additions & 0 deletions
40
...ster/Deprecation-63453-DeprecateRenderModeAttributeOfFlashMessageViewHelper.rst
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
=============================================================================== | ||
Deprecation: #63453 - Deprecate renderMode attribute of FlashMessagesViewHelper | ||
=============================================================================== | ||
|
||
Description | ||
=========== | ||
|
||
Deprecated renderMode in favor of a flexible deferred rendering of flash messages in the Fluid template. | ||
This means that flash messages should no longer contain HTML, but the HTML output can and should be adjusted in the Fluid template. | ||
|
||
|
||
Impact | ||
====== | ||
|
||
Using renderMode on FlashMessage output will throw a deprecation warning. | ||
|
||
|
||
Affected Installations | ||
====================== | ||
|
||
All instances using the renderMode attribute in FlashMessage output. | ||
|
||
|
||
Migration | ||
========= | ||
|
||
Adjust flash messages to contain only plain text and remove the renderMode attribute in the output Templates. | ||
|
||
.. code-block:: html | ||
|
||
<f:flashMessages as="flashMessages"> | ||
<ul class="typo3-flashMessages"> | ||
<f:for each="{flashMessages}" as="flashMessage"> | ||
<li class="alert {flashMessage.class}"> | ||
<h4>{flashMessage.title}</h4> | ||
{flashMessage.message} | ||
</li> | ||
</f:for> | ||
</ul> | ||
</f:flashMessages> |
27 changes: 27 additions & 0 deletions
27
...on/Changelog/master/Feature-63453-TemplateSupportForFlashMessagesViewHelper.rst
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
============================================================== | ||
Feature: #63453 - Template support for FlashMessagesViewHelper | ||
============================================================== | ||
|
||
Description | ||
=========== | ||
|
||
Template support for ``FlashMessagesViewHelper`` has been added. | ||
This allows to define a custom rendering for flash messages. | ||
|
||
The new attribute ``as`` for the ``FlashMessagesViewHelper`` allows to specify a variable name, | ||
which can be used within the view helper's child elements to access the flash messages. | ||
|
||
Example usage: | ||
|
||
.. code-block:: html | ||
|
||
<f:flashMessages as="flashMessages"> | ||
<ul class="myFlashMessages"> | ||
<f:for each="{flashMessages}" as="flashMessage"> | ||
<li class="alert {flashMessage.class}"> | ||
<h4>{flashMessage.title}</h4> | ||
<span class="fancy-icon">{flashMessage.message}</span> | ||
</li> | ||
</f:for> | ||
</ul> | ||
</f:flashMessages> |
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
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
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
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
Oops, something went wrong.