From f76adc5054c1f4e24332168f8723b8a43bf3d592 Mon Sep 17 00:00:00 2001 From: Jeffrey <9938813+Raphire@users.noreply.github.com> Date: Wed, 24 Jun 2026 20:55:17 +0200 Subject: [PATCH] Add docstrings --- Scripts/GUI/Show-Bubble.ps1 | 48 +++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/Scripts/GUI/Show-Bubble.ps1 b/Scripts/GUI/Show-Bubble.ps1 index 8c4951f..c5bcdcd 100644 --- a/Scripts/GUI/Show-Bubble.ps1 +++ b/Scripts/GUI/Show-Bubble.ps1 @@ -1,3 +1,23 @@ +<# +.SYNOPSIS + Hides the currently displayed bubble popup. + +.DESCRIPTION + Closes the bubble popup with a smooth fade-out animation (220ms). If the + -Immediate switch is used, the popup is closed instantly without animation. + This function is called automatically by Show-Bubble's timer and can also + be invoked manually to dismiss the bubble early. + +.PARAMETER Immediate + If specified, the bubble popup is closed instantly without a fade-out + animation. Any pending close timer is also stopped. + +.EXAMPLE + Hide-Bubble + +.EXAMPLE + Hide-Bubble -Immediate +#> function Hide-Bubble { param ( [Parameter(Mandatory=$false)] @@ -37,6 +57,34 @@ function Hide-Bubble { $bubblePanel.BeginAnimation([System.Windows.UIElement]::OpacityProperty, $fadeOut) } +<# +.SYNOPSIS + Displays a transient bubble popup hint anchored above a target control. + +.DESCRIPTION + Shows a WPF popup styled as a speech bubble above the specified target + control. The bubble fades in with a animation, displays for a configurable + duration, then fades out. Any previously shown bubble is dismissed + immediately before showing the new one. + +.PARAMETER TargetControl + The WPF Control above which the bubble popup will be placed. This + parameter is mandatory. + +.PARAMETER Message + The text message to display inside the bubble. Defaults to + 'View the selected changes here'. + +.PARAMETER DurationSeconds + The number of seconds the bubble remains visible before auto-hiding. + The minimum value is 1 second. Defaults to 5 seconds. + +.EXAMPLE + Show-Bubble -TargetControl $myButton + +.EXAMPLE + Show-Bubble -TargetControl $myButton -Message 'Changes saved!' -DurationSeconds 3 +#> function Show-Bubble { param ( [Parameter(Mandatory=$true)]