Repository navigation
Conversation
6442e58 to
4f4a136
Compare
|
|
8cf0945 to
acec51b
Compare
acec51b to
e08e7c3
Compare
6b1d234 to
f323458
Compare
|
There is a change in the interface of Prompt - it now is constructed with an URLBuilder instead of an URI. |
f323458 to
afcc997
Compare
There was a problem hiding this comment.
Hi @nhaagen,
Thanks a lot for your contribution to the UI components!
About the concrete changes, please answer the following questions:
- Async
Table\Action\Action: what is the advantage of accepting aPromptin the constructor vs. simply rendering thePromptinternally, when an action is considered async? Could we not leverage theURIparameter ofPrompt::getShowSignal()to achieve the same result?
Kind regards,
|
we actually do render a single default prompt as template and alter its target in the JS. The reason for using a template is obvious: rendering a prompt for every action and row is way too much. The construction of an action with prompt actually strengthens the prompt's semantic: A Prompt points to an endpoint, usually a component, and thus "lives" in the component's domain. There still is need for a "moving" parameter in order to point to the record(s), and that's provided via a token for that exact prompt/URLBuilder. E.g., we might then write code like this at the component: and use it in the table like this:
Best regards, |
There was a problem hiding this comment.
Hi @nhaagen,
Thx for the explanation and sorry for the delay here.
When reviewing this PR I had a hard time to understand why we need a C\Prompt\Prompt in order to create a C\Table\Action\Action. If I understand correctly, the prompt will only be used to communicate to the action that it should be called asynchronously (by using the prompt template for C\Table\Data). The rest of the prompt is simply discarded. IMO we should either fully embrace the prompt and make the action a composite UI component, which actually renders every prompt, or we should leave the action as it is because we already have a way to determine if its asynchronous - and the prompt would then be misleading.
Rendering the internal prompt inside the I\Table\Renderer is also problematic at the moment, because you rely on the request being provided, which is not always the case. Embracing the prompt in actions would solve this problem while consumers would also benefit, because they could respond to the prompts signals this way.
Let me know how you want to proceed.
Kind regards,
@thibsy
|
@nhaagen I assign this back to you. Feel free to reassign once we can proceed. |
|
Hello @nhaagen, |
66268de to
d9582df
Compare
|
@nhaagen is this ready for review? |
|
Hello everyone, I have discussed this with @thibsy today, and I think I now understood. The core of the question is: We already have a The symptom of this is protected URLBuilder | Prompt $url_builder,in the constructor of protected Prompt | URLBuilder $prompt,as this is what we actually want to have. This makes a lot of sense to me and I kindly ask @nhaagen to adjust the code accordingly. I also expect that the code might become smaller and simpler then... Kind regards! |
d5f4743 to
e04fa35
Compare
|
Actions may now be constructed with Prompt and URLBuilder; withAsync (and the according Modals) have fallen. |
thibsy
left a comment
There was a problem hiding this comment.
Thx a lot @nhaagen for fully embracing the prompt. This looks a lot more straightforward IMO =).
However, you remove the withAsync() option completely now, which leaves a lot of usages not attended to in the latest trunk. I approve of the changes but cannot merge this until usages are either amended or the option is added as a transitional measure again (with deprecation). Therefore, please
-
Action::withAsync(): either amend all current usages of this method or introduce it again as a transitional measure. - Conflicts: rebase this onto the latest trunk
Kind regards,
@thibsy
|
I was so sure I saw a deprecation-note for 11 on withAsync - but that was probably from myself in a former version of this 🫣 |
d7037c6 to
ce6baea
Compare
|
- Prompt is constructed with URLBuilder - Actions may be constructed with Prompts - deprecate async (modal) Actions, make Prompt standard
ce6baea to
7458c5b
Compare
|
Hi @oliversamoila, I think you should discuss with @thibsy how to proceed in the future with this PR 🙈 |
|
Superseded by #12389 |
following #7045, this adds Prompts to DataTable's Actions.