-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OSOE-795: Upgrade to latest OC preview to test System.Text.Json #161
Merged
Merged
Changes from 24 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
dd5a144
Update NuGet versions to pre-release.
sarahelsaig 8dfb784
Merge remote-tracking branch 'origin/dev' into issue/OSOE-795
sarahelsaig 7928059
Fix compilation errors.
sarahelsaig 4a90771
Refactor CodeGenerationDisplayDriver.
sarahelsaig 87c3db9
Fix compilation errors.
sarahelsaig d9d5d9c
Remove "using Newtonsoft.Json"
sarahelsaig 8186703
Fix MenuWidgetLiquidFilter.
sarahelsaig 2c38547
Update OC to latest (because of bug fix for WorkflowTypeStep)
sarahelsaig 22b85a4
ISmtpService is obsolete.
sarahelsaig c087456
Update method name.
sarahelsaig dc1d164
Update OC preview version.
sarahelsaig 68c7cf5
Update code generation test due to change in serialization.
sarahelsaig 4a695ab
Update OC package
sarahelsaig aec510e
Code cleanup.
sarahelsaig e6a3888
Use JObject.FromObject instead of JsonSerializer.SerializeToNode wher…
sarahelsaig 3e72269
Merge remote-tracking branch 'origin/dev' into issue/OSOE-795
sarahelsaig f35bde3
Fix SerializeAndDeserialize
sarahelsaig bfd977f
Update OC preview version.
sarahelsaig 33639b9
Update AddCondition to AddRuleCondition
sarahelsaig 75b5863
Update OC package version.
sarahelsaig 3416279
Merge remote-tracking branch 'origin/dev' into issue/OSOE-795
sarahelsaig 547b55e
Update OC versions
sarahelsaig eadc295
Post merge and OC update fixup
sarahelsaig 5800d7b
Update OC to the latest preview.
sarahelsaig 0f74d1a
Rename variable.
sarahelsaig b3e7616
Replace strange leftover `var` with `const`.
sarahelsaig File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
75 changes: 42 additions & 33 deletions
75
Lombiq.HelpfulExtensions.Tests.UI/Constants/GeneratedMigrationCodes.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,48 @@ | ||
using System; | ||
using Shouldly; | ||
using System.Diagnostics.CodeAnalysis; | ||
|
||
namespace Lombiq.HelpfulExtensions.Tests.UI.Constants; | ||
|
||
internal static class GeneratedMigrationCodes | ||
{ | ||
// Environment.NewLine is used for this to work regardless of the mismatch of line ending style between the code | ||
// file, the platform where it was compiled, and where it was executed. | ||
public static string Page = | ||
string.Join( | ||
Environment.NewLine, | ||
"_contentDefinitionManager.AlterTypeDefinition(\"Page\", type => type", | ||
" .DisplayedAs(\"Page\")", | ||
" .Creatable()", | ||
" .Listable()", | ||
" .Draftable()", | ||
" .Versionable()", | ||
" .Securable()", | ||
" .WithPart(\"TitlePart\", part => part", | ||
" .WithPosition(\"0\")", | ||
" )", | ||
" .WithPart(\"AutoroutePart\", part => part", | ||
" .WithPosition(\"1\")", | ||
" .WithSettings(new AutoroutePartSettings", | ||
" {", | ||
" AllowCustomPath = true,", | ||
" ShowHomepageOption = true,", | ||
" Pattern = \"{{ Model.ContentItem | display_text | slugify }}\",", | ||
" })", | ||
" )", | ||
" .WithPart(\"FlowPart\", part => part", | ||
" .WithPosition(\"2\")", | ||
" )", | ||
" .WithPart(\"Page\", part => part", | ||
" .WithPosition(\"3\")", | ||
" )", | ||
");", | ||
string.Empty); | ||
[SuppressMessage( | ||
"Usage", | ||
"MA0136:Raw String contains an implicit end of line character", | ||
Justification = "It's wrapped to prevent issues related to that.")] | ||
private const string Page = | ||
""" | ||
_contentDefinitionManager.AlterTypeDefinition("Page", type => type | ||
.DisplayedAs("Page") | ||
.Creatable() | ||
.Listable() | ||
.Draftable() | ||
.Versionable() | ||
.Securable() | ||
.WithPart("TitlePart", part => part | ||
.WithPosition("0") | ||
) | ||
.WithPart("AutoroutePart", part => part | ||
.WithPosition("1") | ||
.WithSettings(new AutoroutePartSettings | ||
{ | ||
AllowCustomPath = true, | ||
Pattern = {{ Model.ContentItem | display_text | slugify }}, | ||
ShowHomepageOption = true, | ||
AllowUpdatePath = false, | ||
AllowDisabled = false, | ||
AllowRouteContainedItems = false, | ||
ManageContainedItemRoutes = false, | ||
AllowAbsolutePath = false, | ||
}) | ||
) | ||
.WithPart("FlowPart", part => part | ||
.WithPosition("2") | ||
) | ||
.WithPart("Page", part => part | ||
.WithPosition("3") | ||
) | ||
); | ||
"""; | ||
|
||
public static void ShouldBePage(string actual) => actual.ShouldBeByLine(Page); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 9 additions & 3 deletions
12
Lombiq.HelpfulExtensions/Extensions/Flows/FlowPartShapeTableProvider.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
using OrchardCore.DisplayManagement.Descriptors; | ||
using System.Threading.Tasks; | ||
|
||
namespace Lombiq.HelpfulExtensions.Extensions.Flows; | ||
|
||
internal sealed class FlowPartShapeTableProvider : IShapeTableProvider | ||
{ | ||
public void Discover(ShapeTableBuilder builder) => builder | ||
.Describe("FlowPart") | ||
.OnDisplaying(displaying => displaying.Shape.Metadata.Alternates.Add("Lombiq_HelpfulExtensions_Flows_FlowPart")); | ||
public ValueTask DiscoverAsync(ShapeTableBuilder builder) | ||
{ | ||
builder | ||
.Describe("FlowPart") | ||
.OnDisplaying(displaying => displaying.Shape.Metadata.Alternates.Add("Lombiq_HelpfulExtensions_Flows_FlowPart")); | ||
|
||
return ValueTask.CompletedTask; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.