diff --git a/components/ILIAS/UI/src/examples/Breadcrumbs/breadcrumbs.php b/components/ILIAS/UI/src/examples/Breadcrumbs/breadcrumbs.php index e82097512113..22536ee45eac 100755 --- a/components/ILIAS/UI/src/examples/Breadcrumbs/breadcrumbs.php +++ b/components/ILIAS/UI/src/examples/Breadcrumbs/breadcrumbs.php @@ -1,21 +1,5 @@ + * ILIAS shows the rendered Component. + * --- + */ function stacked() { //Loading factories diff --git a/components/ILIAS/UI/src/examples/Chart/Bar/Vertical/partly_stacked.php b/components/ILIAS/UI/src/examples/Chart/Bar/Vertical/partly_stacked.php index e27a312eb17c..5c053bbebf65 100644 --- a/components/ILIAS/UI/src/examples/Chart/Bar/Vertical/partly_stacked.php +++ b/components/ILIAS/UI/src/examples/Chart/Bar/Vertical/partly_stacked.php @@ -9,6 +9,12 @@ use ILIAS\UI\Component\Chart\Bar\GroupConfig; use ILIAS\UI\Component\Chart\Bar\YAxis; +/** + * --- + * expected output: > + * ILIAS shows the rendered Component. + * --- + */ function partly_stacked() { //Loading factories diff --git a/components/ILIAS/UI/src/examples/Chart/ProgressMeter/FixedSize/base.php b/components/ILIAS/UI/src/examples/Chart/ProgressMeter/FixedSize/base.php index 3a06f5b020a4..34e84395a031 100755 --- a/components/ILIAS/UI/src/examples/Chart/ProgressMeter/FixedSize/base.php +++ b/components/ILIAS/UI/src/examples/Chart/ProgressMeter/FixedSize/base.php @@ -1,21 +1,5 @@ * This example shows an disabled Multi Select Input. + * + * expected output: > + * ILIAS shows four disabled checkboxes, two of them checked. + * You cannot operate any of the checkboxes. * --- */ function disabled() diff --git a/components/ILIAS/UI/src/examples/Input/Field/MultiSelect/empty_options.php b/components/ILIAS/UI/src/examples/Input/Field/MultiSelect/empty_options.php index d0a36d16e342..6ee4b710b2f3 100755 --- a/components/ILIAS/UI/src/examples/Input/Field/MultiSelect/empty_options.php +++ b/components/ILIAS/UI/src/examples/Input/Field/MultiSelect/empty_options.php @@ -1,21 +1,5 @@ + * Base example showing how use a Rating Input. + * + * expected output: > + * ILIAS shows 4 Rating Inputs: + * 1: > You may change the rating by clicking on a star (or "neutral") + * 2: > You MUST change the rating, otherwise the form will display an error when submitted + * 3: > disabled, You cannot change the rating + * 4: > A Rating Input with a little line above. + * + * When submitted, the selected values are displayed (in an array of Enums, with name and value). + * --- + */ function base() { global $DIC; diff --git a/components/ILIAS/UI/src/examples/Input/Field/Section/base.php b/components/ILIAS/UI/src/examples/Input/Field/Section/base.php index a19764cc8cb7..e5028a523b22 100755 --- a/components/ILIAS/UI/src/examples/Input/Field/Section/base.php +++ b/components/ILIAS/UI/src/examples/Input/Field/Section/base.php @@ -1,21 +1,5 @@ + * The example shows how a Drilldown Menu works in a modal. + * + * expected output: > + * When clicking the button, a modal opens displaying the menu: + * ILIAS shows a box titled "Animal of the year" and two drilldowns including a hover effect. + * Clicking the drilldowns opens up more sub-entries or links pointing to the ILIAS page or a different modal. + * Clicking the heading will lead one level back. + * --- + */ function multi_column_drilldown_in_modal() { - /** - 0 Animal of the year - 1 Switzerland - 1.1 Riverine Amphipod (gammarus fossarum) - 1.2 Wildcat - 1.2.1 European Wildcat - 1.2.2 African Wildcat - 2 Germany - 2.1 Otter - 2.2 Mole - --divider-- - 2.3 Deer - */ - - global $DIC; /** @var ILIAS\UI\Factory $f */ $f = $DIC->ui()->factory(); @@ -79,7 +76,7 @@ function renderModalAsync(string $content): void switch ($content) { case 'image': - $image = $f->image()->responsive('components/ILIAS/UI/src/examples/Image/mountains.jpg', 'Some mountains in the dusk'); + $image = $f->image()->responsive('assets/ui-examples/images/Image/mountains.jpg', 'Some mountains in the dusk'); $replace_signal_with_url = $replace_signal->withAsyncRenderUrl( $url . '&content=drilldown&replaceSignal=' . $replace_signal->getId() ); diff --git a/components/ILIAS/UI/src/examples/Menu/Sub/sub.php b/components/ILIAS/UI/src/examples/Menu/Sub/sub.php index 40d4fc6c911f..d530377868e7 100755 --- a/components/ILIAS/UI/src/examples/Menu/Sub/sub.php +++ b/components/ILIAS/UI/src/examples/Menu/Sub/sub.php @@ -1,21 +1,5 @@ + * Example for rendering a report panel. + * + * expected output: > + * ILIAS shows a panel titled "Report Title" and two sub panels as content. + * The first sub panel is titled "Sub Panel Title 1", displays the text "Some Content" and a card titled "Card Heading" + * including it's content "Card Content". + * The second sub panel is titled "Sub Panel Title 2" and displays the content text "Some Content". + * There's a Mode View Control on the Panel as well a Dropdown with Actions. + * --- + */ function with_view_controls(): string { global $DIC; diff --git a/components/ILIAS/UI/src/examples/Panel/Secondary/Legacy/base.php b/components/ILIAS/UI/src/examples/Panel/Secondary/Legacy/base.php index a0798447527b..820491234cad 100755 --- a/components/ILIAS/UI/src/examples/Panel/Secondary/Legacy/base.php +++ b/components/ILIAS/UI/src/examples/Panel/Secondary/Legacy/base.php @@ -1,21 +1,5 @@ ui()->factory(); diff --git a/components/ILIAS/UI/src/examples/Panel/Sub/base.php b/components/ILIAS/UI/src/examples/Panel/Sub/base.php index c05d05670964..5d997852324b 100755 --- a/components/ILIAS/UI/src/examples/Panel/Sub/base.php +++ b/components/ILIAS/UI/src/examples/Panel/Sub/base.php @@ -1,21 +1,5 @@ - * When clicking the button, the Prompt shows a Mesaae Box with a Link. + * When clicking the button, the Prompt shows a Message Box with a Link. * Using the Link will close the Prompt. * --- */ diff --git a/components/ILIAS/UI/src/examples/Prompt/State/Show/base.php b/components/ILIAS/UI/src/examples/Prompt/State/Show/base.php index 48cb79bf6571..01c3880142b6 100644 --- a/components/ILIAS/UI/src/examples/Prompt/State/Show/base.php +++ b/components/ILIAS/UI/src/examples/Prompt/State/Show/base.php @@ -11,6 +11,8 @@ * --- * description: > * The example displays the HTML of a State. + * expected output: > + * HTML is rendered to the preview; it sports several section-tags with a data-section attribute. * --- */ function base() diff --git a/components/ILIAS/UI/src/examples/Symbol/Avatar/Letter/base.php b/components/ILIAS/UI/src/examples/Symbol/Avatar/Letter/base.php index 258757a43db4..186ade33aa3b 100755 --- a/components/ILIAS/UI/src/examples/Symbol/Avatar/Letter/base.php +++ b/components/ILIAS/UI/src/examples/Symbol/Avatar/Letter/base.php @@ -1,21 +1,5 @@ + * Example for rendering a Column Selection Glyph. + * + * expected output: > + * Active: + * ILIAS shows a monochrome symbol on a grey background. If you move your cursor onto the symbol it's + * color darkens a little bit. Additionaly the cursor symbol changes it's form and indicates a linking. + * + * Inactive: + * ILIAS shows the same symbol. But it's greyed out. Moving the cursor above the symbol will not change the presentation. + * + * Highlighted: + * ILIAS shows the same symbol. But it's highlighted particularly. The presentation will darken if you move your cursor + * above the symbol. Additionally the cursor symbol will change it's form and indicates a linking. + * --- + */ function columnSelection() { global $DIC; diff --git a/components/ILIAS/UI/src/examples/Symbol/Glyph/Comment/comment.php b/components/ILIAS/UI/src/examples/Symbol/Glyph/Comment/comment.php index c498ce5d5d0d..39f11ef19b07 100755 --- a/components/ILIAS/UI/src/examples/Symbol/Glyph/Comment/comment.php +++ b/components/ILIAS/UI/src/examples/Symbol/Glyph/Comment/comment.php @@ -1,21 +1,5 @@ + * Example for rendering an Enlarge Glyph. + * + * expected output: > + * Active: + * ILIAS shows a monochrome symbol on a grey background. If you move your cursor onto the symbol it's + * color darkens a little bit. Additionaly the cursor symbol changes it's form and indicates a linking. + * + * Inactive: + * ILIAS shows the same symbol. But it's greyed out. Moving the cursor above the symbol will not change the presentation. + * + * Highlighted: + * ILIAS shows the same symbol. But it's highlighted particularly. The presentation will darken if you move your cursor + * above the symbol. Additionally the cursor symbol will change it's form and indicates a linking. + * --- + */ function enlarge() { global $DIC; diff --git a/components/ILIAS/UI/src/examples/Symbol/Glyph/Expand/expand.php b/components/ILIAS/UI/src/examples/Symbol/Glyph/Expand/expand.php index 3b1f76c51383..33b93b83e4d5 100755 --- a/components/ILIAS/UI/src/examples/Symbol/Glyph/Expand/expand.php +++ b/components/ILIAS/UI/src/examples/Symbol/Glyph/Expand/expand.php @@ -1,21 +1,5 @@ + * Example for rendering a Launch Glyph. + * + * expected output: > + * Active: + * ILIAS shows a monochrome symbol on a grey background. If you move your cursor onto the symbol it's + * color darkens a little bit. Additionaly the cursor symbol changes it's form and indicates a linking. + * + * Inactive: + * ILIAS shows the same symbol. But it's greyed out. Moving the cursor above the symbol will not change the presentation. + * + * Highlighted: + * ILIAS shows the same symbol. But it's highlighted particularly. The presentation will darken if you move your cursor + * above the symbol. Additionally the cursor symbol will change it's form and indicates a linking. + * --- + */ function launch() { global $DIC; diff --git a/components/ILIAS/UI/src/examples/Symbol/Glyph/Like/like.php b/components/ILIAS/UI/src/examples/Symbol/Glyph/Like/like.php index 58fc08c14567..00c9d1f85786 100755 --- a/components/ILIAS/UI/src/examples/Symbol/Glyph/Like/like.php +++ b/components/ILIAS/UI/src/examples/Symbol/Glyph/Like/like.php @@ -1,21 +1,5 @@ + * Example for rendering a List View Glyph. + * + * expected output: > + * Active: + * ILIAS shows a monochrome symbol on a grey background. If you move your cursor onto the symbol it's + * color darkens a little bit. Additionaly the cursor symbol changes it's form and indicates a linking. + * + * Inactive: + * ILIAS shows the same symbol. But it's greyed out. Moving the cursor above the symbol will not change the presentation. + * + * Highlighted: + * ILIAS shows the same symbol. But it's highlighted particularly. The presentation will darken if you move your cursor + * above the symbol. Additionally the cursor symbol will change it's form and indicates a linking. + * --- + */ function listView() { global $DIC; diff --git a/components/ILIAS/UI/src/examples/Symbol/Glyph/Listindent/listindent.php b/components/ILIAS/UI/src/examples/Symbol/Glyph/Listindent/listindent.php index dcdd2e14e580..9420c3363abe 100755 --- a/components/ILIAS/UI/src/examples/Symbol/Glyph/Listindent/listindent.php +++ b/components/ILIAS/UI/src/examples/Symbol/Glyph/Listindent/listindent.php @@ -1,21 +1,5 @@ + * Example for rendering a Preview Glyph. + * + * expected output: > + * Active: + * ILIAS shows a monochrome symbol on a grey background. If you move your cursor onto the symbol it's + * color darkens a little bit. Additionaly the cursor symbol changes it's form and indicates a linking. + * + * Inactive: + * ILIAS shows the same symbol. But it's greyed out. Moving the cursor above the symbol will not change the presentation. + * + * Highlighted: + * ILIAS shows the same symbol. But it's highlighted particularly. The presentation will darken if you move your cursor + * above the symbol. Additionally the cursor symbol will change it's form and indicates a linking. + * --- + */ function preview() { global $DIC; diff --git a/components/ILIAS/UI/src/examples/Symbol/Glyph/Remove/remove.php b/components/ILIAS/UI/src/examples/Symbol/Glyph/Remove/remove.php index bace2256aa00..f2a0410341fc 100755 --- a/components/ILIAS/UI/src/examples/Symbol/Glyph/Remove/remove.php +++ b/components/ILIAS/UI/src/examples/Symbol/Glyph/Remove/remove.php @@ -1,21 +1,5 @@ + * Example for rendering a Sort Glyph. + * + * expected output: > + * Active: + * ILIAS shows a monochrome symbol on a grey background. If you move your cursor onto the symbol it's + * color darkens a little bit. Additionaly the cursor symbol changes it's form and indicates a linking. + * + * Inactive: + * ILIAS shows the same symbol. But it's greyed out. Moving the cursor above the symbol will not change the presentation. + * + * Highlighted: + * ILIAS shows the same symbol. But it's highlighted particularly. The presentation will darken if you move your cursor + * above the symbol. Additionally the cursor symbol will change it's form and indicates a linking. + * --- + */ function sort() { global $DIC; diff --git a/components/ILIAS/UI/src/examples/Symbol/Glyph/SortAscending/sort_ascending.php b/components/ILIAS/UI/src/examples/Symbol/Glyph/SortAscending/sort_ascending.php index 5a694d607ed9..d3fc8bcd52ca 100755 --- a/components/ILIAS/UI/src/examples/Symbol/Glyph/SortAscending/sort_ascending.php +++ b/components/ILIAS/UI/src/examples/Symbol/Glyph/SortAscending/sort_ascending.php @@ -1,21 +1,5 @@ + * Example for rendering a Tile View Glyph. + * + * expected output: > + * Active: + * ILIAS shows a monochrome symbol on a grey background. If you move your cursor onto the symbol it's + * color darkens a little bit. Additionaly the cursor symbol changes it's form and indicates a linking. + * + * Inactive: + * ILIAS shows the same symbol. But it's greyed out. Moving the cursor above the symbol will not change the presentation. + * + * Highlighted: + * ILIAS shows the same symbol. But it's highlighted particularly. The presentation will darken if you move your cursor + * above the symbol. Additionally the cursor symbol will change it's form and indicates a linking. + * --- + */ function tileView() { global $DIC; diff --git a/components/ILIAS/UI/src/examples/Symbol/Glyph/Time/time_glyph.php b/components/ILIAS/UI/src/examples/Symbol/Glyph/Time/time_glyph.php index d7fd26dabefd..963e867c1b7b 100755 --- a/components/ILIAS/UI/src/examples/Symbol/Glyph/Time/time_glyph.php +++ b/components/ILIAS/UI/src/examples/Symbol/Glyph/Time/time_glyph.php @@ -1,21 +1,5 @@ + * Example showing an Ordering Table. + * + * expected output: > + * ILIAS shows the rendered Component. + * You may drag a row or give a new value for its position. + * Clicking "Save" will return an array with the updated positions + * and display the table with the new order applied. + * --- + */ function base() { global $DIC; @@ -139,7 +151,7 @@ public function setOrder(array $ordered): void && $request_wrapper->has('ordering_example') && $request_wrapper->retrieve('ordering_example', $refinery->kindlyTo()->int()) === 1 ) { - if($data = $table->getData()) { + if ($data = $table->getData()) { $out[] = $f->legacy('
' . print_r($data, true) . ''); } $data_retrieval->setOrder($data); diff --git a/components/ILIAS/UI/src/examples/Table/Ordering/disabled.php b/components/ILIAS/UI/src/examples/Table/Ordering/disabled.php index 1fd70a682b62..e0003dd5cdd7 100644 --- a/components/ILIAS/UI/src/examples/Table/Ordering/disabled.php +++ b/components/ILIAS/UI/src/examples/Table/Ordering/disabled.php @@ -8,6 +8,16 @@ use ILIAS\UI\Component\Table as I; use ILIAS\Data\URI; +/** + * --- + * description: > + * Example showing an Ordering Table. + * + * expected output: > + * ILIAS shows the rendered Component. + * You may NOT drag any row; there are no Number Inputs for row-positions. + * --- + */ function disabled() { global $DIC; diff --git a/components/ILIAS/UI/src/examples/Table/Ordering/external.php b/components/ILIAS/UI/src/examples/Table/Ordering/external.php index 48e28ace8c70..021f486562c5 100644 --- a/components/ILIAS/UI/src/examples/Table/Ordering/external.php +++ b/components/ILIAS/UI/src/examples/Table/Ordering/external.php @@ -8,6 +8,17 @@ use ILIAS\UI\Component\Table as I; use ILIAS\Data\URI; +/** + * --- + * description: > + * Example showing an Ordering Table with validation on the ordering. + * + * expected output: > + * ILIAS shows the rendered Component. + * You may order rows in any way, but upon saving, only the correct order is + * accepted. A Message will tell you. + * --- + */ function external() { global $DIC; @@ -99,7 +110,7 @@ public function setOrder(array $ordered): void && $request_wrapper->retrieve('ordering_example', $refinery->kindlyTo()->int()) === 3 ) { $data = $table->withRequest($request)->getData(); - if($data === range(65, 68)) { + if ($data === range(65, 68)) { $data_retrieval->setOrder($data); $out[] = $f->messageBox()->success("ok. great ordering!"); } else { diff --git a/components/ILIAS/UI/src/examples/Table/Presentation/base.php b/components/ILIAS/UI/src/examples/Table/Presentation/base.php index 391501792125..1a55cd900e6b 100755 --- a/components/ILIAS/UI/src/examples/Table/Presentation/base.php +++ b/components/ILIAS/UI/src/examples/Table/Presentation/base.php @@ -1,21 +1,5 @@ markTestSkipped("2024-10-25: Shall be fixed soon by CaT"); - global $DIC; $DIC = $this->dic; @@ -152,8 +150,6 @@ public function testAllExamplesRenderAString(string $example_function_name, stri */ public function testAllExamplesHaveExpectedOutcomeInDocs(string $example_function_name, string $example_path) { - $this->markTestSkipped("2024-10-25: Shall be fixed soon by CaT"); - $docs = $this->example_parser->parseYamlStringArrayFromFile($example_path); $this->assertArrayHasKey('expected output', $docs); }