Repository navigation
Conversation
df25f2a to
061b23b
Compare
|
It definitely deserves some CSS love by the forge in the future.. (ping @BettyFromHH)
|
061b23b to
f0ef46d
Compare
Add new variant of `Field\Hidden` component, which accepts multiple values associated to one key, instead of a single value.
Update `UI\Renderer::renderAsync()` so JavaScript is cleared before rendering chain starts. This is necessary because ILIAS controllers contribute parts of the final page independently and regardless of sync/async state. Rendering registers JavaScript as a side effect, making async responses contain leaked JavaScript from unrelated UI components. This is a reminder that we want proper routing inside ILIAS. See: - https://docu.ilias.de/go/wiki/wpage_8780_1357 - https://mantis.ilias.de/view.php?id=47234
Add new `Render\ContextMatcher` which is used inside all our `Render\RendererFactory` instances to determine contexts more consistently.
This improves the overall structure of the `Prompt` component family, especially their client-side facilities. Concretely: * Modernised the client-side architecture to fit existing practices * Streamlined the compisition of the `Prompt\State\State` components * Improved capture functionality of forms and anchors inside prompts * Updated prompt HTML/CSS and used BEMIT naming conventions * Updated how JS code of async responses is added (exactly once) * Added support for `Form\Standard::withAdditionalFormAction()` * Added caching of prompt states that improves multi-stel processes * Added error handling and the display of a failure message box * Added explicit `Prompt\State\Instruction` to determine actions * Added php and javascript unit tests covering the functionality
With 682519346263e783dfda6775ad3242f1640c6a61 the client-side facility changed. This fixes the outdated usages.
With 682519346263e783dfda6775ad3242f1640c6a61 the client-side facility changed. This is a prerequisite that allows the `Field\File` component to properly handle file uploads before the form inside a `Promot\Prompt` is submitted asynchronously. Until now the form was submitted before all file uploads were completed, making it impossible to use file inputs in prompts. See: https://mantis.ilias.de/view.php?id=47956
This makes the `Listing\Entity\Standard` extend from `Prompt\IsPromptContent`, making it usable for prompts. The listing and its entities received context rendering to account for the limited space inside the prompt. In addition we have streamlined the overall architecture by focusing on the new `Entity\EntityRetrieval`, which fits more naturally into the current architecture of the UI framework. Combined with 68aa9d2 this allows us to implement confirmations prompts for single or multiple entities consistently in ILIAS. Co-authored-by: Fabian Helfer <82493694+fhelfer@users.noreply.github.com>
This allows destructuring and declarations of simple objects on one line. This happens farily often, especially import statements.
f0ef46d to
4ee2835
Compare
|
To clarify my proceedings here: This PR contains an adjusted version of #10031 which is contained in 67eb68f. There have only been minor adjustments to the public API since, which has been communicated with JF and we will announce them at the upcoming JF, after merge. The other 8 commits were created by myself while working on other tasks around the |

Hi all,
I have created this PR during the review process of #10031 and #11987. It addresses several of the different things I was working on, because they are all somewhat related and entangled. Credits definitely go to @fhelfer and @schmitz-ilias as well here, because they laid down some important groundwork for his.
I ultimately decided against the
C\Input\Field\Entitycomponent from @fhelfer's PR and to encapsulate the coupling betweenC\Input\Container\Form\StandardandC\Listing\Entity\Standardcomponents (for confirmation prompts) inside the UI framework. The main reason being that it did not feel right to implement a presentational input, the first of its kind, just to solve a compositional issue, especially since (almost) everything to build a confirmation prompt already existed inside the UI framework.I believe we can encapsulate this coupling inside the UI framework once we find an appropriate higher-order component, where the confirmation prompt is merely an implementation detail, e.g. of an object administration page. Until we have such components, we should think about a centralised builder/director facility, which mitigates the compositional issues we still have (or run into). This could be helpful for other use cases as well.
I did however keep the changes to the
C\EntityandC\Listing\Entitycomponent families, which streamlined the overall architecture built around a newC\Entity\EntityRetrieval. To build confirmation prompts we obviously still needed to makeC\Listing\Entity\Standarda viableC\Prompt\IsPromptContentcomponent, which I also adopted from @fhelfer's proposal. I update the context rendering, so we can reuse the same entity template.To provide some syntactic sugar, I have also implemented a new
C\Input\Field\HiddenListcomponent, which is somewhat similar to the proposedC\Input\Field\Entityin terms of carrying the technical identifiers inside the request body. This way, consumers can accumulate multiple identifiers under one key.C\Input\Field\Hiddendid not support this directly.During testing I ran into the following issues:
Thats it in a nutshell.
Kind regards,
@thibsy (as UI coordinator)