Skip to content

[FEATURE] UI: add Table\PresentationRow::withTags() - #12240

Open
kevenClausenKPG wants to merge 1 commit into
ILIAS-eLearning:trunkfrom
kroepelin-projekte:feature/trunk/kc/presentation-row-tags
Open

kevenClausenKPG wants to merge 1 commit into
ILIAS-eLearning:trunkfrom
kroepelin-projekte:feature/trunk/kc/presentation-row-tags

Conversation

@kevenClausenKPG

Copy link
Copy Markdown
Contributor

Hi all,

This PR adds a dedicated slot for Tags to the rows of the Presentation Table:

  • Table\PresentationRow::withTags(Button\Tag ...$tags): static
  • The Tags are rendered below the headline, in their own bar, in the collapsed and in the expanded row.
  • A new Kitchen Sink example Table/Presentation/with_tags.php shows two rows, one with two and one with three Tags.

Background:

  • The Jour Fixe on 2026-10-19 asked for this in the discussion of [Misconfiguration Badge](https://docu.ilias.de/go/wiki/wpage_8943_1357): tag buttons should be passed to the UI framework explicitly and rendered in a proper place, not as part of the title.
  • In LearningSequence: Adaptive Learning Paths #12210 the Learning Sequence passes pre-rendered Tag HTML through withHeadline(). As @thibsy pointed out in the review, this breaks as soon as the headline is escaped, loses the rendering context and conflicts with the headline, which toggles the row on click. This PR implements the API proposed there. LearningSequence: Adaptive Learning Paths #12210 will switch to it once this is merged.
  • The Tags sit below the headline and outside of it, so clicking a Tag does not toggle the row. Explanations can be attached to the Tags themselves with withHelpTopics(), which Button\Tag already supports.

withTags() is optional. Rows without Tags render exactly as before, and existing tables need no change. Only a custom class that implements the PresentationRow interface itself would have to add the method. In the core, the UI framework's own implementation is the only one, and this PR adds it there.

The Jour Fixe asked for an explicit slot for tag buttons in the rows of the
Presentation Table, so that consumers no longer inject rendered tags into the
headline (see ILIAS-eLearning#12210). The tags are rendered below the headline, outside of the
clickable toggle, and can carry explanations via help topics.
@thibsy thibsy added kitchen sink improvement php Pull requests that update Php code css/html Pull requests that propose changes to CSS/SCSS or HTML files. labels Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

css/html Pull requests that propose changes to CSS/SCSS or HTML files. improvement kitchen sink php Pull requests that update Php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants