Skip to content

Blazor PWA node and push notifications article #35688

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 5 commits into from
Jul 7, 2025

Conversation

@guardrex guardrex self-assigned this Jul 1, 2025
@guardrex guardrex marked this pull request as ready for review July 7, 2025 13:55
@guardrex guardrex requested a review from Copilot July 7, 2025 14:14
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a new push notifications article for Blazor PWAs, updates the PWA landing page UID and asset paths, and fixes various xref links and TOC entries to point to the new index subpage.

  • Introduces push-notifications.md with end-to-end Blazor PWA push notification guidance.
  • Updates index.md in the PWA folder: changes uid, image paths, and xref links to /index.
  • Adjusts toc.yml, other docs, and the redirection JSON to incorporate the new subpage structure.

Reviewed Changes

Copilot reviewed 10 out of 20 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
aspnetcore/whats-new/dotnet-AspNetCore.Docs-mod1.md Updated xref to use /index path for PWA guidance
aspnetcore/toc.yml Added PWA overview and push-notifications as TOC children; original uid entry needs cleanup
aspnetcore/blazor/security/webassembly/graph-api.md Updated PWA xref to include /index suffix
aspnetcore/blazor/progressive-web-app/push-notifications.md New article on push notifications for Blazor PWAs
aspnetcore/blazor/progressive-web-app/index.md Changed uid, updated image links and xrefs to new folder
aspnetcore/blazor/hosting-models.md Updated PWA xref to /index path
aspnetcore/blazor/host-and-deploy/webassembly/index.md Updated xref links to /index for PWA references
aspnetcore/blazor/host-and-deploy/webassembly/bundle-caching-and-integrity-check-failures.md Updated PWA xref to /index
aspnetcore/blazor/fundamentals/configuration.md Updated PWA xref links to /index
.openpublishing.redirection.json Added redirect for old blazor/progressive-web-app.md
Comments suppressed due to low confidence (1)

aspnetcore/toc.yml:669

  • The standalone uid: blazor/progressive-web-app entry should be removed or properly nested under an items: block to prevent invalid TOC structure and ensure correct navigation.
          - name: Progressive Web Applications


// Store the new subscription
subscription.UserId = userId;
db.NotificationSubscriptions.Attach(subscription);
Copy link
Preview

Copilot AI Jul 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using Attach on a new entity does not mark it as added. Replace with Add or AddAsync so that the new subscription is actually inserted into the database.

Suggested change
db.NotificationSubscriptions.Attach(subscription);
db.NotificationSubscriptions.Add(subscription);

Copilot uses AI. Check for mistakes.

Copy link
Collaborator Author

@guardrex guardrex Jul 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc: @csharpfritz 👋 Hope ur well! ... Copilot is recommending Add instead of Attach for the Blazing Pizza Workshop app. I'll merge this PR without accepting Copilot's suggestion, given that this article should match what readers find in the Blazing Pizza app ...

https://github.com/csharpfritz/BlazingPizzaWorkshop/blob/main/src/BlazingPizza/PizzaApiExtensions.cs#L31

... but if you let me know that Copilot is correct and that you intend to change the app in the workshop repo (let me know if you want me to open an issue on the workshop repo), I'll put in a patch PR here to update to Add after you change it over there.

@guardrex guardrex merged commit db376e6 into main Jul 7, 2025
3 checks passed
@guardrex guardrex deleted the guardrex/pwa-node-and-push-notifications branch July 7, 2025 14:35
csharpfritz added a commit to csharpfritz/BlazingPizzaWorkshop that referenced this pull request Jul 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Restore or add PWA push notifications guidance
1 participant