[material_ui, cupertino_ui] Add #region to example files to remove license headers#12170
[material_ui, cupertino_ui] Add #region to example files to remove license headers#12170dkwingsmt wants to merge 6 commits into
#region to example files to remove license headers#12170Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces // #region body and // #endregion body tags to example files in both cupertino_ui and material_ui packages, and updates example references in cupertino_ui source files to target the #body region. Feedback indicates that several material_ui example files are missing the opening // #region body tag, and the corresponding material_ui library source files have not been updated to append #body to their example references.
|
Thanks for reviewing. Some of the files need extra treatment before this PR can be merged. For example, some files correspond to widgets defined in |
What do you mean? It is ok to have an example copied over from widgets/ for use in the API docs here. We just moved some of those samples over last week. |
|
@Piinks Most files mentioned above are not referenced in |
|
This PR is ready for another round of review. I have audited all example files to ensure every file belongs to one of the following types:
|
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request updates numerous example files across the cupertino_ui and material_ui packages to wrap code samples with // #region body and // #endregion body comments, while updating corresponding documentation references to target the #body suffix. However, several files in the material_ui package add the closing // #endregion body tag without the matching opening // #region body tag at the top of the file.
| ); | ||
| } | ||
| } | ||
| // #endregion body |
| ); | ||
| } | ||
| } | ||
| // #endregion body |
| r'(?<topLevelDomain>[a-zA-Z0-9]+)', | ||
| ).hasMatch(text); | ||
| } | ||
| // #endregion body |
| ); | ||
| } | ||
| } | ||
| // #endregion body |
There was a problem hiding this comment.
Code Review
This pull request updates example files across the cupertino_ui and material_ui packages to define code regions using // #region body and // #endregion body tags, while updating the source file documentation references to target these specific regions. Feedback indicates that several example files are missing the corresponding // #region body tag at the top of the file, despite having the // #endregion body tag added at the end.
| ); | ||
| } | ||
| } | ||
| // #endregion body |
| ); | ||
| } | ||
| } | ||
| // #endregion body |
| r'(?<topLevelDomain>[a-zA-Z0-9]+)', | ||
| ).hasMatch(text); | ||
| } | ||
| // #endregion body |
| ); | ||
| } | ||
| } | ||
| // #endregion body |
This PR adds
#regionto example files to remove the license headers.Before:
After:
Verification
I have audited all example files to ensure every file belongs to one of the following types:
material_uiorcupertino_ui: These have been updated in this PR to include the#regiontags.Pre-Review Checklist
[shared_preferences]///).If you need help, consider asking for advice on the #hackers-new channel on Discord.
Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the
gemini-code-assistbot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2