Skip to content

UI: a few tweaks to fix roundtrip modals as prompt content - #11105

Open
schmitz-ilias wants to merge 1 commit into
ILIAS-eLearning:trunkfrom
schmitz-ilias:12_modal_in_prompt
Open

UI: a few tweaks to fix roundtrip modals as prompt content#11105
schmitz-ilias wants to merge 1 commit into
ILIAS-eLearning:trunkfrom
schmitz-ilias:12_modal_in_prompt

Conversation

@schmitz-ilias

Copy link
Copy Markdown
Contributor

This PR makes roundtrip modals work as the content of prompts. Most of the needed infrastructure is already there from the original implementation of prompts, there are just a few tweaks needed, mostly in rendering.

I'm using prompts in the implementation of ‘Publish as OER‘ Button for Objects, and with these tweaks everything works great. Prompts are a really handy tool for implementing multi-step workflows asynchronously.

Let me know if you want anything done differently.

Cheers, Tim

@schmitz-ilias schmitz-ilias added kitchen sink php Pull requests that update Php code labels Feb 11, 2026

@thibsy thibsy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @schmitz-ilias,

Thx a lot for bringing this to my attention!

That is actually a very unintended side-effect of making the Input\Form\Standard a valid prompt content (good example of why inheritance is bad). Using a Modal\Roundtrip as content for a Prompt\Prompt defeats its purpose, since it was actually meant to replace it =).

So, if you tell me what contents your roundtrip modal holds, besides a Input\Form\Standard and a MessageBox\MessageBox, we can discuss if something else should become a Prompt\IsPromptContent instead.

In the meantime, I will open a PR myself to remove any unwanted derivatives of Input\Form\Standard from being valid prompt content.

Kind regards,
@thibsy (as UI coordinator)

@thibsy

thibsy commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

See #11853

@schmitz-ilias

Copy link
Copy Markdown
Contributor Author

Hi @thibsy,

I thought roundtrip modals as prompt content was deliberate, to ease the transition to prompts until prompts are actually fully ready to replace modals ^^

As you can see in ‘Publish as OER‘ Button for Objects, I use message boxes in combination with a Chart\ScaleBar in prompts. I don't think this will be possible even with more components tagged with Prompt\IsPromptContent.

That being said, I think how I use the Chart\ScaleBar as a visualization of where the user currently is in their workflow fits kind of neatly into the semantics of prompts, and could be useful in general. How about a withWorkflowStatus or something like that for Prompt\State, with Chart\ScaleBar as the argument?

Further, both forms and message boxes don't properly contribute a title to the prompt (for forms the title is empty, and for message boxes it's the type of the box). The implementation of Prompt\State already has withTitle, but that isn't part of the interface, so custom titles for prompts are not possible "officially" without the roundtrip modal. Prompt\State::withTitle is actually already in use in the ConsecutiveScoringGUI in TA as what looks like a temporary solution, not sure what the long term plan is there.

I'd appreciate it if you could keep #11853 and this PR open until we have a solution, so that we can have a functioning publish button in ILIAS 12 no matter how long this discussion takes.

Best, Tim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kitchen sink php Pull requests that update Php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants