Skip to content

Commit

Permalink
Merge pull request #26 from 2sic/develop
Browse files Browse the repository at this point in the history
v4.00 pre-release
  • Loading branch information
iJungleboy authored Dec 7, 2022
2 parents 03c30cb + 6377085 commit 2eda6d1
Show file tree
Hide file tree
Showing 223 changed files with 18,505 additions and 3,533 deletions.
4 changes: 2 additions & 2 deletions DocFx Generator/Razor-Blade.net DocFx Generator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\docfx.console.2.59.0\build\docfx.console.targets" Condition="Exists('..\packages\docfx.console.2.59.0\build\docfx.console.targets')" />
<Import Project="..\packages\docfx.console.2.59.4\build\docfx.console.targets" Condition="Exists('..\packages\docfx.console.2.59.4\build\docfx.console.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\docfx.console.2.59.0\build\docfx.console.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\docfx.console.2.59.0\build\docfx.console.targets'))" />
<Error Condition="!Exists('..\packages\docfx.console.2.59.4\build\docfx.console.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\docfx.console.2.59.4\build\docfx.console.targets'))" />
</Target>
</Project>
38 changes: 30 additions & 8 deletions DocFx Generator/articles/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@

# RazorBlade ChangeLog

## Version 4

### Version 4.0 (2022-12)

* Created a new interface [`IHtmlTag`](xref:ToSic.Razor.Blade.IHtmlTag) which is supported by all generated code, and ensures you have methods such as `Add(...)` or `Wrap(...)` when using any tag generically.
It is available on `ToSic.Razor.Blade` so you don't need to add more namespaces
* Create a new `ToSic.Razor.Blade.IHtmlTagService` which provides the same functionality as the static `Blade.Tag` API, but with immutable objects (see below)
* All generated tags like `Div`, `H2` etc. can now be immutable.
* The existing `ToSic.Razor.Blade.Tag.TAGNAME(...)` apis continue to deliver mutable objects (like before)
* The new `IHtmlTagService` provides immutable objects. This can lead to surprising effects when migrating existing code, so that should best continue to use the old `Blade.Tag...`
* .net Core build now requires .net6 (previously .net5)
* Removed the `StartUp.RegisterToJson(...)` method which was used at StartUp in special cases to register alternate json-serializer
* The `AttributeOptions` and `TagOptions` were made read-only for reliable fluid / immutable APIs.
This is kind of a **breaking change** but we believe it won't affect anybody.
since it was basically an internal API which nobody used outside of this.

## Version 3

### Version 3.0 (2019-10-21)
Expand All @@ -11,15 +27,15 @@ Released V3 which was a complete rework and had a new root namespace.
1. Created website with full API documentation [Razor-Blade.net](https://razor-blade.net)
1. Created all Html5 tags and quick-accessor using Tag.xxx

**Breaking Changes**
#### Breaking Changes

We really hate to introduce breaking changes, but 3.0 was a good opportunity for this.
We really hate to introduce breaking changes, but 3.0 was a good opportunity for this.

1. Renamed everything to use the namespace `ToSic.Razor.Blade` from previously `Connect.Razor.Blade`. This was improtant, because we decided to release RazorBlade as a NuGet package, and the previous namespace `Connect` didn't make any sense.
1. Renamed everything to use the namespace `ToSic.Razor.Blade` from previously `Connect.Razor.Blade`. This was improtant, because we decided to release RazorBlade as a NuGet package, and the previous namespace `Connect` didn't make any sense.
1. Renamed the DLL to be in-line with the changes, which also means that previous code still works, because the new namespace can run side-by-side with the previous one
1. Reorganized some internal APIs, so they won't disturb in public documentation
1. Modified the `Text.First()` method so it could now take an unlimited amount of strings to pick the first one.
1. Moved primary repo in Github to [2sic](https://github.com/2sic/razor-blade)
1. Modified the `Text.First()` method so it could now take an unlimited amount of strings to pick the first one.
1. Moved primary repo in Github to [2sic](https://github.com/2sic/razor-blade)

### V3.01 2019-12

Expand All @@ -38,6 +54,12 @@ Minor fixes / changes which required a version bump.

1. Created `Tag.RawHtml(...)`
1. `Tag.Attr(...)` now can also accept ITag values like prepared attributes
1. Various null-checks/bugfixes
1. Operators to enable adding Tags like `Tag.P() + Tag.Div()`
1. Adding tag contents with IEnumerable (previously only Arrays worked)
1. Fix Json serialization for Oqtane (previously internal ToJson only worked in .net 451)
1. Will probably be bundled with 2sxc 12.05
1. Removed the `IHtmlPage` interface from the docs as it shouldn't be used any more

### V3.08 2022-01

Expand All @@ -57,7 +79,7 @@ Minor fixes / changes which required a version bump.

1. Minor bugfixes and clean-up of tests

---
---

## Version 2

Expand All @@ -74,7 +96,7 @@ Minor fixes / changes which required a version bump.

1. Released first draft of Fluent Tag API which was later brought to final in 3.0

---
---

## Version 1

Expand All @@ -90,4 +112,4 @@ Minor fixes / changes which required a version bump.

1. Released RazorBlade
1. Created `Text...` and `Tags...` API
1. Released it as a DNN Extension Library on Github
1. Released it as a DNN Extension Library on Github
7 changes: 5 additions & 2 deletions DocFx Generator/docfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
}
],
"dest": "obj/api",
"filter": "filterConfig.yml"
"filter": "filterConfig.yml",
"properties": {
"TargetFramework": "net472"
}
}
],
"build": {
Expand Down Expand Up @@ -71,7 +74,7 @@
"templates/razor-blade"
],
"globalMetadata": {
"_appTitle": "RazorBlade 3",
"_appTitle": "RazorBlade 4",

"_appLogoPath": "images/logos/razor-blade-icon-50.png",
"_enableNewTab": true,
Expand Down
6 changes: 3 additions & 3 deletions DocFx Generator/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

<img src="images/logos/razor-blade-logo.png" width="100%">

# **API Docs of _RazorBlade 3.09_**
# **API Docs of _RazorBlade 4.00_**

These docs are meant for programmers using [RazorBlade](https://github.com/2sic/razor-blade). These will usually be people working with C# and Razor, MVC etc.

Expand Down Expand Up @@ -86,6 +86,6 @@ _Note that HTML whitespace like `&nbsp;` will also be treated as empty, unless y

## Nice to Know

1. **RazorBlade** has 300 unit tests to make it rock-solid!
1. The last update was February 2022 when we released v3.09
1. **RazorBlade** has 340 unit tests to make it rock-solid!
1. The last update was December 2022 when we released v4.00
1. See the [Change Log](articles/changelog.md)
2 changes: 1 addition & 1 deletion DocFx Generator/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="docfx.console" version="2.59.0" targetFramework="net451" developmentDependency="true" />
<package id="docfx.console" version="2.59.4" targetFramework="net451" developmentDependency="true" />
</packages>
11 changes: 11 additions & 0 deletions Razor.Blade/Blade/HtmlTagService/HtmlTagServiceImplementation.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using ToSic.Razor.Html5;
using ToSic.Razor.Internals.Documentation;
using ToSic.Razor.Markup;

namespace ToSic.Razor.Blade
{
[PrivateApi("Hide implementation")]
public partial class HtmlTagServiceImplementation: IHtmlTagService
{
}
}
Loading

0 comments on commit 2eda6d1

Please sign in to comment.