Migrate to Order Levels#589
Draft
cihandeniz wants to merge 18 commits into
Draft
Conversation
10 tasks
- remove Order.At.Ux
- fix data container order - edit form sample override query method mark order
cihandeniz
commented
Jun 2, 2026
Comment on lines
+58
to
+68
| public Order WithBase(string @base) => Clone( | ||
| @base: @base | ||
| ); | ||
|
|
||
| public Order WithLevel(string level) => Clone( | ||
| level: level | ||
| ); | ||
|
|
||
| public Order WithExtension(string extension) => Clone( | ||
| extension: extension | ||
| ); |
| c.Type.IsAssignableTo(typeof(IParsable<>)) || | ||
| c.Type.IsAssignableTo(typeof(string)), | ||
| order: RestApiLayer.MinConventionOrder | ||
| order: Order.At.Defaults.AbsoluteMin // TODO consider using Order.At.Infra.Min |
| genericArgumentMetadata.Has<ApiInputAttribute>(), | ||
| attribute: () => new ApiInputAttribute(), | ||
| order: RestApiLayer.MinConventionOrder | ||
| order: Order.At.Defaults.AbsoluteMin // TODO consider using Order.At.Infra.Min |
Comment on lines
+15
to
+26
| public string DefaultConventionLevel { get; set; } = default!; | ||
|
|
||
| public class ConventionMatrixOptions | ||
| { | ||
| public IList<string> Bases { get; } = []; | ||
| public IList<string> Levels { get; } = []; | ||
| public IList<string> Extensions { get; } = []; | ||
|
|
||
| public Func<IDomainModelConvention, string> FallbackBase { get; set; } = default!; | ||
| public Func<IDomainModelConvention, string> FallbackLevel { get; set; } = default!; | ||
| public Func<IDomainModelConvention, string> FallbackExtension { get; set; } = default!; | ||
| } |
Member
There was a problem hiding this comment.
i did commit a solution for not using default!, it may require tests to be updated
Comment on lines
9
to
13
| _options.ConventionLevels | ||
| BuildLevels(_options.ConventionMatrix) | ||
| .Select((name, index) => (name, index)) | ||
| .ToDictionary(x => x.name, x => x.index) |
| dtc.Component.Data ??= Context.Parent(options: o => o.Prop = $"{rootProp}.{data.Prop}"); | ||
| }, | ||
| order: UiLayer.MaxConventionOrder - 10 | ||
| order: Order.At.Theme.Max // TODO Consider using Order.At.Ux |
Member
Author
There was a problem hiding this comment.
remove todo, ux base is canceled
| f.Component.Data ??= Context.Parent(options: cd => cd.Prop = $"data.{prop}"); | ||
| }, | ||
| order: UiLayer.MaxConventionOrder - 10 | ||
| order: Order.At.Theme.Max // TODO consider using Order.At.Ux |
Member
Author
There was a problem hiding this comment.
remove todo, ux level canceled
Comment on lines
+81
to
+82
| o.ConventionMatrix.Bases.Add("A"); | ||
| o.ConventionMatrix.Bases.Add("B"); |
Member
Author
There was a problem hiding this comment.
ConventionOrderMatrix 🤔
| [Test] | ||
| public void A_level_change_can_be_set_as_default_so_that_it_is_used_when_a_level_is_not_present() | ||
| { | ||
| true.ShouldBeFalse(); |
Member
Author
There was a problem hiding this comment.
:) use Assert.Fail() when this.ShouldFail() is not available
| @@ -1,5 +1,5 @@ | |||
| route-sample { | |||
| @controller-model locate-route="GET /coding-style/namespace-as-route/route-samples/{id}" | |||
| @controller-model locate-route="GET /route-samples/{id}" | |||
Member
Author
There was a problem hiding this comment.
fix api endpoint changes
- uncomment diagnostics in DomainModelConventionCollection - minor format edits
- remove todo notes
…ring - minor edits
- revert changes in DomianModelExtensions
- rename ConventionMatrix to ConventionOrderMatrix
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Refactor features to use new Level system.
Tasks
this should not be hardcoded
route-samples.kdlManagingOrdersandApplyingConventionstests fornew order design
TODOnotes and use suggested orders where possibleAdditional Task
ModelCollectionindex should set value to readonly list