-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Mark CompressedLayout API as obsolete and remove XML documentation #31052
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
Mark CompressedLayout API as obsolete and remove XML documentation #31052
Conversation
Co-authored-by: PureWeen <[email protected]>
| <Interfaces /> | ||
| <Docs> | ||
| <summary>Contains attached properties for omitting redundant renderers.</summary> | ||
| <summary>Contains attached properties for omitting redundant renderers. This API is obsolete and does not provide meaningful functionality.</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.
Review other places in the code where we have removed this xml files for our docs and just get this file removed @copilot
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've removed the CompressedLayout.xml documentation file entirely and replaced the XML include references in CompressedLayout.cs with direct XML documentation comments. This follows the standard practice for obsolete APIs that are being prepared for removal. The change is in commit ec15a24.
…es with direct comments Co-authored-by: PureWeen <[email protected]>
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
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.
Pull Request Overview
This PR marks the entire CompressedLayout API as obsolete to inform users it should not be used and may be removed in a future release. The API currently provides no meaningful functionality and needs deprecation.
Key changes:
- Added
[Obsolete]attributes to all public members of theCompressedLayoutclass - Replaced XML include references with direct XML documentation comments in the source code
- Removed the entire CompressedLayout.xml documentation file
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/Controls/src/Core/CompressedLayout.cs | Added obsolete attributes to class and all public members, replaced XML includes with inline documentation |
| src/Controls/docs/Microsoft.Maui.Controls/CompressedLayout.xml | Removed entire XML documentation file for obsolete API |
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
| /// <include file="../../docs/Microsoft.Maui.Controls/CompressedLayout.xml" path="//Member[@MemberName='SetIsHeadless']/Docs/*" /> | ||
| /// <summary>Turns layout compression on or off for the specified bindable object.</summary> | ||
| /// <param name="bindable">The <see cref="BindableObject" /> on which to enable or disable layout compression</param> | ||
| /// <param name="value">The new layout compression value. <see langword="true" /> to enable layout compression</param> |
Copilot
AI
Aug 14, 2025
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.
The parameter documentation is incomplete. It should specify what happens when the value is false, similar to the original XML documentation that mentioned both true and false cases.
| /// <param name="value">The new layout compression value. <see langword="true" /> to enable layout compression</param> | |
| /// <param name="value">The new layout compression value. <see langword="true" /> to enable layout compression; <see langword="false" /> to disable layout compression.</param> |
| /// <include file="../../docs/Microsoft.Maui.Controls/CompressedLayout.xml" path="//Member[@MemberName='GetHeadlessOffset']/Docs/*" /> | ||
| /// <summary>For internal use by the Microsoft.Maui.Controls platform.</summary> | ||
| /// <param name="bindable">For internal use by the Microsoft.Maui.Controls platform.</param> | ||
| /// <returns>For internal use by the Microsoft.Maui.Controls platform.</returns> |
Copilot
AI
Aug 14, 2025
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.
The return value documentation is not descriptive. It should specify that it returns a Point value representing the headless offset, even though this is an internal API.
| /// <returns>For internal use by the Microsoft.Maui.Controls platform.</returns> | |
| /// <returns>A <see cref="Point"/> value representing the headless offset for the specified <paramref name="bindable"/> object.</returns> |
|
🚨 API change(s) detected @davidbritch FYI |
|
🚨 API change(s) detected @davidortinau FYI |
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Summary
Marks the entire
CompressedLayoutAPI as obsolete to inform users that it should not be used and may be removed in a future release. This API currently does not perform any meaningful functionality and should be deprecated.Changes Made
API Changes
[Obsolete]attribute to theCompressedLayoutclass with a clear deprecation message[Obsolete]attributes to all public members:IsHeadlessPropertyfieldGetIsHeadlessmethodSetIsHeadlessmethodHeadlessOffsetPropertyfieldGetHeadlessOffsetmethodDocumentation Updates
Obsolete Message
All obsolete attributes use the message:
Impact
CompressedLayoutwill continue to functionTesting
SetHeadlessOffsetmethod was left unchanged as it's internal to the frameworkThis change provides a clear deprecation path for the
CompressedLayoutAPI while maintaining backward compatibility for existing code.💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.