36589[FEATURE] Added support for multiple FlashMessage queues
Commit message
Review
-
Code review CR +2
- Markus Klein +2
- Alexander Schnitzler +1
-
Verified V +2
- Markus Klein +2
- Alexander Schnitzler +1
Issues 1
Files 4
- typo3/sysext/core/Documentation/Changelog/master/Feature-64726-UsingArbitraryFlashmessageQueues.rst5new+26 −0
- typo3/sysext/extbase/Classes/Mvc/Controller/ControllerContext.php9+11 −9
- typo3/sysext/fluid/Classes/ViewHelpers/FlashMessagesViewHelper.php8+7 −1
- typo3/sysext/fluid/Tests/Unit/ViewHelpers/FlashMessagesViewHelperTest.php+21 −0
Review log 34
Show 9 earlier messages
-
Stefan Neufeind uploaded patch set 1 02/01/15, 17:34
-
Stefan Neufeind commented on patch set 1 02/01/15, 17:35
So far untested! What do you think? -
Stefan Neufeind commented on patch set 1 CR -1 02/01/15, 17:37
Update shortly. -
Stefan Neufeind uploaded patch set 2 02/01/15, 17:44
-
Stefan Neufeind commented on patch set 2 02/01/15, 17:45
If this finds approval, add some basic tests (for the fluid-viewhelper maybe, which also tests the queue-fetching then). -
Mathias Brodala commented on patch set 2 CR -1 02/02/15, 08:32
ControllerContext.php:143How about directly setting "_controller_default" as default value here and thus drop the check? -
Stefan Neufeind commented on patch set 2 02/02/15, 08:56
ControllerContext.php:143ReplyWe could set it here. But it's just an arbitrarily chosen (internal!) value. We need to call the API without this name but need "some" name to store the object in our array. -
Mathias Brodala commented on patch set 2 02/02/15, 09:22
Alright. See other comment please.FlashMessagesViewHelper.php:92This is wrong as it would imply output like this: <ul queueName="foo">...</ul>FlashMessagesViewHelper.php:105Please add $queueName here instead. -
Stefan Neufeind commented on patch set 2 CR -1 02/02/15, 09:33
FlashMessagesViewHelper.php:92Replyright, should have been registerArgument() with FALSE as last parameter to mark it as optional.FlashMessagesViewHelper.php:105ReplyWe could. What's the "right way" to do it in Fluid (for TYPO3.Fluid and TYPO3 CMS Fluid)? Personally I meanwhile migrated to registerAttributes and using $this->arguments - like for example EXT:vhs (FluidTYPO3) does it as well.
-
Mathias Brodala commented on patch set 2 02/02/15, 09:39
FlashMessagesViewHelper.php:92ReplyIf you use registerArgument instead of registerTagAttribute, I'm fine with that. :-)FlashMessagesViewHelper.php:105ReplySee above. -
Stefan Neufeind uploaded patch set 3 02/02/15, 10:16
-
Stefan Neufeind commented on patch set 3 CR -1 02/02/15, 10:20
@Mathias: Looking at it like this ... it doesn't really get easier if we use a different default than NULL, does it? And it's just an arbitrarily chosen, internal name just for storing in the array. From the ViewHelper imho it's easier to simply pass NULL. Feel free to shift the patch around a bit and maybe push a followup.ControllerContext.php:143Hmm, but from the ViewHelper it would be cleaner/easier to be able to pass NULL here, like it was before right? -
Mathias Brodala commented on patch set 3 02/02/15, 10:24
ControllerContext.php:143ReplyYeah, you're right about this. Feel free to revert this part to the previous variant. -
Stefan Neufeind uploaded patch set 4 02/02/15, 10:32
-
Stefan Neufeind commented on patch set 4 02/02/15, 10:32
Maybe it's easier like this ... -
Mathias Brodala commented on patch set 4 CR +1 02/02/15, 10:53
Less verbose but still down to the point. Fine with me. :-) -
Stefan Neufeind uploaded patch set 5 02/03/15, 11:04
-
Stefan Neufeind commented on patch set 5 02/03/15, 11:06
Now with rst and an (at least basic) check that the correct queue is being queried. Please help decide if we want to have it named queueIdentifier (well, just internal) and queueName (in the ViewHelper). I looked up that TYPO3.Fluid doesn't seem to have any kind of "queue" or so in their ViewHelper as well. Over there it's named container - but there is also no parameter to query another container or so (if multiple containers exist in their concept at all). -
Mathias Brodala commented on patch set 5 CR -1 02/03/15, 11:07
Just noticed you already wrote about queueIdentifier/queueName but I'll keep it as inline reference.Feature-64726-UsingArbitraryFlashmessageQueues.rst:15Remove this. ;-)Feature-64726-UsingArbitraryFlashmessageQueues.rst:23Just noticed this: queueIdentifier VS queueName. Maybe unify this?Feature-64726-UsingArbitraryFlashmessageQueues.rst:30Not really useful impact. How about "Extensions may now render foreign flash message queues and add messages to them." -
Stefan Neufeind uploaded patch set 6 02/03/15, 11:21
-
Stefan Neufeind commented on patch set 6 02/03/15, 11:22
Since the Extbase-API already has the name "queueIdentifier" that is fixed. And if we want to have it consistent, Fluid should name it like that as well. Renamed. -
Mathias Brodala voted on patch set 6 CR +1 02/03/15, 11:42
-
Nicole Hummel commented on patch set 6 CR -1 02/04/15, 21:57
ControllerContext.php:48Do we have to support more than one queue?ControllerContext.php:143I would prefer a new property to set and get an identifier for a controller than to store multiple queues in an arrayFlashMessagesViewHelper.php:100If we would have getter and setter on controller level we don't need any argument in the view helper. We could simply use the controller context and get the current identifier. -
Stefan Neufeind commented on patch set 6 02/04/15, 22:11
ControllerContext.php:48ReplyI don't get what we "loose". You can still use it the way you are used to.ControllerContext.php:143ReplyDepending on a case (for example on where you will redirect in the next step) it might be that you'll need to switch to a different queue - because the page you are refering to maybe is a profile-overview-page or so. In that case it would be helpful to be able to write to a different queue. But I don't see why we'd need to switch the whole controller-queueidentifier around ... why? Another case: You might have one plugin with several areas and depending on something you want to output messages on top or below. The easiest solution might then be to create your own queue for those various parts. But why switch the whole controller with a setter?FlashMessagesViewHelper.php:100ReplyYou might have *one* template showing one queue in one place and the other further down or so. We had that usecase. And no, then I wouldn't want to create a viewhelper to switch controller-queue-contexts :-) -
Markus Klein commented on patch set 6 07/09/15, 21:46
Feature-64726-UsingArbitraryFlashmessageQueues.rst:2Added support for multiple FlashMessage queuesFeature-64726-UsingArbitraryFlashmessageQueues.rst:12better markup pls. ..code .....ControllerContext.php:143ReplyI think this is ok. The context of the controller should still be the same, even if the controller wants to use multiple queues -
Stefan Neufeind uploaded patch set 7 07/13/15, 13:51
-
Stefan Neufeind commented on patch set 7 07/13/15, 16:06
Took care of comments by Markus. And I hope in the discussion we were also able to clarify Nicoles concerns with this. -
Stefan Neufeind uploaded patch set 8 07/13/15, 19:51
-
Markus Klein commented on patch set 8 CR -1 07/14/15, 12:10
We discussed that this solution is not optimal -
Stefan Neufeind uploaded patch set 9 07/14/15, 18:45
-
Alexander Schnitzler voted on patch set 9 CR +1 08/16/15, 13:40
-
Alexander Schnitzler commented on patch set 9 V +1 08/16/15, 13:45
Couldn't run the unit tests but tested it in an extension. -
Markus Klein voted on patch set 9 CR +2 V +2 08/16/15, 13:55
-
Markus Klein merged patch set 9 08/16/15, 13:55