Skip to content

Commit

Permalink
Updating to MudBlazor (#151)
Browse files Browse the repository at this point in the history
* Starting work converting over to mudblazor

* Center the button

* Playing with graph

* User dialog back to working and pretty

* Copy button with snackbar notification working

* Got voting display working

* Fixing unit tests

* Updating unit tests for newer view models.
  • Loading branch information
Keboo committed Jul 6, 2023
1 parent 940be18 commit 386150e
Show file tree
Hide file tree
Showing 27 changed files with 1,343 additions and 2,066 deletions.
160 changes: 80 additions & 80 deletions PointerStar.sln
Original file line number Diff line number Diff line change
@@ -1,80 +1,80 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.5.33103.201
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PointerStar.Server", "PointerStar\Server\PointerStar.Server.csproj", "{A355C71D-158E-47A8-9C77-8B55C6DF9A5E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PointerStar.Client", "PointerStar\Client\PointerStar.Client.csproj", "{8402AD00-6B13-42EE-B9B2-00D4D5600152}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PointerStar.Shared", "PointerStar\Shared\PointerStar.Shared.csproj", "{B9B12F75-9DC9-45C2-A867-384E3420016D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{2EAFC20C-739A-4CC0-AB81-5DEEB7C407BA}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
Directory.Build.props = Directory.Build.props
Directory.Build.targets = Directory.Build.targets
README.md = README.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{C3F9C421-ED11-4345-8580-E90C15F4D002}"
ProjectSection(SolutionItems) = preProject
.github\dependabot.yml = .github\dependabot.yml
.github\workflows\main_pointerstar.yml = .github\workflows\main_pointerstar.yml
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Test", "Test", "{566CC054-6689-479D-BB64-26F2CB2BA43B}"
ProjectSection(SolutionItems) = preProject
Tests\Directory.Build.props = Tests\Directory.Build.props
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PointerStar.Client.Tests", "Tests\PointerStar.Client.Tests\PointerStar.Client.Tests.csproj", "{11AF6C7D-6EC6-45B7-82E5-F815AE5A3721}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PointerStar.Server.Tests", "Tests\PointerStar.Server.Tests\PointerStar.Server.Tests.csproj", "{6521C77B-AC31-4F1B-8EC5-FB7174D7BF1C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PointerStar.Shared.Tests", "Tests\PointerStar.Shared.Tests\PointerStar.Shared.Tests.csproj", "{63BFF661-B487-4447-8245-BD016F75631C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A355C71D-158E-47A8-9C77-8B55C6DF9A5E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A355C71D-158E-47A8-9C77-8B55C6DF9A5E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A355C71D-158E-47A8-9C77-8B55C6DF9A5E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A355C71D-158E-47A8-9C77-8B55C6DF9A5E}.Release|Any CPU.Build.0 = Release|Any CPU
{8402AD00-6B13-42EE-B9B2-00D4D5600152}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8402AD00-6B13-42EE-B9B2-00D4D5600152}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8402AD00-6B13-42EE-B9B2-00D4D5600152}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8402AD00-6B13-42EE-B9B2-00D4D5600152}.Release|Any CPU.Build.0 = Release|Any CPU
{B9B12F75-9DC9-45C2-A867-384E3420016D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B9B12F75-9DC9-45C2-A867-384E3420016D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B9B12F75-9DC9-45C2-A867-384E3420016D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B9B12F75-9DC9-45C2-A867-384E3420016D}.Release|Any CPU.Build.0 = Release|Any CPU
{11AF6C7D-6EC6-45B7-82E5-F815AE5A3721}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{11AF6C7D-6EC6-45B7-82E5-F815AE5A3721}.Debug|Any CPU.Build.0 = Debug|Any CPU
{11AF6C7D-6EC6-45B7-82E5-F815AE5A3721}.Release|Any CPU.ActiveCfg = Release|Any CPU
{11AF6C7D-6EC6-45B7-82E5-F815AE5A3721}.Release|Any CPU.Build.0 = Release|Any CPU
{6521C77B-AC31-4F1B-8EC5-FB7174D7BF1C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6521C77B-AC31-4F1B-8EC5-FB7174D7BF1C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6521C77B-AC31-4F1B-8EC5-FB7174D7BF1C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6521C77B-AC31-4F1B-8EC5-FB7174D7BF1C}.Release|Any CPU.Build.0 = Release|Any CPU
{63BFF661-B487-4447-8245-BD016F75631C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{63BFF661-B487-4447-8245-BD016F75631C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{63BFF661-B487-4447-8245-BD016F75631C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{63BFF661-B487-4447-8245-BD016F75631C}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{C3F9C421-ED11-4345-8580-E90C15F4D002} = {2EAFC20C-739A-4CC0-AB81-5DEEB7C407BA}
{11AF6C7D-6EC6-45B7-82E5-F815AE5A3721} = {566CC054-6689-479D-BB64-26F2CB2BA43B}
{6521C77B-AC31-4F1B-8EC5-FB7174D7BF1C} = {566CC054-6689-479D-BB64-26F2CB2BA43B}
{63BFF661-B487-4447-8245-BD016F75631C} = {566CC054-6689-479D-BB64-26F2CB2BA43B}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {FBEB6B9F-F8F5-42C1-9734-668FA9C44687}
EndGlobalSection
EndGlobal

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.5.33103.201
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PointerStar.Server", "PointerStar\Server\PointerStar.Server.csproj", "{A355C71D-158E-47A8-9C77-8B55C6DF9A5E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PointerStar.Client", "PointerStar\Client\PointerStar.Client.csproj", "{8402AD00-6B13-42EE-B9B2-00D4D5600152}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PointerStar.Shared", "PointerStar\Shared\PointerStar.Shared.csproj", "{B9B12F75-9DC9-45C2-A867-384E3420016D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{2EAFC20C-739A-4CC0-AB81-5DEEB7C407BA}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
Directory.Build.props = Directory.Build.props
Directory.Build.targets = Directory.Build.targets
README.md = README.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{C3F9C421-ED11-4345-8580-E90C15F4D002}"
ProjectSection(SolutionItems) = preProject
.github\dependabot.yml = .github\dependabot.yml
.github\workflows\main_pointerstar.yml = .github\workflows\main_pointerstar.yml
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Test", "Test", "{566CC054-6689-479D-BB64-26F2CB2BA43B}"
ProjectSection(SolutionItems) = preProject
Tests\Directory.Build.props = Tests\Directory.Build.props
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PointerStar.Client.Tests", "Tests\PointerStar.Client.Tests\PointerStar.Client.Tests.csproj", "{11AF6C7D-6EC6-45B7-82E5-F815AE5A3721}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PointerStar.Server.Tests", "Tests\PointerStar.Server.Tests\PointerStar.Server.Tests.csproj", "{6521C77B-AC31-4F1B-8EC5-FB7174D7BF1C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PointerStar.Shared.Tests", "Tests\PointerStar.Shared.Tests\PointerStar.Shared.Tests.csproj", "{63BFF661-B487-4447-8245-BD016F75631C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A355C71D-158E-47A8-9C77-8B55C6DF9A5E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A355C71D-158E-47A8-9C77-8B55C6DF9A5E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A355C71D-158E-47A8-9C77-8B55C6DF9A5E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A355C71D-158E-47A8-9C77-8B55C6DF9A5E}.Release|Any CPU.Build.0 = Release|Any CPU
{8402AD00-6B13-42EE-B9B2-00D4D5600152}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8402AD00-6B13-42EE-B9B2-00D4D5600152}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8402AD00-6B13-42EE-B9B2-00D4D5600152}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8402AD00-6B13-42EE-B9B2-00D4D5600152}.Release|Any CPU.Build.0 = Release|Any CPU
{B9B12F75-9DC9-45C2-A867-384E3420016D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B9B12F75-9DC9-45C2-A867-384E3420016D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B9B12F75-9DC9-45C2-A867-384E3420016D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B9B12F75-9DC9-45C2-A867-384E3420016D}.Release|Any CPU.Build.0 = Release|Any CPU
{11AF6C7D-6EC6-45B7-82E5-F815AE5A3721}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{11AF6C7D-6EC6-45B7-82E5-F815AE5A3721}.Debug|Any CPU.Build.0 = Debug|Any CPU
{11AF6C7D-6EC6-45B7-82E5-F815AE5A3721}.Release|Any CPU.ActiveCfg = Release|Any CPU
{11AF6C7D-6EC6-45B7-82E5-F815AE5A3721}.Release|Any CPU.Build.0 = Release|Any CPU
{6521C77B-AC31-4F1B-8EC5-FB7174D7BF1C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6521C77B-AC31-4F1B-8EC5-FB7174D7BF1C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6521C77B-AC31-4F1B-8EC5-FB7174D7BF1C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6521C77B-AC31-4F1B-8EC5-FB7174D7BF1C}.Release|Any CPU.Build.0 = Release|Any CPU
{63BFF661-B487-4447-8245-BD016F75631C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{63BFF661-B487-4447-8245-BD016F75631C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{63BFF661-B487-4447-8245-BD016F75631C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{63BFF661-B487-4447-8245-BD016F75631C}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{C3F9C421-ED11-4345-8580-E90C15F4D002} = {2EAFC20C-739A-4CC0-AB81-5DEEB7C407BA}
{11AF6C7D-6EC6-45B7-82E5-F815AE5A3721} = {566CC054-6689-479D-BB64-26F2CB2BA43B}
{6521C77B-AC31-4F1B-8EC5-FB7174D7BF1C} = {566CC054-6689-479D-BB64-26F2CB2BA43B}
{63BFF661-B487-4447-8245-BD016F75631C} = {566CC054-6689-479D-BB64-26F2CB2BA43B}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {FBEB6B9F-F8F5-42C1-9734-668FA9C44687}
EndGlobalSection
EndGlobal
57 changes: 57 additions & 0 deletions PointerStar/Client/Components/UserDialog.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
@using PointerStar.Client.ViewModels;
@using PointerStar.Shared;
@inherits ComponentBase<UserDialogViewModel>

<MudDialog>
<DialogContent>
<MudStack>
<MudTextField @bind-Value="ViewModel.Name" Label="Name" Variant="Variant.Text" FullWidth=true></MudTextField>
<MudStack Row=true>
<MudText>I want to...</MudText>
<MudButtonGroup OverrideStyles="false">
<MudButton Color="Color.Primary"
Variant="@(ViewModel.SelectedRoleId == Role.TeamMember.Id ? Variant.Filled : Variant.Outlined)"
OnClick="() => ViewModel.SelectRole(Role.TeamMember)">
Vote
</MudButton>
<MudButton Color="Color.Primary"
Variant="@(ViewModel.SelectedRoleId == Role.Facilitator.Id ? Variant.Filled : Variant.Outlined)"
OnClick="() => ViewModel.SelectRole(Role.Facilitator)">
Facilitate
</MudButton>
<MudButton Color="Color.Primary"
Variant="@(ViewModel.SelectedRoleId == Role.Observer.Id ? Variant.Filled : Variant.Outlined)"
OnClick="() => ViewModel.SelectRole(Role.Observer)">
Observe
</MudButton>
</MudButtonGroup>
</MudStack>
</MudStack>
</DialogContent>
<DialogActions>
<MudButton OnClick="Cancel">Cancel</MudButton>
<MudButton Color="Color.Primary" OnClick="Submit">Ok</MudButton>
</DialogActions>
</MudDialog>

@code {
[CascadingParameter]
private MudDialogInstance? MudDialog { get; set; }
[Parameter]
public string? RoomId { get; set; }
[Parameter]
public string? Name { get; set; }
[Parameter]
public Guid? SelectedRoleId { get; set; }

private void Submit() => MudDialog?.Close(DialogResult.Ok(ViewModel));
private void Cancel() => MudDialog?.Cancel();

protected override async Task OnParametersSetAsync()
{
await base.OnParametersSetAsync();
ViewModel.Name = Name;
ViewModel.SelectedRoleId = SelectedRoleId;
await ViewModel.LoadRoomDataAsync(RoomId);
}
}
40 changes: 17 additions & 23 deletions PointerStar/Client/Pages/Index.razor
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
@page "/"
@layout MainLayout
@inject NavigationManager Navigation;
@inject HttpClient Http;

<PageTitle>Pointer*</PageTitle>


<div class="container">
<div class="row">
<div class="text-center">
<button class="btn btn-primary" @onclick="NavigateToRoom">Create Room</button>
</div>
</div>
</div>

@code {
private async Task NavigateToRoom()
{
string roomId = await Http.GetStringAsync("/api/room/generate");
Navigation.NavigateTo($"room/{roomId}");
}
}
@page "/"
@inject NavigationManager Navigation
@inject HttpClient Http

<PageTitle>Pointer*</PageTitle>

<MudStack AlignItems="AlignItems.Center" Justify="Justify.Center" Row="true" Style="height:100px" >
<MudButton Variant="Variant.Filled" Color="Color.Primary" OnClick="NavigateToRoom">Create Room</MudButton>
</MudStack>

@code {
private async Task NavigateToRoom()
{
string roomId = await Http.GetStringAsync("/api/room/generate");
Navigation.NavigateTo($"room/{roomId}");
}
}
Loading

0 comments on commit 386150e

Please sign in to comment.