Repository navigation
[FEATURE] UI: add Table\PresentationRow::withTags() - #12240
Open
kevenClausenKPG wants to merge 1 commit into
Open
kevenClausenKPG wants to merge 1 commit into
kevenClausenKPG wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi all,
This PR adds a dedicated slot for Tags to the rows of the Presentation Table:
Table\PresentationRow::withTags(Button\Tag ...$tags): staticTable/Presentation/with_tags.phpshows two rows, one with two and one with three Tags.Background:
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.withHelpTopics(), whichButton\Tagalready supports.withTags()is optional. Rows without Tags render exactly as before, and existing tables need no change. Only a custom class that implements thePresentationRowinterface 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.