-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Add ViewHandler & IViewHandler docs #17167
Conversation
public interface IViewHandler : IElementHandler | ||
{ | ||
/// <summary> | ||
/// Gets or sets whether the <see cref="IElementHandler.PlatformView"/> has a view that it is contained in. | ||
/// </summary> | ||
bool HasContainer { get; set; } |
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.
Should we add a remark on when this is applicable? What should the consuming developer know about this?
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.
What controls don't have a container? If the list is small we can just add a small remark saying something like "X, Y, and Z will never have a container"
public abstract partial class ViewHandler : ElementHandler, IViewHandler | ||
{ | ||
/// <summary> | ||
/// A dictionary that maps the virtual view properties to their platform view counterparts. | ||
/// </summary> |
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.
I feel we can add a little more explanation for this, especially since it's one of the key concepts of the architecture, but no inspiration currently.
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.
I second this idea. Not very familiar with the property mapper so we might need someone more knowledgeable to help us out 😅
object? ContainerView { get; } | ||
|
||
/// <summary> | ||
/// Gets the virtual view (.NET MAUI layer) that is managed by this handler. |
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.
I think its ok to not include "(.NET MAUI layer)" since a fair amount of the existing docs already just say "virtual view .... ".
Maybe we can add it here as a remark though, since this is the base class for most handlers.
This comment pertains to similar places in this PR too. At the same time, I do like that it specifies that this is the MAUI layer and wish that the other existing comments were like that 😵. I'll leave this up to you!
public abstract partial class ViewHandler : ElementHandler, IViewHandler | ||
{ | ||
/// <summary> | ||
/// A dictionary that maps the virtual view properties to their platform view counterparts. | ||
/// </summary> |
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.
I second this idea. Not very familiar with the property mapper so we might need someone more knowledgeable to help us out 😅
new IView? VirtualView { get; } | ||
|
||
/// <summary> | ||
/// Computes the actual size of a view based on the desired size and constraints. |
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.
Maybe specify that this is the on-screen size? Perhaps as a remark.
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
Hi @jfversluis. We have added the "s/pr-needs-author-input" label to this issue, which indicates that we have an open question/action for you before we can take further action. This PRwill be closed automatically in 14 days if we do not hear back from you by then - please feel free to re-open it if you come back to this PR after that time. |
Co-authored-by: Juan Diego Herrera <[email protected]>
516cf44
to
780d9d8
Compare
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.
I still think there are a couple of items that need to be addressed on this PR, but nothing major enough to prolong the merge.
/backport to net8.0 |
Started backporting to net8.0: https://github.com/dotnet/maui/actions/runs/6631838768 |
/backport to release/8.0.1xx-rc2.2 |
Started backporting to release/8.0.1xx-rc2.2: https://github.com/dotnet/maui/actions/runs/6631841147 |
@PureWeen backporting to net8.0 failed, the patch most likely resulted in conflicts: $ git am --3way --ignore-whitespace --keep-non-patch changes.patch
Applying: Add ViewHandler & IViewHandler inline docs
.git/rebase-apply/patch:35: trailing whitespace.
/// Computes the actual size of a view based on the desired size and constraints.
.git/rebase-apply/patch:117: trailing whitespace.
///
.git/rebase-apply/patch:123: trailing whitespace.
///
.git/rebase-apply/patch:129: trailing whitespace.
/// Gets the
warning: 4 lines add whitespace errors.
Using index info to reconstruct a base tree...
M src/Core/src/Handlers/IViewHandler.cs
M src/Core/src/Handlers/View/ViewHandler.cs
Falling back to patching base and 3-way merge...
Auto-merging src/Core/src/Handlers/View/ViewHandler.cs
CONFLICT (content): Merge conflict in src/Core/src/Handlers/View/ViewHandler.cs
Auto-merging src/Core/src/Handlers/IViewHandler.cs
CONFLICT (content): Merge conflict in src/Core/src/Handlers/IViewHandler.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Add ViewHandler & IViewHandler inline docs
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128 Please backport manually! |
@PureWeen an error occurred while backporting to net8.0, please check the run log for details! Error: git am failed, most likely due to a merge conflict. |
@PureWeen backporting to release/8.0.1xx-rc2.2 failed, the patch most likely resulted in conflicts: $ git am --3way --ignore-whitespace --keep-non-patch changes.patch
Applying: Add ViewHandler & IViewHandler inline docs
.git/rebase-apply/patch:35: trailing whitespace.
/// Computes the actual size of a view based on the desired size and constraints.
.git/rebase-apply/patch:117: trailing whitespace.
///
.git/rebase-apply/patch:123: trailing whitespace.
///
.git/rebase-apply/patch:129: trailing whitespace.
/// Gets the
warning: 4 lines add whitespace errors.
Using index info to reconstruct a base tree...
M src/Core/src/Handlers/IViewHandler.cs
M src/Core/src/Handlers/View/ViewHandler.cs
Falling back to patching base and 3-way merge...
Auto-merging src/Core/src/Handlers/View/ViewHandler.cs
CONFLICT (content): Merge conflict in src/Core/src/Handlers/View/ViewHandler.cs
Auto-merging src/Core/src/Handlers/IViewHandler.cs
CONFLICT (content): Merge conflict in src/Core/src/Handlers/IViewHandler.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Add ViewHandler & IViewHandler inline docs
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128 Please backport manually! |
@PureWeen an error occurred while backporting to release/8.0.1xx-rc2.2, please check the run log for details! Error: git am failed, most likely due to a merge conflict. |
Description of Change
Adds inline API docs
Issues Fixed
Related to #3960