62360[BUGFIX] Add more safety checks when dealing with buttons in the BE
Commit message
Review
-
Code review CR +2 Done
- Susi Moog +2
- Johannes Kasberger +1
-
Verified V +2 Done
- Susi Moog +2
- Johannes Kasberger +1
- TYPO3com +1 CI
Issues 1
Files 1
Review log 1112
-
Markus Klein uploaded patch set 1 11/21/19, 14:52
-
TYPO3com voted on patch set 1 V +1 11/21/19, 15:00 Completed build in 07m 32s on Thu, 21 Nov, 03:00 PM Test Summary: 48061 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-38557
-
Johannes Kasberger voted on patch set 1 V +1 CR +1 11/21/19, 16:00
-
Susi Moog commented on patch set 1 V -1 12/05/19, 15:55
well, I can add the link button now... which breaks the layout and does not work at all (at a guess because the javascript of the split button is doing a preventDefault). Tested with the core scheduler split button and a link button like: $someButton = $buttonBar->makeLinkButton()->setHref('https://example.com';) ->setTitle('EXAMPLE') ->setIcon($this->iconFactory->getIcon('actions-document-save', Icon::SIZE_SMALL)); -
Markus Klein commented on patch set 1 12/05/19, 16:20
> Patch Set 1: Verified-1 > > well, I can add the link button now... which breaks the layout and does not work at all (at a guess because the javascript of the split button is doing a preventDefault). Tested with the core scheduler split button and a link button like: > > $someButton = $buttonBar->makeLinkButton()->setHref('https://example.com';) > ->setTitle('EXAMPLE') > ->setIcon($this->iconFactory->getIcon('actions-document-save', Icon::SIZE_SMALL)); That's the whole idea. We need to add link buttons to a split button. The API allows for this since ever. It is not limited to any certain kind of button. We actually have that running live with link buttons and it works flawlessly. -
Susi Moog commented on patch set 1 12/05/19, 17:27
> Patch Set 1: > > > Patch Set 1: Verified-1 > > > > well, I can add the link button now... which breaks the layout and does not work at all (at a guess because the javascript of the split button is doing a preventDefault). Tested with the core scheduler split button and a link button like: > > > > $someButton = $buttonBar->makeLinkButton()->setHref('https://example.com';) > > ->setTitle('EXAMPLE') > > ->setIcon($this->iconFactory->getIcon('actions-document-save', Icon::SIZE_SMALL)); > > That's the whole idea. We need to add link buttons to a split button. The API allows for this since ever. It is not limited to any certain kind of button. > > We actually have that running live with link buttons and it works flawlessly. The idea is probably not that it breaks. Do you have a working example for me? as I stated above, when I add this to the splitButton in Scheduler it simply breaks. I get that the idea is to get it working, but this patch does not do that for me. -
Markus Klein commented on patch set 1 12/05/19, 20:48
> Patch Set 1: > > > Patch Set 1: > > > > > Patch Set 1: Verified-1 > > > > > > well, I can add the link button now... which breaks the layout and does not work at all (at a guess because the javascript of the split button is doing a preventDefault). Tested with the core scheduler split button and a link button like: > > > > > > $someButton = $buttonBar->makeLinkButton()->setHref('https://example.com';) > > > ->setTitle('EXAMPLE') > > > ->setIcon($this->iconFactory->getIcon('actions-document-save', Icon::SIZE_SMALL)); > > > > That's the whole idea. We need to add link buttons to a split button. The API allows for this since ever. It is not limited to any certain kind of button. > > > > We actually have that running live with link buttons and it works flawlessly. > > The idea is probably not that it breaks. Do you have a working example for me? as I stated above, when I add this to the splitButton in Scheduler it simply breaks. I get that the idea is to get it working, but this patch does not do that for me. Sorry Susi, I mixed some things up. First off, this patch does not fully enable adding LinkButtons to Splitbuttons. It does not make things better/worse than it was before. But it makes the function type-safe. So applying the patch should not break anything that exists. (For making LinkButtons work one needs to do a bit more to the addItem and the render function. We do that on the mentioned live system.) -
Susi Moog commented on patch set 1 12/07/19, 06:57
> Patch Set 1: > (For making LinkButtons work one needs to do a bit more to the addItem and the render function. We do that on the mentioned live system.) ok, but wouldn't it make sense to add these adjustments to the patch as well? this way, we just break it in a different way. -
Markus Klein commented on patch set 1 12/07/19, 16:44
I'm not so sure if we should do that for v9 then. This patch should only make sure that the existing API is consistent: No access to a method that might not be there. -
Susi Moog wrote 01/24/20, 19:28
Removed Verified-1 by Susanne Moog <look@susi.dev> -
Susi Moog voted on patch set 1 V +2 CR +2 01/24/20, 19:28
-
Susi Moog merged patch set 2 01/24/20, 19:28