Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Updated comments and parameters to reflect Microsoft documentation. #4963

Closed
wants to merge 2 commits into from

Conversation

AuriR
Copy link

@AuriR AuriR commented Jan 11, 2019

https://docs.microsoft.com/en-us/dotnet/api/xamarin.forms.grid.igridlist-1?view=xamarin-forms

Description of Change

Short description: The parameters used when adding child Views to a Grid/IGridList are misleading, causing developer confusion.

Long description: The IGridList interface and implementation in Grid appear to have invalid parameter names. Where column and row should be, top and right are used. This is confusing to the developer. The documentation doesn't assist - it simply has Int32 in place of variable names. I've corrected these variable names as clearly as I can, and added what I feel is appropriate documentation comments for Intellisense. These are "best guess", as there is no documentation about what they definitely should be, and I don't know who to ask for verification. :)

See docs: https://docs.microsoft.com/en-us/dotnet/api/xamarin.forms.grid.igridlist-1?view=xamarin-forms

I feel the Microsoft documentation page should also be updated.

Issues Resolved

  • fixes #
    No real code changes, only parameter names, and an update to the exceptions to reflect those parameter name changes.

API Changes

None

Platforms Affected

  • Core/XAML (all platforms)

Behavioral/Visual Changes

None

Before/After Screenshots

Not applicable

Testing Procedure

When attempting to add children to a Grid programatically, not via XAML, the Parameter List and Intellisense should now be accurate.

PR Checklist

  • Has automated tests - Neither added nor removed tests, as no new code was added, and I didn't see tests for this functionality.
  • Rebased on top of the target branch at time of PR
  • Changes adhere to coding standard - I believe so. Why are there so few comments? :)

@dnfclas
Copy link

dnfclas commented Jan 11, 2019

CLA assistant check
All CLA requirements met.

Copy link
Member

@StephaneDelcroix StephaneDelcroix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the right thing to do here would be to drop the out of sync comment, not to update it

@AuriR
Copy link
Author

AuriR commented Jan 11, 2019

License agreement signed, @StephaneDelcroix - thanks for letting me know about that!

@AuriR
Copy link
Author

AuriR commented Jan 11, 2019

I didn't correct existing comments, @StephaneDelcroix - they were the ones I added. I had the word "List" in there, when it should have been "Grid". Why would I drop the comments?

@samhouts samhouts added the e/2 🕑 2 label Jan 11, 2019
Copy link
Author

@AuriR AuriR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments on the review: I didn't correct existing comments - they were the ones I added. I had the word "List" in there, when it should have been "Grid". Why would I drop the comments?

@StephaneDelcroix
Copy link
Member

I only reviewed a single commit. changing my review

Copy link
Member

@StephaneDelcroix StephaneDelcroix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AuriR
Copy link
Author

AuriR commented Jan 14, 2019

Ahh, I didn't realize that. Is that in the coding spec? And, so I'm clear, you want me to delete the comments altogether?

The reason I created the PR was because the parameter names are misleading. They're not about left, right, top, and bottom. They're about row, column, and spans. Am I wrong about that?

If the PR is approved, I'll go through the process to update the documentation. Right now, it's effectively in sync with the code.

@StephaneDelcroix
Copy link
Member

They're not about left, right, top, and bottom. They're about row, column, and spans.

both concepts are equivalent, given a little transformation. l,r,t,p indicates the position in which the item anchors itself in the grid

@AuriR
Copy link
Author

AuriR commented Jan 15, 2019

I hear you. Still, I disagree. The two parameter signature doesn't follow that logic, or at least I feel it doesn't clearly do so. Does this mean the PR is rejected? Just want to be clear :) Thanks!

@StephaneDelcroix
Copy link
Member

y, the PR is rejected. we think the arguments are good as-is. You're more than welcome to send a PR to enhance the docs

@AuriR
Copy link
Author

AuriR commented Jan 15, 2019

Gotcha, thanks for the heads up. Bummer - I still don't see how left, top, right and bottom make sense. I'll work on the PR for the docs - maybe I can shore those up for clarity. Do you feel that's worthwhile before I do the work? I don't want to change it if the team thinks it's fine as-is.

@uvirra
Copy link

uvirra commented Feb 1, 2019

I agree with @AuriR to rename the parameters to Column, ColumnSpan, Row and RowSpan. The left, top, right and bottom is not intuitive.
I really hope this request can be reconsidered. As a beginner to Xamarin, it is really frustrating trying to understand how this supposed simple thing supposed to work. It's an unnecessary learning curve for beginners. I had used WPF Grid, and it is more intuitive.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants