Skip to content
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

Merged
merged 3 commits into from
Sep 28, 2023
Merged

Add ViewHandler & IViewHandler docs #17167

merged 3 commits into from
Sep 28, 2023

Conversation

jfversluis
Copy link
Member

Description of Change

Adds inline API docs

Issues Fixed

Related to #3960

@jfversluis jfversluis added area-docs Conceptual docs, API docs, Samples t/housekeeping ♻︎ labels Sep 1, 2023
@jfversluis jfversluis added this to the .NET 8 GA milestone Sep 1, 2023
@jfversluis jfversluis requested a review from jknaudt21 September 1, 2023 12:32
@jfversluis jfversluis requested a review from a team as a code owner September 1, 2023 12:32
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; }
Copy link
Member Author

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?

Copy link
Contributor

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>
Copy link
Member Author

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.

Copy link
Contributor

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 😅

src/Core/src/Handlers/IViewHandler.cs Outdated Show resolved Hide resolved
object? ContainerView { get; }

/// <summary>
/// Gets the virtual view (.NET MAUI layer) that is managed by this handler.
Copy link
Contributor

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>
Copy link
Contributor

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 😅

src/Core/src/Handlers/View/ViewHandler.cs Outdated Show resolved Hide resolved
src/Core/src/Handlers/View/ViewHandler.cs Outdated Show resolved Hide resolved
src/Core/src/Handlers/IViewHandler.cs Outdated Show resolved Hide resolved
new IView? VirtualView { get; }

/// <summary>
/// Computes the actual size of a view based on the desired size and constraints.
Copy link
Contributor

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.

@jsuarezruiz
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@samhouts samhouts added the s/pr-needs-author-input PR needs an update from the author label Sep 11, 2023
@ghost
Copy link

ghost commented Sep 11, 2023

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.

@samhouts samhouts modified the milestones: .NET 8 GA, Under Consideration Sep 19, 2023
Copy link
Contributor

@jknaudt21 jknaudt21 left a 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.

@jfversluis jfversluis merged commit 6326bf7 into main Sep 28, 2023
47 checks passed
@jfversluis jfversluis deleted the add-viewhandler-docs branch September 28, 2023 13:01
@PureWeen
Copy link
Member

/backport to net8.0

@github-actions
Copy link
Contributor

Started backporting to net8.0: https://github.com/dotnet/maui/actions/runs/6631838768

@PureWeen
Copy link
Member

/backport to release/8.0.1xx-rc2.2

@github-actions
Copy link
Contributor

Started backporting to release/8.0.1xx-rc2.2: https://github.com/dotnet/maui/actions/runs/6631841147

@github-actions
Copy link
Contributor

@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!

@github-actions
Copy link
Contributor

@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.

@github-actions
Copy link
Contributor

@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!

@github-actions
Copy link
Contributor

@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.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 6, 2023
@samhouts samhouts removed this from the Under Consideration milestone Jul 1, 2024
@samhouts samhouts added the fixed-in-8.0.0-rc.2.9511 Look for this fix in 8.0.0-rc.2.9511 label Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-docs Conceptual docs, API docs, Samples fixed-in-8.0.0-rc.2.9511 Look for this fix in 8.0.0-rc.2.9511 s/pr-needs-author-input PR needs an update from the author t/housekeeping ♻︎
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants