Skip to content

CSS isolation, namespace consolidation, and SfThemeRoot theme delivery - #97

Merged
PrinceOliver merged 37 commits into
syncfusion:mainfrom
Yokesh-SF4393:release-branch
Oct 9, 2026
Merged

PrinceOliver merged 37 commits into
syncfusion:mainfrom
Yokesh-SF4393:release-branch

Conversation

@Indhumathy-Loganathan

Copy link
Copy Markdown
Collaborator

Summary

This PR prepares the Syncfusion Blazor Toolkit for the 2.0.0 major release. It consolidates public types into a single root namespace, migrates component styles to Blazor CSS isolation, and introduces SfThemeRoot so shared theme styles are emitted at render time (including static SSR). It also lands the approved API surface changes relative to NuGet 1.0.2, release documentation (CHANGELOG, version, migration notes), and related sample/test updates.

These changes are intentionally major: consumers must update imports, review custom CSS overrides, and follow the approved 2.0 API migration contract.

Key Changes

1. Namespace Consolidation

  • Removed domain-specific namespaces; all public types now live under Syncfusion.Blazor.Toolkit.
  • Updated samples, layouts, and demos to use the single root @using.
  • Migration: replace previous domain imports with @using Syncfusion.Blazor.Toolkit (or equivalent in _Imports.razor / C#).

2. CSS Isolation Migration

  • Migrated component styles to Blazor CSS isolation (.razor.css → scoped bundle) for Buttons, ButtonGroup, Calendars, Inputs, Popups, Spinner, Chart, and related components.
  • Fixed invalid generated selectors, dark-theme color override loss, and missing styles (Spinner, Checkbox, NumericTextBox, Calendars, TextArea).
  • Updated sample browser styles and server host stylesheet wiring for the isolation model.
  • App-level overrides that targeted unscoped toolkit class names may need adjustment for isolation scope.

3. SfThemeRoot Theme Delivery

  • Added SfThemeRoot / SfThemeScope: render-time emission of the shared theme layer (:root tokens, base/utility styles, icon font, keyframes, dark / high-contrast / forced-colors) as <style id="sf-theme-root">.
  • Each consumer-facing root component renders <SfThemeRoot /> as the previous sibling of its root element; one owner per renderer emits the style, with automatic ownership recovery on dispose.
  • Ensures theme presence in static SSR, first interactive render, and render-mode transitions without consumer configuration or JS for the common case.
  • Added JS fallback when no owner exists; placement rules enforced by unit tests.

4. Approved 2.0 API Surface

  • Applied the reviewed major-version contract vs NuGet 1.0.2 (194 named diagnostics): Chart internal type visibility, collection List → IList/interface signatures, getter-only ownership (UploadedFiles.Files, ChartData.CurrentPoints), parent metadata (dynamic → object), static helper construction limits, and DataAdaptor<T> where T : notnull.
  • Full inventory and migration guidance: API-COMPATIBILITY.md, API-BREAK-INVENTORY.md.

5. SSR and Rendering Fixes

  • Fixed styles not applied in static SSR (theme + component styles emit during the server pass).
  • Fixed Chart rendering under static SSR (default size/layout when post-render measurement/JS is unavailable).
  • Additional chart/layout stability fixes (axis-overlap isolation, null category sorting, typed internal render fragments).

6. Release Documentation and Version

  • Set product version to 2.0.0 in source.
  • Added/updated CHANGELOG.md for 2.0.0 (Breaking / Added / Changed / Fixed / Migration Notes) and historical 1.0.x summaries.
  • Aligned development guide and release-checklist-oriented documentation updates.

7. Samples, Tests, and Tooling

  • Updated sample browser (namespaces, layouts, popups, Getting Started, theme placement).
  • Added SfThemeRoot / enforcement tests; fixed Playwright build issues and related sample console errors.
  • Dependency and tooling bumps as needed for the branch.

Migration Notes (consumer-facing)

  • Not source-compatible with 1.0.2.
  • Use @using Syncfusion.Blazor.Toolkit only.
  • Review custom CSS after isolation.
  • Ensure toolkit components (or explicit SfThemeRoot) are in the tree when theme emission is required.
  • Prefer IList<T> (or interfaces) over casting to List<T>; mutate getter-only collections via Clear/Add.
  • Propagate where T : notnull on DataAdaptor<T> subclasses.

Validation

  • Library builds for net8.0 / net9.0 / net10.0
  • bUnit tests pass (including theme-root tests)
  • Playwright / sample browser smoke (SSR + interactive)
  • API compat gate vs 1.0.2 with approved exceptions only
  • CHANGELOG and version match intended 2.0.0 release content
  • No unexpected tracked asset diffs after theme generation

YokeshSF4393 and others added 30 commits October 8, 2026 18:02
… in demo sample files from development css isolation branch to github forked branch.
… in demo sample files from development css isolation branch to github forked branch.
…nts by moving changes regarding CSS isolation.
…y in static SSR mode rendering of components
…oving changes regarding CSS isolation and added missing styles for Calendars and TextArea.
Comment thread src/wwwroot/scripts/base.js Fixed
Comment thread src/wwwroot/scripts/base.js Fixed
Comment thread src/wwwroot/scripts/base.js Fixed
PrinceOliver
PrinceOliver previously approved these changes Oct 9, 2026
@PrinceOliver
PrinceOliver merged commit f498bbc into syncfusion:main Oct 9, 2026
15 checks passed
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.

8 participants