[ItemGroup] Add New Object Action for Item Groups#11549
Conversation
kergomard
left a comment
There was a problem hiding this comment.
Thank you very much for the PR @lukas-heinrich
Please also see my comment here: #11548 .
Thank you for the improvements in the DocBlocks and the moving of the funnily placed continue.
I feel unable to provide you with a lot of feedback in the short and middle term, so here are just a few quick things, that I can already tell you:
- I cannot allow you to set a Modal on
AddNewItemGUIthis is not how this should work. The class is built as an immutable (even if it is not properly declared as such yet). - I do not like the construction of the modal in the constructor and the assignment to a class-property. This has to go.
- Please do not change line breaks, especially not in the constructor.
I could imagine that you rename the function AddNewItemGUI::render() to AddNewItemGUI::renderToolbarAction() and that you then add a second function AddNewItemGUI::getModal() that just builds the modal and returns it (AddNewItemGUI::renderToolbarAction() could then internally use this function to build the modal). That's right now the best I can come up with. The responsibility for any caching needs to be on your side, but I do not think you need any.
I hope this makes at least some sense.
Best,
@kergomard
7d4b575 to
7902a69
Compare
|
Hi @kergomard , Thank you very much for your feedback on these changes. I have removed the dependencies from the Best |
7902a69 to
d88a89b
Compare
alex40724
left a comment
There was a problem hiding this comment.
The one-liner in the container renderer is ok as an intermediate solution for me.
56a4d59 to
e95595a
Compare
|
Hi @kergomard , i've reworked the implementation and slightly adjusted how we interact with the modal in AddNewItemGUI. Could you please take a quick look at these changes? Essentially, I introduced a closure that allows us to perform the necessary manipulations, enabling the modal to open during rendering. This approach keeps the implementation stateless, as we avoid storing any mutable state inside the class itself. As an alternative, I considered implementing a withOpened() (or similar) method to explicitly set the state, but I decided against it. The closure approach is more flexible and avoids over-specifying the API while still allowing additional manipulations if needed. I also refactored this PR to remove the dependency on #11548. The feature now works without these changes. We are now relying on a redirect followed by modal rendering. Let me know what you think. Once we’re done with the review, I’ll squash everything into a single commit. Thanks! |
0ff1a74 to
e9d9250
Compare
…lbarAction This change is related to Feature-Request https://docu.ilias.de/go/wiki/wpage_8622_1357 and the discussion inside ILIAS-eLearning#11549. To prevent context missmatch, a more descriptive name is chosen.
e9d9250 to
89db6d2
Compare
…lbarAction This change is related to Feature-Request https://docu.ilias.de/go/wiki/wpage_8622_1357 and the discussion inside ILIAS-eLearning#11549. To prevent context missmatch, a more descriptive name is chosen.
89db6d2 to
762d045
Compare
See: https://docu.ilias.de/go/wiki/wpage_8622_1357 Implement a new async command to the object group list gui to create and add a new object inside an object group.
…lbarAction This change is related to Feature-Request https://docu.ilias.de/go/wiki/wpage_8622_1357 and the discussion inside ILIAS-eLearning#11549. To prevent context missmatch, a more descriptive name is chosen.
762d045 to
5606efb
Compare
|
Hey @kergomard, As discussed, I’ve reworked the implementation again and split the Please let me know if you’d like any further changes. Otherwise, from our point of view, this PR is ready to go. Kind Regards, |
Hi everyone,
In this PR, @matheuszych and I are providing an implementation of the feature “Add New Object Action for Item Groups”.
During the implementation, we ran into difficulties integrating the header action for item groups. That is why this PR depends on a previous fix we provided separately in #11548.
Best
@lukas-heinrich
/cc @thojou