Fixed the preview tooltip component not showing the correct position when used inside a scrollable container

This commit is contained in:
Thorsten Sommer 2025-03-25 20:50:57 +01:00
parent ec31660017
commit 64669088ed
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108
14 changed files with 50 additions and 15 deletions

View File

@ -1,4 +1,4 @@
<MudTooltip Placement="Placement.Bottom" Arrow="@true">
<MudTooltip Placement="Placement.Bottom" Arrow="@true" Class="@this.Classes">
<ChildContent>
<MudChip T="string" Icon="@Icons.Material.Filled.FirstPage" Color="Color.Error" Class="mb-3">
Alpha

View File

@ -2,4 +2,10 @@ using Microsoft.AspNetCore.Components;
namespace AIStudio.Components;
public partial class PreviewAlpha : ComponentBase;
public partial class PreviewAlpha : ComponentBase
{
[Parameter]
public bool ApplyInnerScrollingFix { get; set; }
private string Classes => this.ApplyInnerScrollingFix ? "InnerScrollingFix" : string.Empty;
}

View File

@ -1,4 +1,4 @@
<MudTooltip Placement="Placement.Bottom" Arrow="@true">
<MudTooltip Placement="Placement.Bottom" Arrow="@true" Class="@this.Classes">
<ChildContent>
<MudChip T="string" Icon="@Icons.Material.Filled.HourglassTop" Color="Color.Info" Class="mb-3">
Beta

View File

@ -2,4 +2,10 @@ using Microsoft.AspNetCore.Components;
namespace AIStudio.Components;
public partial class PreviewBeta : ComponentBase;
public partial class PreviewBeta : ComponentBase
{
[Parameter]
public bool ApplyInnerScrollingFix { get; set; }
private string Classes => this.ApplyInnerScrollingFix ? "InnerScrollingFix" : string.Empty;
}

View File

@ -1,4 +1,4 @@
<MudTooltip Placement="Placement.Bottom" Arrow="@true">
<MudTooltip Placement="Placement.Bottom" Arrow="@true" Class="@this.Classes">
<ChildContent>
<MudChip T="string" Icon="@Icons.Material.Filled.Science" Color="Color.Error" Class="mb-3">
Experimental

View File

@ -2,4 +2,10 @@ using Microsoft.AspNetCore.Components;
namespace AIStudio.Components;
public partial class PreviewExperimental : ComponentBase;
public partial class PreviewExperimental : ComponentBase
{
[Parameter]
public bool ApplyInnerScrollingFix { get; set; }
private string Classes => this.ApplyInnerScrollingFix ? "InnerScrollingFix" : string.Empty;
}

View File

@ -1,4 +1,4 @@
<MudTooltip Placement="Placement.Bottom" Arrow="@true">
<MudTooltip Placement="Placement.Bottom" Arrow="@true" Class="@this.Classes">
<ChildContent>
<MudChip T="string" Icon="@Icons.Material.Filled.HourglassBottom" Color="Color.Error" Class="mb-3">
Prototype

View File

@ -2,4 +2,10 @@ using Microsoft.AspNetCore.Components;
namespace AIStudio.Components;
public partial class PreviewPrototype : ComponentBase;
public partial class PreviewPrototype : ComponentBase
{
[Parameter]
public bool ApplyInnerScrollingFix { get; set; }
private string Classes => this.ApplyInnerScrollingFix ? "InnerScrollingFix" : string.Empty;
}

View File

@ -1,4 +1,4 @@
<MudTooltip Placement="Placement.Bottom" Arrow="@true">
<MudTooltip Placement="Placement.Bottom" Arrow="@true" Class="@this.Classes">
<ChildContent>
<MudChip T="string" Icon="@Icons.Material.Filled.VerifiedUser" Color="Color.Success" Class="mb-3">
Release Candidate

View File

@ -2,4 +2,10 @@ using Microsoft.AspNetCore.Components;
namespace AIStudio.Components;
public partial class PreviewReleaseCandidate : ComponentBase;
public partial class PreviewReleaseCandidate : ComponentBase
{
[Parameter]
public bool ApplyInnerScrollingFix { get; set; }
private string Classes => this.ApplyInnerScrollingFix ? "InnerScrollingFix" : string.Empty;
}

View File

@ -2,10 +2,10 @@
@attribute [Route(Routes.PLUGINS)]
<div class="inner-scrolling-context">
<MudText Typo="Typo.h3" Class="mb-12">
<MudText Typo="Typo.h3" Class="mb-2">
Plugins
</MudText>
<PreviewExperimental/>
<PreviewExperimental ApplyInnerScrollingFix="true"/>
<InnerScrolling>
<MudList T="string">

View File

@ -2,11 +2,10 @@
@inherits MSGComponentBase
<div class="inner-scrolling-context">
<MudText Typo="Typo.h3" Class="mb-2 mr-3">
<MudText Typo="Typo.h3" Class="mb-2">
Writer
</MudText>
<PreviewExperimental/>
<PreviewExperimental ApplyInnerScrollingFix="true"/>
<ProviderSelection @bind-ProviderSettings="@this.providerSettings"/>
<InnerScrolling>

View File

@ -45,6 +45,10 @@
height: 200%;
}
.mud-popover-open.InnerScrollingFix {
left: 0 !important;
}
:root {
--confidence-color: #000000;
}

View File

@ -1,4 +1,6 @@
# v0.9.39, build 214 (2025-03-xx xx:xx UTC)
- Added a feature flag for the plugin system. This flag is disabled by default and can be enabled inside the app settings. Please note that this feature is still in development; there are no plugins available yet.
- Added the Lua library we use for the plugin system to the about page.
- Added the plugin overview page. This page shows all installed plugins and allows you to enable or disable them. It is only available when the plugin preview feature is enabled.
- Fixed the preview tooltip component not showing the correct position when used inside a scrollable container.
- Upgraded to Rust 1.85.1