Skip to content

Styles refactoring#38

Merged
teociaps merged 4 commits intomainfrom
styles-refactoring
Nov 27, 2025
Merged

Styles refactoring#38
teociaps merged 4 commits intomainfrom
styles-refactoring

Conversation

@teociaps
Copy link
Owner

This pull request introduces several improvements and cleanups across documentation, sample projects, and theme customization to streamline usage and clarify the project's structure. The most significant updates include a major rewrite of the README.md for better onboarding, consolidation and modernization of sample theme code, and adjustments to package metadata for NuGet publishing.

Documentation and onboarding improvements:

  • Completely rewrote README.md to provide a clearer, more inviting introduction, quick start guide, feature overview, usage examples, package table, and links to documentation and migration guides.
  • Updated CONTRIBUTING.md to clarify that style/script guidelines apply specifically to theme files.
  • Removed the now-redundant package-readme.md content, as information is now covered in the main documentation.

Sample project and theme structure modernization:

  • Refactored the NSwag sample project to use a new CustomTheme class (inheriting from Theme) instead of separate Style/ModernStyle subclasses, simplifying theme customization and usage. [1] [2]
  • Updated sample project references and embedded resources to use the new custom.css and standalone.custom.css files, and removed obsolete files and code. [1] [2] [3] [4] [5] [6]

Packaging and NuGet publishing:

  • Corrected build/NuGet.props to ensure package-readme.md is included in the root of the package, improving NuGet package presentation.

These changes make the project easier to adopt, modernize theme extension, and improve the clarity and maintainability of both the codebase and documentation.

@teociaps teociaps added this to the v3.0.0 milestone Nov 24, 2025
@teociaps teociaps self-assigned this Nov 24, 2025
@teociaps teociaps added documentation Improvements or additions to documentation enhancement New feature or request labels Nov 24, 2025
- Removed "classic" and "modern" styles in favor of just one single style.
- Introduced `standalone.style.css` for independent themes without dependencies on `common.css` or `ui.js`.
- Enhanced maintainability by restructuring CSS files and removing unused styles.
- Removed "modern." prefixes from CSS/JS filenames for simplicity.
- Consolidated `Style` and `ModernStyle` into a single `Theme` class.
- Renamed all "Style" references to "Theme" across the codebase.
- Added support for standalone themes (no `common.css` or `ui.js`).
- Updated `FileProvider.cs` to handle themes and standalone logic.
- Refactored `SwaggerUIBuilderExtensions` and `NSwagBuilderExtensions`.
- Updated tests, samples, and documentation to reflect changes.
- Removed classic styles and related logic (breaking change).
Revised README.md and package-readme.md to improve clarity, structure, and visual appeal. Added new sections for quick start, features, and breaking changes. Updated badges, links, and examples for Swashbuckle and NSwag.

Adjusted NuGet.props to fix `PackagePath` for `package-readme.md`.

Updated readme.txt with detailed release notes for v3.0.0, highlighting breaking changes, .NET 10 support, and other improvements.

Enhanced user guidance with links to migration guides and documentation.
@teociaps teociaps marked this pull request as ready for review November 27, 2025 23:16
@teociaps teociaps marked this pull request as draft November 27, 2025 23:20
@teociaps teociaps marked this pull request as ready for review November 27, 2025 23:21
@teociaps teociaps merged commit 6f8b059 into main Nov 27, 2025
@teociaps teociaps deleted the styles-refactoring branch November 27, 2025 23:33
@teociaps teociaps added the fixed Issue fixed in current or prior release label Nov 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request fixed Issue fixed in current or prior release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant