Skip to content

Commit

Permalink
[FIX] 0042349: UI Tooltips (via Topics) ont shown on slate-triggerers…
Browse files Browse the repository at this point in the history
… in mainBar
  • Loading branch information
chfsx authored and klees committed Dec 17, 2024
1 parent 66f080f commit cce904a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@
use ILIAS\UI\Component\Signal;
use ILIAS\UI\Component\Symbol\Symbol;
use ILIAS\UI\Component\Triggerer;
use ILIAS\UI\Component\HasHelpTopics;

/**
* This describes a Slate
*/
interface Slate extends Component, JavaScriptBindable, Triggerer
interface Slate extends Component, JavaScriptBindable, Triggerer, HasHelpTopics
{
/**
* Get the name of this slate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ protected function renderMainbarEntry(
$trigger_signal = $component->getTriggerSignal($mb_id, $component::ENTRY_ACTION_TRIGGER);
$this->trigger_signals[] = $trigger_signal;
$button = $f->button()->bulky($entry->getSymbol(), $entry->getName(), '#')
->withOnClick($trigger_signal);
->withOnClick($trigger_signal)
->withHelpTopics(...$entry->getHelpTopics());
} else {
//add Links/Buttons as toplevel entries
$pos = array_search($k, array_keys($entries));
Expand Down Expand Up @@ -360,7 +361,8 @@ protected function renderTriggerButtonsAndSlates(
->withEngagedState($engaged)
->withOnClick($entry_signal)
->appendOnClick($secondary_signal)
->withAriaRole(IBulky::MENUITEM);
->withAriaRole(IBulky::MENUITEM)
->withHelpTopics(...$entry->getHelpTopics());

$slate = $entry;
} elseif ($entry instanceof IBulky) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ protected function getCombinedSlateContents(
if ($entry instanceof ISlate\Slate && !$entry instanceof ISlate\Notification) {
$trigger_signal = $entry->getToggleSignal();
$triggerer = $f->button()->bulky($entry->getSymbol(), $entry->getName(), '#')
->withOnClick($trigger_signal);
->withOnClick($trigger_signal)
->withHelpTopics(...$entry->getHelpTopics())
;

$mb_id = $entry->getMainBarTreePosition();
if ($mb_id) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,14 @@
use ILIAS\UI\Implementation\Component\JavaScriptBindable;
use ILIAS\UI\Implementation\Component\ReplaceSignal as ReplaceSignalImplementation;
use ILIAS\UI\Implementation\Component\Triggerer;
use ILIAS\UI\Implementation\Component\HasHelpTopics;

abstract class Slate implements ISlate\Slate
{
use ComponentHelper;
use JavaScriptBindable;
use Triggerer;
use HasHelpTopics;

// allowed ARIA roles
public const MENU = 'menu';
Expand Down

0 comments on commit cce904a

Please sign in to comment.