Skip to content

Commit

Permalink
Remove unnecessary and problematic popover exceptions (#1330)
Browse files Browse the repository at this point in the history
* Repair release notes date

* Repair release notes #2

* Remove unnecessary popover exceptions

---------

Co-authored-by: MarkStega <[email protected]>
Co-authored-by: Mark Stega <[email protected]>
  • Loading branch information
3 people authored Apr 11, 2024
1 parent 31ae8b8 commit bb4bdcb
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 18 deletions.
10 changes: 1 addition & 9 deletions Material.Blazor/Components/Popover/MBPopover.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,7 @@ void IMBLayoutParent.RegisterLayoutAction(ComponentFoundation child)
/// <returns>The action string resulting from dialog closure</returns>
public async Task ShowAsync()
{
if (IsOpen)
{
throw new InvalidOperationException("Cannot show MBPopover that is already open");
}
else
if (!IsOpen)
{
LayoutChildren.Clear();
_hasInstantiated = false;
Expand Down Expand Up @@ -159,10 +155,6 @@ public async Task HideAsync()
{
await InvokeJsVoidAsync("MaterialBlazor.MBPopover.hide", ElementReference);
}
else
{
throw new InvalidOperationException("Cannot hide MBPopover that is not already open");
}
}


Expand Down
2 changes: 1 addition & 1 deletion Material.Blazor/Styles/_material-icons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
font-family: 'Material Icons';
font-style: normal;
font-weight: 400;
src: url(https://fonts.gstatic.com/s/materialicons/v141/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2) format('woff2');
src: url(https://fonts.gstatic.com/s/materialicons/v142/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2) format('woff2');
}
/* fallback */
@font-face {
Expand Down
2 changes: 1 addition & 1 deletion Material.Blazor/Styles/_material-symbols-outlined.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
font-family: 'Material Symbols Outlined';
font-style: normal;
font-weight: 100 700;
src: url(https://fonts.gstatic.com/s/materialsymbolsoutlined/v170/kJEhBvYX7BgnkSrUwT8OhrdQw4oELdPIeeII9v6oFsI.woff2) format('woff2');
src: url(https://fonts.gstatic.com/s/materialsymbolsoutlined/v175/kJEhBvYX7BgnkSrUwT8OhrdQw4oELdPIeeII9v6oFsI.woff2) format('woff2');
}

.material-symbols-outlined {
Expand Down
2 changes: 1 addition & 1 deletion Material.Blazor/Styles/_material-symbols-rounded.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
font-family: 'Material Symbols Rounded';
font-style: normal;
font-weight: 100 700;
src: url(https://fonts.gstatic.com/s/materialsymbolsrounded/v168/sykg-zNym6YjUruM-QrEh7-nyTnjDwKNJ_190Fjzag.woff2) format('woff2');
src: url(https://fonts.gstatic.com/s/materialsymbolsrounded/v173/sykg-zNym6YjUruM-QrEh7-nyTnjDwKNJ_190Fjzag.woff2) format('woff2');
}

.material-symbols-rounded {
Expand Down
2 changes: 1 addition & 1 deletion Material.Blazor/Styles/_material-symbols-sharp.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
font-family: 'Material Symbols Sharp';
font-style: normal;
font-weight: 100 700;
src: url(https://fonts.gstatic.com/s/materialsymbolssharp/v166/gNMVW2J8Roq16WD5tFNRaeLQk6-SHQ_R00k4aWE.woff2) format('woff2');
src: url(https://fonts.gstatic.com/s/materialsymbolssharp/v171/gNMVW2J8Roq16WD5tFNRaeLQk6-SHQ_R00k4aWE.woff2) format('woff2');
}

.material-symbols-sharp {
Expand Down
25 changes: 20 additions & 5 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,34 @@ title: ReleaseNotes
---
# Release Notes

#### [5.3.2](https://github.com/Material-Blazor/Material.Blazor/tree/5.3.2)

Released 2024-04-11

**Updates**
- `MBPopover` no longer throws exceptions when you try to show a popover that is already open, or hide one that is hidden. This was an unnecessary exception.

**New components**

**New features**

**Breaking Changes**

**Deprecated Components**

**Known issues**

<br />

#### [5.3.1](https://github.com/Material-Blazor/Material.Blazor/tree/5.3.1)

Released 2024-04-??
Released 2024-04-10

**Updates**
- .Net 8.0.4 updates
- Dependabot updates.

**New components**
- `MBPopover` has the same styling and UX experience as `MBMenuSurface`, with the following engineering differences:
- Performs lazy rendering of child content to improve page load performance, copied from `MBDialog`.
- Also like `MBDialog`, `MBPopover` performs late instantiation of child compoenents to ensure correct styling after opening.
- `MBPopover` has `ShowAsync()` and `HideAsync()` like `MBDialog`, unlike the `ToggleAsync()` method of `MBMenuSurface`.

**New features**

Expand Down

0 comments on commit bb4bdcb

Please sign in to comment.