Skip to content

Commit fb6a776

Browse files
committed
Updated the package to target Umbraco 13 😎
1 parent b8d66a2 commit fb6a776

11 files changed

+21
-26
lines changed

README.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[![NuGet](https://img.shields.io/nuget/dt/Limbo.Umbraco.TextBox.svg)](https://www.nuget.org/packages/Limbo.Umbraco.TextBox)
66
[![Umbraco Marketplace](https://img.shields.io/badge/umbraco-marketplace-%233544B1)](https://marketplace.umbraco.com/package/limbo.umbraco.textbox)
77

8-
**Limbo Textbox** (or **Limbo.Umbraco.TextBox**) is a package that adds new textbox and textarea property editors for Umbraco 10+. While having similar functionality to the build in property editors, this package adds a few extra features:
8+
**Limbo Textbox** (or **Limbo.Umbraco.TextBox**) is a package that adds new textbox and textarea property editors for Umbraco. While having similar functionality to the build in property editors, this package adds a few extra features:
99

1010
- **More visible character limit**
1111
The default property editors in Umbraco only shows the limit when it has been reached, whereas the property editors in this package show the limit right away, making it more visual to the editor that there is a limit.
@@ -26,11 +26,11 @@
2626
</tr>
2727
<tr>
2828
<td><strong>Umbraco:</strong></td>
29-
<td>Umbraco 10, 11 and 12</td>
29+
<td>Umbraco 13</td>
3030
</tr>
3131
<tr>
3232
<td><strong>Target Framework:</strong></td>
33-
<td>.NET 6</td>
33+
<td>.NET 8</td>
3434
</tr>
3535
</table>
3636

@@ -43,20 +43,25 @@
4343

4444
## Installation
4545

46-
The Umbraco 10 version of this package is only available via [NuGet](https://www.nuget.org/packages/Limbo.Umbraco.TextBox/1.0.4). To install the package, you can use either .NET CLI:
46+
The Umbraco 13 version of this package is only available via [**NuGet**](https://www.nuget.org/packages/Limbo.Umbraco.TextBox/13.0.0). To install the package, you can use either .NET CLI:
4747

4848
```
49-
dotnet add package Limbo.Umbraco.TextBox --version 1.0.4
49+
dotnet add package Limbo.Umbraco.TextBox --version 13.0.0
5050
```
5151

5252
or the NuGet Package Manager:
5353

5454
```
55-
Install-Package Limbo.Umbraco.TextBox -Version 1.0.4
55+
Install-Package Limbo.Umbraco.TextBox -Version 13.0.0
5656
```
5757

58-
> **Note**
59-
> This package replaces our older [Skybrud.Umbraco.TextBox](https://github.com/abjerner/Skybrud.Umbraco.TextBox) package. See this package for older versions of Umbraco.
58+
### Other versions of Umbraco
59+
60+
- **Umbraco 10-12**
61+
See the the [**v1/main**](https://github.com/abjerner/Limbo.Umbraco.TextBox/tree/v1/main) branch.
62+
63+
- **Umbraco 8-9**
64+
See our older [Skybrud.Umbraco.TextBox](https://github.com/abjerner/Skybrud.Umbraco.TextBox) package.
6065

6166

6267

debug.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
@echo off
2-
dotnet build src/Limbo.Umbraco.TextBox --configuration Debug /t:rebuild /t:pack -p:PackageOutputPath=c:\nuget\Umbraco10
2+
dotnet build src/Limbo.Umbraco.TextBox --configuration Debug /t:rebuild /t:pack -p:PackageOutputPath=c:\nuget\Umbraco13
-18.7 KB
Binary file not shown.
-19.1 KB
Binary file not shown.
-19.8 KB
Binary file not shown.
-19.8 KB
Binary file not shown.
-19.9 KB
Binary file not shown.
-20.1 KB
Binary file not shown.

src/Limbo.Umbraco.TextBox/Limbo.Umbraco.TextBox.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<Project Sdk="Microsoft.NET.Sdk.Razor">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<StaticWebAssetBasePath>App_Plugins/$(AssemblyName)</StaticWebAssetBasePath>
66
<Nullable>enable</Nullable>
77
</PropertyGroup>
88

99
<PropertyGroup>
10-
<VersionPrefix>1.0.5</VersionPrefix>
10+
<VersionPrefix>13.0.0-alpha000</VersionPrefix>
1111
<VersionSuffix Condition="'$(Configuration)'=='Debug'">$([System.DateTime]::UtcNow.ToString(`yyyyMMddHHmm`))</VersionSuffix>
1212
<Company>Limbo</Company>
1313
<Authors>Anders Bjerner</Authors>
@@ -21,7 +21,7 @@
2121
<PackageId>Limbo.Umbraco.TextBox</PackageId>
2222
<PackageTags>Limbo, Skybrud, Umbraco, Textbox, Textarea, Umbraco-Marketplace</PackageTags>
2323
<PackageLicenseExpression>MIT</PackageLicenseExpression>
24-
<PackageProjectUrl>https://packages.limbo.works/limbo.umbraco.textbox/v1/</PackageProjectUrl>
24+
<PackageProjectUrl>https://packages.limbo.works/limbo.umbraco.textbox/v13/</PackageProjectUrl>
2525
<PackageIcon>Limbo.png</PackageIcon>
2626
<RepositoryType>git</RepositoryType>
2727
<RepositoryUrl>https://github.com/abjerner/Limbo.Umbraco.TextBox</RepositoryUrl>
@@ -30,8 +30,8 @@
3030
<!-- Include NuGet dependencies -->
3131
<ItemGroup>
3232
<PackageReference Include="Skybrud.Essentials" Version="1.1.56" />
33-
<PackageReference Include="Umbraco.Cms.Core" Version="[10.0.0,12.999)" />
34-
<PackageReference Include="Umbraco.Cms.Web.BackOffice" Version="[10.0.0,12.999)" />
33+
<PackageReference Include="Umbraco.Cms.Core" Version="[13.0.0,13.999)" />
34+
<PackageReference Include="Umbraco.Cms.Web.BackOffice" Version="[13.0.0,13.999)" />
3535
</ItemGroup>
3636

3737
<!-- Include package icon for NuGet -->

src/Limbo.Umbraco.TextBox/TextBoxManifestFilter.cs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System.Collections.Generic;
2-
using System.Reflection;
32
using Umbraco.Cms.Core.Manifest;
43

54
namespace Limbo.Umbraco.TextBox;
@@ -13,6 +12,7 @@ public void Filter(List<PackageManifest> manifests) {
1312
// Initialize a new manifest filter for this package
1413
PackageManifest manifest = new() {
1514
AllowPackageTelemetry = true,
15+
PackageId = TextBoxPackage.Alias,
1616
PackageName = TextBoxPackage.Name,
1717
Version = TextBoxPackage.InformationalVersion,
1818
BundleOptions = BundleOptions.Independent,
@@ -24,16 +24,6 @@ public void Filter(List<PackageManifest> manifests) {
2424
}
2525
};
2626

27-
// The "PackageId" property isn't available prior to Umbraco 12, and since the package is build against
28-
// Umbraco 10, we need to use reflection for setting the property value for Umbraco 12+. Ideally this
29-
// shouldn't fail, but we might at least add a try/catch to be sure
30-
try {
31-
PropertyInfo? property = manifest.GetType().GetProperty("PackageId");
32-
property?.SetValue(manifest, TextBoxPackage.Alias);
33-
} catch {
34-
// We don't really care about the exception
35-
}
36-
3727
// Append the manifest
3828
manifests.Add(manifest);
3929

0 commit comments

Comments
 (0)