seanime
seanime copied to clipboard
feature request: Add tooltip option to buttons (plugins)
Checklist
- [x] I checked that this feature has not been requested before
- [x] I checked that this feature is not in the "Not planned" list
- [ ] This feature will benefit the majority of users
Problem Description / Use Case
There's currently no way to set up a tooltip on buttons (both from tray and ctx.action). Modification via js script is also not possible as we can't assign classNames on buttons (at least on ctx.action). It would be a lot easier and cleaner if the API adds supports on it rather than inserting our own scripts just to add a tooltip.
Proposed Solution
additional traybutton and uiObject prop named tooltipText
// example for tray
$ui.Tray.button: (label: string, props?: ({
onClick?: string | undefined;
intent?: $ui.Intent | undefined;
tooltipText?: string | undefined; // Text that gets shown when hovering over the button
disabled?: boolean;
loading?: boolean;
size?: "xs" | "sm" | "md" | "lg";
} & $ui.ComponentProps) | undefined) => void (+1 overload)
// example for anime page
$ui.Action.newAnimePageButton(props: {
label: string;
intent?: $ui.Intent | undefined;
tooltipText?: string | undefined; // Text that gets shown when hovering over the button
disabled?: boolean | undefined; // a followup on support for `setDisabled()`
style?: Record<string, string>;
}): $ui.ActionObject<{
media: $app.AL_BaseAnime;
}>
also, request to add newMangaPageDropdownItem (if possible) for parity with ctx.action.newAnimePageDropdownItem