Skip to content

v2.0.0: .NET 8 / .NET 10, no jQuery, AJAX + htmx, CSP-friendly - #24

Merged
iammukeshm merged 5 commits into
masterfrom
v2-net10
Sep 25, 2026
Merged

iammukeshm merged 5 commits into
masterfrom
v2-net10

Conversation

@iammukeshm

Copy link
Copy Markdown
Member

The first release in five years. Rebuilt for .NET 8 and .NET 10, working through every open issue.

Highlights

  • Targets .NET 8 and .NET 10 (drops .NET Core 3.1 and .NET 5)
  • No jQuery. The client scripts are plain JavaScript.
  • AJAX works automatically for fetch, XHR, jQuery and htmx, on success and error responses, including requests that redirect
  • No inline JavaScript, so a strict CSP (script-src 'self') works. Optional nonce.
  • Sticky toasts (0 duration), per-type colours / classes / icons, optional Font Awesome, RTL, full-width positions, accessible close buttons
  • Three lines of setup, no extra using lines
  • SourceLink, symbol package, nullable annotations, package validation

Issues

Fixes #2, #3, #4, #5, #7, #8, #9, #10, #11, #13, #14, #15, #16, #17, #22, #23. Supersedes #12. #1 (IE11) is not supported.

Tests

210 tests: unit + integration on .NET 8 and .NET 10, a public API snapshot, and Playwright browser tests (redirects, fetch, XHR, jQuery, htmx, hx-boost, sticky toasts, strict CSP, no-jQuery pages, cross-origin header injection).

The packed .nupkg was also installed into fresh .NET 8 MVC and .NET 10 Razor Pages apps, run in Development and published to Production.

Repo

  • src/ samples/ tests/ layout, .slnx, Central Package Management
  • One docs app in samples/ToastNotification.Docs (playground, Notyf vs Toastify, setup wizard)
  • CI and release workflows (NuGet trusted publishing)
  • New README, CHANGELOG and LICENSE

Breaking changes are listed in the CHANGELOG.

Update package metadata (Company, PackageProjectUrl, RepositoryUrl) and
README demo links to point at github.com/codewithmukesh/ToastNotification.
Package ID stays AspNetCoreHero.ToastNotification.
Library
- Target net8.0 and net10.0; drop netcoreapp3.1 and net5.0
- Replace Newtonsoft.Json with System.Text.Json
- No jQuery; client scripts boot from a JSON data block (no inline JS)
- Automatic toasts for fetch, XHR, jQuery and htmx; Toastify gets AJAX support
- Sticky toasts (duration 0), per-type styles, custom classes, optional
  Font Awesome, RTL, full-width positions, accessible close buttons
- Optional CSP nonce on both view components
- AddNotyf/AddToastify/UseNotyf/UseToastify in the standard namespaces
- Fix script-context breakout and quote handling in messages (#4)
- Fix shared Toastify config across requests, ignored HasRippleEffect,
  Bootstrap-only contrast classes, and the hard-coded icon path
- Audit fixes: ignore cross-origin toast headers, keep toasts across
  AJAX/htmx redirects, survive hx-boost, cap header size
- SourceLink, snupkg, nullable annotations, package validation

Repo
- src/ samples/ tests/ layout, .slnx, Central Package Management
- Unit, integration, public API and Playwright browser tests (210)
- CI and release workflows (NuGet trusted publishing)
- Samples rebuilt as the docs site: playground, compare, setup wizard
- New README, CHANGELOG and LICENSE
- samples/ToastNotification.Docs replaces the Notyf (MVC) and Toastify
  (Razor Pages) samples, which were ~95% duplicated
- One app shows all three workloads for real: MVC controllers,
  a Razor Page (/checkout) and Minimal API endpoints
- Docs section gets a Notyf / Toastify toggle that switches snippets,
  settings tables, forms, fetch/jQuery/htmx demos and "Try" buttons
- Demo endpoints and form posts take a library parameter
- Nav links work from every page; plain Kestrel launch profile
- README: "Docs App" section replaces "Samples"
- Tests: pass TestContext cancellation token (xUnit1051)
- Restyle on the codewithmukesh.com design tokens: warm neutrals,
  brand purple, flat surfaces with borders, Outfit / Figtree /
  JetBrains Mono; light by default with a dark toggle
- Rewrite page copy in first person, drop eyebrow labels and slogans,
  replace the icon feature grid with a plain "What you get" list
- Full-width section dividers with alternating shaded bands
- Fix text overflow and layout issues found by a 320-1920px audit:
  wrapping segmented controls, collapsible mobile nav, shrinkable
  grid columns, stacked-card tables on phones, ellipsis for long
  file names
@iammukeshm
iammukeshm merged commit c885cca into master Sep 25, 2026
1 check passed
@iammukeshm
iammukeshm deleted the v2-net10 branch September 25, 2026 09:46
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.

Problem with ajax call

1 participant