-
-
Notifications
You must be signed in to change notification settings - Fork 0
Modernizes UI with Fluent 2 design principles #87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
d5c34b0
refactor: establish fluent ux foundation styles
soliktomasz 1fc2b4c
refactor: make workspace tabs accessible
soliktomasz 56a5742
refactor: improve entity browser accessibility
soliktomasz 29275a8
refactor: simplify fluent shell hierarchy
soliktomasz 2516e0f
refactor: simplify messages workspace layout
soliktomasz 9609adb
refactor: standardize dialog scaffold
soliktomasz 737d873
refactor: simplify connection library dialog
soliktomasz 1698237
refactor: modernize modal workflows
soliktomasz a1a0631
refactor: rebalance dashboard hierarchy
soliktomasz 9a0b7a1
refactor: align backup actions with passphrase field
soliktomasz af5100a
refactor: define fixed size for connection library dialog
soliktomasz 174d10e
refactor: simplify sidebar workspace actions
soliktomasz 8f14848
refactor: apply fluent design system ux remediations
soliktomasz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| namespace BusLane.Tests.Views; | ||
|
|
||
| using FluentAssertions; | ||
|
|
||
| public class AlertsDialogTests | ||
| { | ||
| [Fact] | ||
| public void AlertsDialog_UsesSharedDialogScaffold() | ||
| { | ||
| // Arrange | ||
| var xaml = File.ReadAllText(GetDialogPath()); | ||
|
|
||
| // Assert | ||
| xaml.Should().Contain("Classes=\"dialog-header\""); | ||
| xaml.Should().Contain("Classes=\"dialog-body\""); | ||
| xaml.Should().Contain("Classes=\"dialog-footer\""); | ||
| } | ||
|
|
||
| private static string GetDialogPath() | ||
| { | ||
| return Path.GetFullPath(Path.Combine( | ||
| AppContext.BaseDirectory, | ||
| "..", | ||
| "..", | ||
| "..", | ||
| "..", | ||
| "BusLane", | ||
| "Views", | ||
| "Dialogs", | ||
| "AlertsDialog.axaml")); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| namespace BusLane.Tests.Views; | ||
|
|
||
| using FluentAssertions; | ||
|
|
||
| public class AppThemeResourceTests | ||
| { | ||
| [Fact] | ||
| public void AppResources_DefineSharedDashboardSurfaceTokens() | ||
| { | ||
| // Arrange | ||
| var xaml = File.ReadAllText(GetAppPath()); | ||
|
|
||
| // Assert | ||
| xaml.Should().Contain("x:Key=\"LayerBackground\""); | ||
| xaml.Should().Contain("x:Key=\"DashboardTileBackground\""); | ||
| xaml.Should().Contain("x:Key=\"AccentBrandSubtle\""); | ||
| } | ||
|
|
||
| [Fact] | ||
| public void AppStyles_DefineSharedToggleAndMenuStyles() | ||
| { | ||
| // Arrange | ||
| var xaml = File.ReadAllText(GetStylesPath()); | ||
|
|
||
| // Assert | ||
| xaml.Should().Contain("<Style Selector=\"ToggleSwitch\">"); | ||
| xaml.Should().Contain("<Style Selector=\"CheckBox\">"); | ||
| xaml.Should().Contain("<Style Selector=\"ContextMenu\">"); | ||
| xaml.Should().Contain("<Style Selector=\"MenuItem\">"); | ||
| } | ||
|
|
||
| [Fact] | ||
| public void AppStyles_PanelToggleUsesMinimumAccessibleHitTarget() | ||
| { | ||
| // Arrange | ||
| var xaml = File.ReadAllText(GetStylesPath()); | ||
|
|
||
| // Assert | ||
| xaml.Should().Contain("<Setter Property=\"MinWidth\" Value=\"36\"/>"); | ||
| xaml.Should().Contain("<Setter Property=\"MinHeight\" Value=\"36\"/>"); | ||
| } | ||
|
|
||
| private static string GetAppPath() | ||
| { | ||
| return Path.GetFullPath(Path.Combine( | ||
| AppContext.BaseDirectory, | ||
| "..", | ||
| "..", | ||
| "..", | ||
| "..", | ||
| "BusLane", | ||
| "App.axaml")); | ||
| } | ||
|
|
||
| private static string GetStylesPath() | ||
| { | ||
| return Path.GetFullPath(Path.Combine( | ||
| AppContext.BaseDirectory, | ||
| "..", | ||
| "..", | ||
| "..", | ||
| "..", | ||
| "BusLane", | ||
| "Styles", | ||
| "AppStyles.axaml")); | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,99 @@ | ||
| namespace BusLane.Tests.Views; | ||
|
|
||
| using FluentAssertions; | ||
|
|
||
| public class ConnectionLibraryDialogTests | ||
| { | ||
| [Fact] | ||
| public void ConnectionLibraryDialog_UsesSharedDialogRegions() | ||
| { | ||
| // Arrange | ||
| var xaml = File.ReadAllText(GetDialogPath()); | ||
|
|
||
| // Assert | ||
| xaml.Should().Contain("Classes=\"dialog-header\""); | ||
| xaml.Should().Contain("Classes=\"dialog-body\""); | ||
| } | ||
|
|
||
| [Fact] | ||
| public void ConnectionLibraryDialog_SeparatesQuickActionsFromFormSurface() | ||
| { | ||
| // Arrange | ||
| var xaml = File.ReadAllText(GetDialogPath()); | ||
|
|
||
| // Assert | ||
| xaml.Should().Contain("Classes=\"connection-library-command-bar\""); | ||
| xaml.Should().NotContain("Background=\"{DynamicResource SurfaceSubtle}\""); | ||
| } | ||
|
|
||
| [Fact] | ||
| public void ConnectionLibraryDialog_LeftAlignsBackupPassphraseSection() | ||
| { | ||
| // Arrange | ||
| var xaml = File.ReadAllText(GetDialogPath()); | ||
| var passphraseIndex = xaml.IndexOf("Text=\"Backup passphrase\"", StringComparison.Ordinal); | ||
|
|
||
| // Assert | ||
| passphraseIndex.Should().BeGreaterThanOrEqualTo(0); | ||
|
|
||
| // Act | ||
| var blockStart = xaml.LastIndexOf("<StackPanel", passphraseIndex, StringComparison.Ordinal); | ||
| blockStart.Should().BeGreaterThanOrEqualTo(0); | ||
|
|
||
| var passphraseSection = xaml[blockStart..passphraseIndex]; | ||
| passphraseSection.Should().Contain("HorizontalAlignment=\"Left\""); | ||
| } | ||
|
|
||
| [Fact] | ||
| public void ConnectionLibraryDialog_PlacesBackupActionsInlineWithPassphraseField() | ||
| { | ||
| // Arrange | ||
| var xaml = File.ReadAllText(GetDialogPath()); | ||
|
|
||
| // Act | ||
| var passphraseIndex = xaml.IndexOf("Text=\"Backup passphrase\"", StringComparison.Ordinal); | ||
| var exportIndex = xaml.IndexOf("Text=\"Export Backup\"", StringComparison.Ordinal); | ||
| var importIndex = xaml.IndexOf("Text=\"Import Backup\"", StringComparison.Ordinal); | ||
|
|
||
| // Assert | ||
| passphraseIndex.Should().BeGreaterThanOrEqualTo(0); | ||
| exportIndex.Should().BeGreaterThan(passphraseIndex); | ||
| importIndex.Should().BeGreaterThan(passphraseIndex); | ||
| xaml.Should().Contain("ColumnDefinitions=\"*,Auto,Auto\""); | ||
| } | ||
|
|
||
| [Fact] | ||
| public void ConnectionLibraryDialog_UsesWiderBackupPassphraseLayout() | ||
| { | ||
| // Arrange | ||
| var xaml = File.ReadAllText(GetDialogPath()); | ||
|
|
||
| // Assert | ||
| xaml.Should().Contain("MaxWidth=\"520\""); | ||
| } | ||
|
|
||
| [Fact] | ||
| public void ConnectionLibraryDialog_UsesFixedDialogSize() | ||
| { | ||
| // Arrange | ||
| var xaml = File.ReadAllText(GetDialogPath()); | ||
|
|
||
| // Assert | ||
| xaml.Should().Contain("Width=\"900\""); | ||
| xaml.Should().Contain("Height=\"720\""); | ||
| } | ||
|
|
||
| private static string GetDialogPath() | ||
| { | ||
| return Path.GetFullPath(Path.Combine( | ||
| AppContext.BaseDirectory, | ||
| "..", | ||
| "..", | ||
| "..", | ||
| "..", | ||
| "BusLane", | ||
| "Views", | ||
| "Dialogs", | ||
| "ConnectionLibraryDialog.axaml")); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| namespace BusLane.Tests.Views; | ||
|
|
||
| using FluentAssertions; | ||
|
|
||
| public class DialogScaffoldTests | ||
| { | ||
| [Fact] | ||
| public void AppStyles_DefineDialogHeaderBodyFooterStyles() | ||
| { | ||
| // Arrange | ||
| var xaml = File.ReadAllText(GetStylesPath()); | ||
|
|
||
| // Assert | ||
| xaml.Should().Contain("Border.dialog-header"); | ||
| xaml.Should().Contain("Border.dialog-body"); | ||
| xaml.Should().Contain("Border.dialog-footer"); | ||
| } | ||
|
|
||
| [Fact] | ||
| public void SettingsDialog_UsesSharedDialogRegions() | ||
| { | ||
| // Arrange | ||
| var xaml = File.ReadAllText(GetSettingsDialogPath()); | ||
|
|
||
| // Assert | ||
| xaml.Should().Contain("Classes=\"dialog-header\""); | ||
| xaml.Should().Contain("Classes=\"dialog-body\""); | ||
| xaml.Should().Contain("Classes=\"dialog-footer\""); | ||
| } | ||
|
|
||
| [Fact] | ||
| public void SettingsDialog_UsesSharedSettingsRowForRefreshInterval() | ||
| { | ||
| // Arrange | ||
| var xaml = File.ReadAllText(GetSettingsDialogPath()); | ||
| var refreshIntervalIndex = xaml.IndexOf("Text=\"Refresh interval\"", StringComparison.Ordinal); | ||
|
|
||
| // Assert | ||
| refreshIntervalIndex.Should().BeGreaterThanOrEqualTo(0); | ||
|
|
||
| // Act | ||
| var rowStart = xaml.LastIndexOf("<Grid", refreshIntervalIndex, StringComparison.Ordinal); | ||
| rowStart.Should().BeGreaterThanOrEqualTo(0); | ||
|
|
||
| var refreshIntervalRow = xaml[rowStart..refreshIntervalIndex]; | ||
| refreshIntervalRow.Should().Contain("Classes=\"settings-row\""); | ||
| } | ||
|
|
||
| private static string GetStylesPath() | ||
| { | ||
| return Path.GetFullPath(Path.Combine( | ||
| AppContext.BaseDirectory, | ||
| "..", | ||
| "..", | ||
| "..", | ||
| "..", | ||
| "BusLane", | ||
| "Styles", | ||
| "AppStyles.axaml")); | ||
| } | ||
|
|
||
| private static string GetSettingsDialogPath() | ||
| { | ||
| return Path.GetFullPath(Path.Combine( | ||
| AppContext.BaseDirectory, | ||
| "..", | ||
| "..", | ||
| "..", | ||
| "..", | ||
| "BusLane", | ||
| "Views", | ||
| "Dialogs", | ||
| "SettingsDialog.axaml")); | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.