Mark CompressedLayout API as obsolete and remove XML documentation#31052
Mark CompressedLayout API as obsolete and remove XML documentation#31052jfversluis merged 3 commits intonet10.0from
Conversation
Co-authored-by: PureWeen <5375137+PureWeen@users.noreply.github.com>
| <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.
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.
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 <5375137+PureWeen@users.noreply.github.com>
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
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.