From ce9b5afeeba5dde9c70488dcdbbd67a8cc636a49 Mon Sep 17 00:00:00 2001 From: NeoCodeMatrix86 <40752681+NeoCoderMatrix86@users.noreply.github.com> Date: Wed, 16 Sep 2026 15:31:40 +0200 Subject: [PATCH 1/3] move file open to extra menu --- AudioCuesheetEditor/Shared/AppBar.de.resx | 7 +-- AudioCuesheetEditor/Shared/AppBar.razor | 44 ++++++++++--------- AudioCuesheetEditor/Shared/AppBar.resx | 7 +-- .../Shared/Layouts/MainLayout.razor | 2 +- 4 files changed, 29 insertions(+), 31 deletions(-) diff --git a/AudioCuesheetEditor/Shared/AppBar.de.resx b/AudioCuesheetEditor/Shared/AppBar.de.resx index 9b1a4bcd..5de0e59a 100644 --- a/AudioCuesheetEditor/Shared/AppBar.de.resx +++ b/AudioCuesheetEditor/Shared/AppBar.de.resx @@ -138,9 +138,6 @@ Cuesheet runterladen - - Export - Exportprofile @@ -153,8 +150,8 @@ Tastenkürzel - - Öffnen + + Datei öffnen Vorschauumgebung diff --git a/AudioCuesheetEditor/Shared/AppBar.razor b/AudioCuesheetEditor/Shared/AppBar.razor index 395d5e3d..8c713121 100644 --- a/AudioCuesheetEditor/Shared/AppBar.razor +++ b/AudioCuesheetEditor/Shared/AppBar.razor @@ -45,19 +45,12 @@ along with Foobar. If not, see } - @if (DisplayFileMenu) - { - - - - - - @_localizer["Open"] - - @_localizer["Cuesheet"] - @_localizer["Projectfile"] - @_localizer["Textfile"] - + @if (DisplayExportMenu) + { + + @_localizer["Cuesheet"] + @_localizer["Projectfile"] + @_localizer["Textfile"] } @@ -71,6 +64,14 @@ along with Foobar. If not, see { @_localizer["Settings"] } + @if (DisplayOpenFile) + { + + + + + @_localizer["Open file"] + } @_localizer["Help"] @_localizer["About"] @if (DisplayHotkeys) @@ -89,13 +90,13 @@ along with Foobar. If not, see @code { - HotKeysContext? hotKeysContext; - MudFileUpload? mudFileUpload; + HotKeysContext? _hotKeysContext; + MudFileUpload? _mudFileUpload; protected override void OnInitialized() { base.OnInitialized(); - hotKeysContext = _hotKeys.CreateContext() + _hotKeysContext = _hotKeys.CreateContext() .Add(ModKey.Ctrl, Key.z, () => TraceChangeManager.Undo()) .Add(ModKey.Ctrl, Key.y, () => TraceChangeManager.Redo()) .Add(ModKey.Ctrl, Key.s, DownloadProjectfileClicked) @@ -107,14 +108,17 @@ along with Foobar. If not, see protected override void Dispose(bool disposing) { base.Dispose(disposing); - hotKeysContext?.DisposeAsync(); + _hotKeysContext?.DisposeAsync(); } [Parameter] public Boolean DisplayUndoRedoButtonGroup { get; set; } [Parameter] - public Boolean DisplayFileMenu { get; set; } + public Boolean DisplayExportMenu { get; set; } + + [Parameter] + public Boolean DisplayOpenFile { get; set; } [Parameter] public Boolean DisplaySettings { get; set; } @@ -222,9 +226,9 @@ along with Foobar. If not, see async Task OpenFileUpload() { - if (mudFileUpload != null) + if (_mudFileUpload != null) { - await mudFileUpload.OpenFilePickerAsync(); + await _mudFileUpload.OpenFilePickerAsync(); } } diff --git a/AudioCuesheetEditor/Shared/AppBar.resx b/AudioCuesheetEditor/Shared/AppBar.resx index adabed2e..915c98b0 100644 --- a/AudioCuesheetEditor/Shared/AppBar.resx +++ b/AudioCuesheetEditor/Shared/AppBar.resx @@ -138,9 +138,6 @@ Download cuesheet - - Export - Export profiles @@ -153,8 +150,8 @@ Hotkeys - - Open + + Open file Preview environment diff --git a/AudioCuesheetEditor/Shared/Layouts/MainLayout.razor b/AudioCuesheetEditor/Shared/Layouts/MainLayout.razor index 2a9a319d..abfb1fe7 100644 --- a/AudioCuesheetEditor/Shared/Layouts/MainLayout.razor +++ b/AudioCuesheetEditor/Shared/Layouts/MainLayout.razor @@ -25,7 +25,7 @@ along with Foobar. If not, see - + @Body From 5047d3b05c30ad4b3629406c429a75e702e826db Mon Sep 17 00:00:00 2001 From: NeoCodeMatrix86 <40752681+NeoCoderMatrix86@users.noreply.github.com> Date: Wed, 16 Sep 2026 15:34:44 +0200 Subject: [PATCH 2/3] Update AppBar.razor --- AudioCuesheetEditor/Shared/AppBar.razor | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/AudioCuesheetEditor/Shared/AppBar.razor b/AudioCuesheetEditor/Shared/AppBar.razor index 8c713121..a6e2eb50 100644 --- a/AudioCuesheetEditor/Shared/AppBar.razor +++ b/AudioCuesheetEditor/Shared/AppBar.razor @@ -59,6 +59,10 @@ along with Foobar. If not, see @IsoCountryCodeToFlagEmoji(culture) @culture.DisplayName } + + + + @if (DisplaySettings) { @@ -66,10 +70,6 @@ along with Foobar. If not, see } @if (DisplayOpenFile) { - - - - @_localizer["Open file"] } @_localizer["Help"] From 8df03baed99a00f4ee594ceac1386e88348e19ae Mon Sep 17 00:00:00 2001 From: NeoCodeMatrix86 <40752681+NeoCoderMatrix86@users.noreply.github.com> Date: Wed, 16 Sep 2026 16:23:39 +0200 Subject: [PATCH 3/3] minimalize menu items --- AudioCuesheetEditor.End2EndTests/Models/AppBar.cs | 13 ++++--------- .../Tests/Desktop/BasicTest.cs | 2 +- .../Tests/Smartphone/BasicTest.cs | 2 +- AudioCuesheetEditor/Shared/AppBar.razor | 2 +- 4 files changed, 7 insertions(+), 12 deletions(-) diff --git a/AudioCuesheetEditor.End2EndTests/Models/AppBar.cs b/AudioCuesheetEditor.End2EndTests/Models/AppBar.cs index ee614bf3..19076a17 100644 --- a/AudioCuesheetEditor.End2EndTests/Models/AppBar.cs +++ b/AudioCuesheetEditor.End2EndTests/Models/AppBar.cs @@ -14,15 +14,11 @@ //along with Foobar. If not, see //. using Microsoft.Playwright; -using System.Text.RegularExpressions; namespace AudioCuesheetEditor.End2EndTests.Models { partial class AppBar(IPage page) { - [GeneratedRegex("^Open$")] - private static partial Regex OpenRegex(); - private readonly IPage _page = page; internal ILocator MenuButton => _page.GetByRole(AriaRole.Toolbar).GetByRole(AriaRole.Button, new() { Name = "More" }); @@ -64,14 +60,13 @@ internal async Task OpenFileAsync(string file) internal async Task OpenFileDialogAsync() { - await _page.GetByRole(AriaRole.Button, new() { Name = "File", Exact = true }).ClickAsync(); - await _page.Locator("div").Filter(new() { HasTextRegex = OpenRegex() }).ClickAsync(); + await _page.GetByRole(AriaRole.Toolbar).GetByRole(AriaRole.Button, new() { Name = "More" }).ClickAsync(); + await _page.GetByRole(AriaRole.Menuitem, new() { Name = "Open file" }).ClickAsync(); } - internal async Task OpenExportDialogAsync(string exportType, string fileMenuName = "File") + internal async Task OpenExportDialogAsync(string exportType) { - await _page.GetByRole(AriaRole.Button, new() { Name = fileMenuName, Exact = true }).ClickAsync(); - await _page.GetByText("Export", new() { Exact = true }).HoverAsync(); + await _page.GetByRole(AriaRole.Button, new() { Name = "Export menu" }).ClickAsync(); await _page.GetByText(exportType, new() { Exact = true }).ClickAsync(); } diff --git a/AudioCuesheetEditor.End2EndTests/Tests/Desktop/BasicTest.cs b/AudioCuesheetEditor.End2EndTests/Tests/Desktop/BasicTest.cs index 658b572b..a8b43579 100644 --- a/AudioCuesheetEditor.End2EndTests/Tests/Desktop/BasicTest.cs +++ b/AudioCuesheetEditor.End2EndTests/Tests/Desktop/BasicTest.cs @@ -73,7 +73,7 @@ public async Task ChangeLanguage_ShouldSwitchLanguage_WhenGermanIsSelected() await Expect(TestPage.GetByText("Aufnahmeansicht")).ToBeVisibleAsync(); await Expect(TestPage.GetByRole(AriaRole.Heading, new() { Name = "Dateien" })).ToBeVisibleAsync(); await Expect(TestPage.GetByRole(AriaRole.Heading, new() { Name = "Wiedergabe" })).ToBeVisibleAsync(); - await bar.OpenExportDialogAsync("Textdatei", "Datei"); + await bar.OpenExportDialogAsync("Textdatei"); await Expect(TestPage.GetByRole(AriaRole.Dialog)).ToMatchAriaSnapshotAsync(@"- dialog ""Exportprofile Close"": - heading ""Exportprofile"" [level=6] - button ""Close"" diff --git a/AudioCuesheetEditor.End2EndTests/Tests/Smartphone/BasicTest.cs b/AudioCuesheetEditor.End2EndTests/Tests/Smartphone/BasicTest.cs index 42415043..212587fc 100644 --- a/AudioCuesheetEditor.End2EndTests/Tests/Smartphone/BasicTest.cs +++ b/AudioCuesheetEditor.End2EndTests/Tests/Smartphone/BasicTest.cs @@ -75,7 +75,7 @@ public async Task ChangeLanguage_ShouldSwitchLanguage_WhenGermanIsSelected() await Expect(TestPage.GetByText("Aufnahmeansicht")).ToBeVisibleAsync(); await Expect(TestPage.GetByRole(AriaRole.Heading, new() { Name = "Dateien" })).ToBeVisibleAsync(); await Expect(TestPage.GetByRole(AriaRole.Heading, new() { Name = "Wiedergabe" })).ToBeVisibleAsync(); - await bar.OpenExportDialogAsync("Textdatei", "Datei"); + await bar.OpenExportDialogAsync("Textdatei"); await Expect(TestPage.GetByRole(AriaRole.Dialog)).ToMatchAriaSnapshotAsync(@"- dialog ""Exportprofile Close"": - heading ""Exportprofile"" [level=6] - button ""Close"" diff --git a/AudioCuesheetEditor/Shared/AppBar.razor b/AudioCuesheetEditor/Shared/AppBar.razor index a6e2eb50..5c8c03f6 100644 --- a/AudioCuesheetEditor/Shared/AppBar.razor +++ b/AudioCuesheetEditor/Shared/AppBar.razor @@ -47,7 +47,7 @@ along with Foobar. If not, see @if (DisplayExportMenu) { - + @_localizer["Cuesheet"] @_localizer["Projectfile"] @_localizer["Textfile"]