Skip to content

Commit

Permalink
Clarify the 2.0 release notes (OrchardCMS#16814)
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeAlhayek authored Oct 1, 2024
1 parent 770e389 commit a88dea5
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions src/docs/releases/2.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,40 +289,40 @@ Here are the updated signatures:

These adjustments ensure compatibility and adherence to the latest conventions within the `DisplayDriver` class.

Additionally, we've enhanced display performance by streamlining the display drivers. To achieve this, the following methods have been marked as obsolete:
Additionally, we've enhanced display performance by optimizing the display drivers. The following methods have been marked as obsolete:

- `IDisplayResult Display(TModel model)`
- `IDisplayResult Edit(TModel model)`

and removed the following methods:
the following methods have been removed, with updated alternatives provided:

- `Task<IDisplayResult> DisplayAsync(TModel model, IUpdateModel updater)`
- `IDisplayResult Display(TModel model, IUpdateModel updater)`
- `Task<IDisplayResult> UpdateAsync(TModel model, IUpdateModel updater)`
- `Task<IDisplayResult> EditAsync(TModel model, IUpdateModel updater)`
- `IDisplayResult Edit(TModel model, IUpdateModel updater)`
- `Task<IDisplayResult> DisplayAsync(TModel model, IUpdateModel updater)` → Use `DisplayAsync(TModel model, BuildDisplayContext context)` where the `Updater` property is available via `context`.
- `IDisplayResult Display(TModel model, IUpdateModel updater)` → Use `Display(TModel model, BuildDisplayContext context)` where the `Updater` property is available via `context`.
- `Task<IDisplayResult> UpdateAsync(TModel model, IUpdateModel updater)` → Use `UpdateAsync(TModel model, UpdateEditorContext context)` where the `Updater` property is available via `context`.
- `Task<IDisplayResult> EditAsync(TModel model, IUpdateModel updater)` → Use `EditAsync(TModel model, BuildEditorContext context)` where the `Updater` property is available via `context`.
- `IDisplayResult Edit(TModel model, IUpdateModel updater)` → Use `Edit(TModel model, BuildEditorContext context)` where the `Updater` property is available via `context`.

At the same time, we've introduced the following static methods in the `DisplayDriverBase`:
In addition, we've introduced new static methods in the `DisplayDriverBase` class:

- `Task<IDisplayResult> CombineAsync(params IDisplayResult[] results)`
- `Task<IDisplayResult> CombineAsync(IEnumerable<IDisplayResult> results)`

Similar refactoring was done to `SectionDisplayDriver` class. The following methods have been marked as obsolete:
The same refactoring applies to the `SectionDisplayDriver` class. The following methods are now obsolete:

- `Display(TSection section, BuildDisplayContext context)`
- `Display(TSection section)`
- `Edit(TSection section, BuildEditorContext context)`
- `UpdateAsync(TSection section, UpdateEditorContext context)`
- `UpdateAsync(TSection section, IUpdateModel updater, string groupId)`

and removed the following methods:
And the following methods have been removed, with updated alternatives:

- `UpdateAsync(TModel model, TSection section, IUpdateModel updater, UpdateEditorContext context)`
- `UpdateAsync(TSection section, IUpdateModel updater, UpdateEditorContext context)`
- `UpdateAsync(TSection section, IUpdateModel updater, string groupId)`
- `UpdateAsync(TSection section, UpdateEditorContext context)`
- `EditAsync(TSection section, BuildEditorContext context)`
- `DisplayAsync(TSection section, BuildDisplayContext context)`
- `UpdateAsync(TModel model, TSection section, IUpdateModel updater, UpdateEditorContext context)` → Use `UpdateAsync(TModel model, TSection section, UpdateEditorContext context)` where the `Updater` is available via `context`.
- `UpdateAsync(TSection section, IUpdateModel updater, UpdateEditorContext context)` → Use `UpdateAsync(TModel model, TSection section, UpdateEditorContext context)` where the `Updater` is available via `context`.
- `UpdateAsync(TSection section, IUpdateModel updater, string groupId)` → Use `UpdateAsync(TModel model, TSection section, UpdateEditorContext context)` where the `Updater` and `GroupId` properties are available via `context`.
- `UpdateAsync(TSection section, UpdateEditorContext context)` → Use `UpdateAsync(TModel model, TSection section, UpdateEditorContext context)` where the `Updater` is available via `context`.
- `EditAsync(TSection section, BuildEditorContext context)` → Use `EditAsync(TModel model, TSection section, BuildEditorContext context)` where the `Updater` is available via `context`.
- `DisplayAsync(TSection section, BuildDisplayContext context)` → Use `DisplayAsync(TModel model, TSection section, BuildDisplayContext context)` where the `Updater` is available via `context`.

!!! note
To enhance your project's performance, address any warnings generated by the use of these obsolete methods. Please note that these methods will be removed in the next major release.
Expand Down

0 comments on commit a88dea5

Please sign in to comment.