Skip to content

Commit 4d0e5a4

Browse files
committed
Merge branch 'release/5.0.0' into master
OnTopic Editor 5.0.0 is a major release focused primarily on introducing full support for attribute type plugins, as well as new features exposed from OnTopic 5.0.0 such as topic references. Features - Updated attribute types to be truly dynamically imported at runtime; this allows new attribute types to be defined on a per-implementation basis (04a7470). - The `DateTimeViewComponent` now uses the HTML5 `date`, `time`, or `datetime-local` types, instead of a custom jQuery UI plugin (c73a76c). - The version history dropdown list now displays version times using the local time zone, instead of UTC (2f0a1c2). - Exposed warning in the unlikely scenario that not all relationships or topic references could be fully loaded, in which case there are limitations to what modifications can be made (6e22974). - Exposed warning if the topic has been disabled, to help provide visibility to this high-impact scenario (02d892c). - Exposed warning if the topic is hidden from the navigation (bdfcb7e, b581915). - Exposed warning if the topic is hidden from search engines (4e17a5e, b581915). - Elevated severity of warnings for critical issues to a red "danger" alert (a1f0fca). - Established `OnTopic.Editor.All` metapackage which includes a reference to all of the core packages and implementations (44e7f9e). - Configured `SourceLink` with references to GitHub commits so that packages can be properly debugged by implementers (6e41c37). - The NuGet packages now include the XML documentation, thus allowing implementers to benefit from IntelliSense annotations in Visual Studio (38ff680). - Added icon to NuGet packages to make them easier to recognize, and consistently branded (2503bcc). - Removed unnecessary resources such as duplicate JavaScript files (a562cd9) and npm configuration (ba09497) from the NuGet package, dramatically reducing its size. Bug Fixes - Links within the modal windows now relay the `IsModal` query string parameter to ensure that they link to pages that know they are within a modal window. Notably, this applies to links to base topics (47921ae). - Fixed an irritating jog in the page-level navigation—i.e., the tabs at the top of each form—which occurred each time the page loaded (66ec7e1). Breaking Changes - Removed support for the legacy ASP.NET Web Forms style of configuring OnTopic Editor attributes via the `DefaultConfiguration` property, including removal of the (deprecated) helper functions on `AttributeDescriptorTopicViewModel`, such as `GetConfigurationValue()` (ff8f0de). - Removed deprecated features, mostly related to backward compatibility of the legacy ASP.NET Web Forms implementation (606b9c0). - Reorganized all .NET related attribute type files into a new `OnTopic.Editor.AspNetCore.Attributes` project/package (04a7470); at minimum, this requires replacing the `OnTopic.Editor.Models` package with the `OnTopic.Editor.AspNetCore.Attributes` package. - Updated references to account for the rename from `Topic.DerivedTopic` to `Topic.BaseTopic`, including updating references to the legacy `TopicId` attribute key (360de6c, 776d543). - Removed deprecated configuration attributes on the `AttributeDescriptorViewModel`s as well as from their associated `ViewComponent`s (606b9c0, 5c4fb28, 63b4ef1). - The `EditorViewModelLookupService` no longer derives from the `TopicViewModelLookupService` and, thus, cannot be used to also lookup `OnTopic.ViewModels`, if they're being utilized (9945a94). This can be resolved by using the `CompositeTypeLookupService` to combine these into a single service. Code Improvements - Updated to OnTopic 5.0.0, which includes a number of breaking changes that needed to be accounted for, such as changes in namespaces (926da84, 5010de1). - Updated to OnTopic Data Transfer 2.0.0, which includes support for resolving associations orphaned due to the import order (bdf6a6a), as well as support for the new topic references feature (c74e528, f79e168). - Renamed the attribute descriptors from having an `Attribute` suffix to having an `AttributeDescriptor` suffix (04a7470) and the view models from having an `TopicViewModel` suffix to just the `ViewModel` suffix. E.g., `TopicListAttributeTopicViewModel` is now `TopicListAttributeDescriptorViewModel`. This requires updating the name of the corresponding content types in the OnTopic database. The OnTopic migration scripts includes this update. - Migrated all view models (including the `EditorViewModel`, `AttributeViewModel`, `AttributeBindingModel`, and derivatives) from classes to read-only, immutable C# 9.0 `record` types (77f304f). - Added a new `StyleSheets` and `Scripts` collection of `ClientResource<T>` objects to the `AttributeDescriptorViewModel` as a way of registering client-side stylesheets and JavaScript files from plugins, while having them de-duplicated and injected in the appropriate location in the header or footer (71c2ab9, ce3477a). - Added a new `GetNamespacedUri()` method for prefixing the client resource paths with the plugin assembly's namespace, as required for Razor Class Libraries (4c7bf0f). - Implemented the latest version of Microsoft's code analysis library (`NetAnalyzers`), and implemented the feedback it exposed (71b7783), including nullable reference annotations (185d4bf). - Resolved issues preventing Razor Runtime Compilation from working correctly (51925b1). This affects development of the Editor itself.
2 parents f28a6c9 + e4ea7bb commit 4d0e5a4

183 files changed

Lines changed: 30350 additions & 3022 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Directory.Build.props

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<Project>
2+
3+
<PropertyGroup>
4+
<LangVersion>9.0</LangVersion>
5+
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
6+
<Nullable>enable</Nullable>
7+
<AnalysisLevel>latest</AnalysisLevel>
8+
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
9+
<NoWarn>NU5118</NoWarn>
10+
</PropertyGroup>
11+
12+
<PropertyGroup>
13+
<Product>OnTopic</Product>
14+
<Authors>Ignia</Authors>
15+
<Company>Ignia</Company>
16+
<Copyright>©2021 Ignia, LLC</Copyright>
17+
<PackageProjectUrl>https://github.com/Ignia/Topic-Editor-MVC/</PackageProjectUrl>
18+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
19+
<UseFullSemVerForNuGet>true</UseFullSemVerForNuGet>
20+
<RepositoryType>git</RepositoryType>
21+
<NeutralLanguage>en</NeutralLanguage>
22+
<IncludeSymbols>true</IncludeSymbols>
23+
<EmbedUntrackedSources>true</EmbedUntrackedSources>
24+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
25+
<PackageIcon>Icon.png</PackageIcon>
26+
</PropertyGroup>
27+
28+
<ItemGroup>
29+
<None Include="../Icon.png" Pack="true" PackagePath=""/>
30+
</ItemGroup>
31+
32+
<PropertyGroup Condition="'$(TF_BUILD)' == 'true'">
33+
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
34+
</PropertyGroup>
35+
36+
</Project>

Directory.Build.targets

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<Project>
2+
3+
<ItemGroup>
4+
<Content Remove="wwwroot\shared\**\*.map" />
5+
</ItemGroup>
6+
7+
<ItemGroup>
8+
<Content Update="package.json" Pack="false" />
9+
<Content Update="package-lock.json" Pack="false" />
10+
</ItemGroup>
11+
12+
</Project>

Icon.png

5.33 KB
Loading
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>netcoreapp3.1</TargetFramework>
5+
</PropertyGroup>
6+
7+
<PropertyGroup>
8+
<AssemblyTitle>OnTopic Library Metapackage</AssemblyTitle>
9+
<Description>Includes all core packages associated with the OnTopic Editor, including the default attribute type plugins. Reference this package as a shorthand for establishing a reference to each of the individual packages.</Description>
10+
<OutputPath>bin\$(Configuration)\</OutputPath>
11+
</PropertyGroup>
12+
13+
<ItemGroup>
14+
<ProjectReference Include="..\OnTopic.Editor.AspNetCore.Attributes\OnTopic.Editor.AspNetCore.Attributes.csproj" />
15+
<ProjectReference Include="..\OnTopic.Editor.AspNetCore\OnTopic.Editor.AspNetCore.csproj" />
16+
</ItemGroup>
17+
18+
</Project>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/*==============================================================================================================================
2+
| Author Ignia, LLC
3+
| Client Ignia, LLC
4+
| Project Topics Library
5+
\=============================================================================================================================*/
6+
using System;
7+
using System.Runtime.InteropServices;
8+
9+
/*==============================================================================================================================
10+
| DEFINE ASSEMBLY ATTRIBUTES
11+
>===============================================================================================================================
12+
| Declare and define attributes used in the compiling of the finished assembly.
13+
\-----------------------------------------------------------------------------------------------------------------------------*/
14+
[assembly: ComVisible(false)]
15+
[assembly: CLSCompliant(false)]
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# OnTopic Editor Metapackage
2+
The `OnTopic.Editor.AspNetCore.All` metapackage includes a reference to both the core OnTopic Editor as well as all standard attribute type plugins. It is recommended that implementers reference this package instead of referencing each of the OnTopic Editor packages individually, unless they have a specific need to customize e.g. which attribute plugins are referenced.
3+
4+
[![OnTopic.Editor.AspNetCore package in Internal feed in Azure Artifacts](https://igniasoftware.feeds.visualstudio.com/_apis/public/Packaging/Feeds/46d5f49c-5e1e-47bb-8b14-43be6c719ba8/Packages/682244bf-1062-48de-949e-16f9cb11a6cf/Badge)](https://igniasoftware.visualstudio.com/OnTopic/_packaging?_a=package&feed=46d5f49c-5e1e-47bb-8b14-43be6c719ba8&package=682244bf-1062-48de-949e-16f9cb11a6cf&preferRelease=true)
5+
[![Build Status](https://igniasoftware.visualstudio.com/OnTopic/_apis/build/status/OnTopic-Editor-CI-V1?branchName=master)](https://igniasoftware.visualstudio.com/OnTopic/_build/latest?definitionId=8&branchName=master)
6+
![NuGet Deployment Status](https://rmsprodscussu1.vsrm.visualstudio.com/A09668467-721c-4517-8d2e-aedbe2a7d67f/_apis/public/Release/badge/bd7f03e0-6fcf-4ec6-939d-4e995668d40f/2/2)
7+
8+
### Contents
9+
- [Scope](#scope)
10+
- [Installation](#installation)
11+
12+
## Scope
13+
The `OnTopic.Editor.AspNetCore.All` metapackage maintains a reference to the following packages:
14+
- [`OnTopic.Editor.AspNetCore`](../OnTopic.Editor.AspNetCore/README.md): The core OnTopic Editor interface.
15+
- [`OnTopic.Editor.AspNetCore.Attributes`](../OnTopic.Editor.AspNetCore.Attributes/README.md): The standard attribute types for supporting typing implementations of the OnTopic Editor.
16+
17+
## Installation
18+
Installation can be performed by providing a `<PackageReference /`> to the `OnTopic.Editor.AspNetCore.All` **NuGet** package.
19+
```xml
20+
<Project Sdk="Microsoft.NET.Sdk.Web">
21+
22+
<ItemGroup>
23+
<PackageReference Include="OnTopic.Editor.AspNetCore.All" Version="5.0.0" />
24+
</ItemGroup>
25+
</Project>
26+
```
27+
28+
> *Note:* This package is currently only available on Ignia's private **NuGet** repository. For access, please contact [Ignia](http://www.ignia.com/).

OnTopic.Editor.Models/Components/BindingModels/BooleanAttributeBindingModel.cs renamed to OnTopic.Editor.AspNetCore.Attributes/BooleanAttribute/BooleanAttributeBindingModel.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
| Client Ignia, LLC
44
| Project Topics Library
55
\=============================================================================================================================*/
6+
using OnTopic.Editor.AspNetCore.Models;
67

7-
namespace OnTopic.Editor.Models.Components.BindingModels {
8+
namespace OnTopic.Editor.AspNetCore.Attributes.BooleanAttribute {
89

910
/*============================================================================================================================
1011
| CLASS: BOOLEAN ATTRIBUTE (BINDING MODEL)
@@ -14,7 +15,7 @@ namespace OnTopic.Editor.Models.Components.BindingModels {
1415
/// </summary>
1516
/// <remarks>
1617
/// </remarks>
17-
public class BooleanAttributeBindingModel : AttributeBindingModel {
18+
public record BooleanAttributeBindingModel : AttributeBindingModel {
1819

1920
/*==========================================================================================================================
2021
| PRIVATE VARIABLES
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/*==============================================================================================================================
2+
| Author Ignia, LLC
3+
| Client Ignia, LLC
4+
| Project Topics Library
5+
\=============================================================================================================================*/
6+
using OnTopic.Metadata;
7+
8+
namespace OnTopic.Editor.AspNetCore.Attributes.BooleanAttribute {
9+
10+
/*============================================================================================================================
11+
| CLASS: BOOLEAN ATTRIBUTE (DESCRIPTOR)
12+
\---------------------------------------------------------------------------------------------------------------------------*/
13+
/// <summary>
14+
/// Represents metadata for describing an boolean attribute type, including information on how it will be presented and
15+
/// validated in the editor.
16+
/// </summary>
17+
/// <remarks>
18+
/// This class is primarily used by the Topic Editor interface to determine how attributes are displayed as part of the
19+
/// CMS; except in very specific scenarios, it is not typically used elsewhere in the Topic Library itself.
20+
/// </remarks>
21+
public class BooleanAttributeDescriptor : AttributeDescriptor {
22+
23+
/*==========================================================================================================================
24+
| CONSTRUCTOR
25+
\-------------------------------------------------------------------------------------------------------------------------*/
26+
/// <inheritdoc />
27+
public BooleanAttributeDescriptor(
28+
string key,
29+
string contentType,
30+
Topic parent,
31+
int id = -1
32+
) : base(
33+
key,
34+
contentType,
35+
parent,
36+
id
37+
) {
38+
}
39+
40+
} //Class
41+
} //Namespace

OnTopic.Editor.Models/Metadata/BooleanAttributeTopicViewModel.cs renamed to OnTopic.Editor.AspNetCore.Attributes/BooleanAttribute/BooleanAttributeDescriptorViewModel.cs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,18 @@
33
| Client Ignia, LLC
44
| Project Topics Library
55
\=============================================================================================================================*/
6+
using OnTopic.Editor.AspNetCore.Models.Metadata;
67

7-
#nullable enable
8-
9-
namespace OnTopic.Editor.Models.Metadata {
8+
namespace OnTopic.Editor.AspNetCore.Attributes.BooleanAttribute {
109

1110
/*============================================================================================================================
12-
| CLASS: BOOLEAN ATTRIBUTE (TOPIC VIEW MODEL)
11+
| CLASS: BOOLEAN ATTRIBUTE DESCRIPTOR (VIEW MODEL)
1312
\---------------------------------------------------------------------------------------------------------------------------*/
1413
/// <summary>
1514
/// Provides access to attributes associated with the <see cref="BooleanViewComponent"/>.
1615
/// </summary>
17-
public class BooleanAttributeTopicViewModel: AttributeDescriptorTopicViewModel {
16+
public record BooleanAttributeDescriptorViewModel: AttributeDescriptorViewModel {
1817

1918

2019
} //Class
21-
} //Namespace
22-
23-
#nullable restore
20+
} //Namespace

OnTopic.Editor.Models/Components/ViewModels/BooleanAttributeViewModel.cs renamed to OnTopic.Editor.AspNetCore.Attributes/BooleanAttribute/BooleanAttributeViewModel.cs

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,20 @@
44
| Project Topics Library
55
\=============================================================================================================================*/
66
using System;
7-
using OnTopic.Editor.Models.Metadata;
7+
using OnTopic.Editor.AspNetCore.Models;
8+
using OnTopic.Editor.AspNetCore.Models.Metadata;
89

9-
namespace OnTopic.Editor.Models.Components.ViewModels {
10+
namespace OnTopic.Editor.AspNetCore.Attributes.BooleanAttribute {
1011

1112
/*============================================================================================================================
1213
| CLASS: BOOLEAN ATTRIBUTE (VIEW MODEL)
1314
\---------------------------------------------------------------------------------------------------------------------------*/
1415
/// <summary>
1516
/// Represents the data model for the <see cref="BooleanViewComponent"/>. Additionally provides access to the underlying
16-
/// <see cref="AttributeDescriptorTopicViewModel"/> as well as the instance values for that attribute from the currently
17+
/// <see cref="AttributeDescriptorViewModel"/> as well as the instance values for that attribute from the currently
1718
/// selected <see cref="Topic"/>.
1819
/// </summary>
19-
public class BooleanAttributeViewModel: AttributeViewModel<BooleanAttributeTopicViewModel> {
20+
public record BooleanAttributeViewModel: AttributeViewModel<BooleanAttributeDescriptorViewModel> {
2021

2122
/*==========================================================================================================================
2223
| CONSTRUCTOR
@@ -26,9 +27,9 @@ public class BooleanAttributeViewModel: AttributeViewModel<BooleanAttributeTopic
2627
/// </summary>
2728
public BooleanAttributeViewModel(
2829
EditingTopicViewModel currentTopic,
29-
BooleanAttributeTopicViewModel attributeDescriptor,
30-
string value = null,
31-
string inheritedValue = null
30+
BooleanAttributeDescriptorViewModel attributeDescriptor,
31+
string? value = null,
32+
string? inheritedValue = null
3233
): base(
3334
currentTopic,
3435
attributeDescriptor,
@@ -45,7 +46,7 @@ public BooleanAttributeViewModel(
4546
public bool? IsTrue() {
4647
if (
4748
(Value?.Equals("1", StringComparison.OrdinalIgnoreCase)?? false) ||
48-
(Value?.Equals("true", StringComparison.InvariantCultureIgnoreCase)?? false)
49+
(Value?.Equals("true", StringComparison.OrdinalIgnoreCase)?? false)
4950
) {
5051
return true;
5152
}
@@ -61,7 +62,7 @@ public BooleanAttributeViewModel(
6162
public bool? IsFalse() {
6263
if (
6364
(Value?.Equals("0", StringComparison.OrdinalIgnoreCase) ?? false) ||
64-
(Value?.Equals("false", StringComparison.InvariantCultureIgnoreCase) ?? false)
65+
(Value?.Equals("false", StringComparison.OrdinalIgnoreCase) ?? false)
6566
) {
6667
return false;
6768
}

0 commit comments

Comments
 (0)