Skip to content

Commit

Permalink
Improved Documentation Readability (#26982)
Browse files Browse the repository at this point in the history
Updated the project documentation to enhance its readability by correcting grammatical errors, and rephrasing a couple of unclear sentences. These changes aim to make the documentation clearer for all users and contributors.
  • Loading branch information
vhugogarcia authored Jan 9, 2025
1 parent 5e77ff6 commit 78ca201
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 51 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

## Overview

.NET Multi-platform App UI (.NET MAUI) is the evolution of Xamarin.Forms that expands capabilities beyond mobile Android and iOS into desktop apps for Windows and macOS. With .NET MAUI, you can build apps that perform great for any device that runs Windows, macOS, Android, & iOS from a single codebase. Coupled with Visual Studio productivity tools and emulators, .NET and Visual Studio significantly speed up the development process for building apps that target the widest possible set of devices. Use a single development stack that supports the best of breed solutions for all modern workloads with a unified SDK, base class libraries, and toolchain. [Read More](https://docs.microsoft.com/dotnet/maui/what-is-maui)
.NET Multi-platform App UI (.NET MAUI) is the evolution of Xamarin.Forms that expand capabilities beyond mobile Android and iOS into desktop apps for Windows and macOS. With .NET MAUI, you can build apps that perform great on any device that runs Windows, macOS, Android, & iOS from a single codebase. Coupled with Visual Studio productivity tools and emulators, .NET and Visual Studio significantly speed up the development process for building apps that target the widest possible set of devices. Use a single development stack that supports the best-of-breed solutions for all modern workloads with a unified SDK, base class libraries, and a toolchain. [Read More](https://docs.microsoft.com/dotnet/maui/what-is-maui)

![.NET MAUI Weather App on all platforms](Assets/maui-weather-hero-sm.png)

Expand All @@ -26,7 +26,7 @@ Follow the [.NET MAUI Blog](https://devblogs.microsoft.com/dotnet/category/net-m

## FAQs

Do you have questions? Do not worry, we have prepared a complete [FAQ](https://github.com/dotnet/maui/wiki/FAQs) answering the most common questions.
Do you have questions? Do not worry; we have prepared a complete [FAQ](https://github.com/dotnet/maui/wiki/FAQs) answering the most common questions.

## How to Engage, Contribute, and Give Feedback

Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ You should receive a response within 24 hours. If for some reason you do not, pl

Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:

* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
* Type of issue (e.g., buffer overflow, SQL injection, cross-site scripting, etc.)
* Full paths of source file(s) related to the manifestation of the issue
* The location of the affected source code (tag/branch/commit or direct URL)
* Any special configuration required to reproduce the issue
Expand Down
26 changes: 13 additions & 13 deletions docs/CodeDocumentationGuidelines.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
# Code Documentation Guidelines

In this document you will find the guidelines for adding XML comments to our codebase. By adding consistent and well-formatted comments to our code we benefit on all fronts: the online API docs are a useful reference for people looking up our APIs, the IntelliSense inside of Visual Studio will help developers understand our product better, and contributors and maintainers of this repository will have all the documentation at hand.
In this document you will find the guidelines for adding XML comments to our codebase. By adding consistent and well-formatted comments to our code, we benefit on all fronts: the online API docs are a useful reference for people looking up our APIs, the IntelliSense inside of Visual Studio will help developers understand our product better, and contributors and maintainers of this repository will have all the documentation at hand.

## Guidelines

For what kind of comments to our code we mainly follow the [recommended XML tags documentation](https://learn.microsoft.com/dotnet/csharp/language-reference/xmldoc/recommended-tags) by Microsoft. This is also what is best supported by Visual Studio. As a rule of thumb: complete your code first and just start typing a triple slash (`///`) above your code. That will suggest all the attributes that we want to see. Which attributes will show up is inferred from your code.
For comments on our code, we primarily follow the [recommended XML tags documentation](https://learn.microsoft.com/dotnet/csharp/language-reference/xmldoc/recommended-tags) by Microsoft. These tags are also best supported by Visual Studio. As a rule of thumb, complete your code first and just start typing a triple slash (`///`) above your code. This will suggest all the attributes we expect to see. The attributes that appear are inferred from your code.

If you're unsure about how to document a certain element, have a look the [.NET API docs wiki](https://github.com/dotnet/dotnet-api-docs/wiki) which has a very extensive description on what kind of comment to add on which element in the code. We would highly recommend going through that and applying the same style of comments everywhere.
If you're unsure about how to document a certain element, have a look at the [.NET API docs wiki](https://github.com/dotnet/dotnet-api-docs/wiki) which has a very extensive description of what kind of comment to add on which element in the code. We would highly recommend going through that and applying the same style of comments everywhere.

These are the tags that we would like to see when applicable: `<summary>`, `<remarks>`, `<returns>`, `<param>`, `<exception>`, `<inheritdoc>`, `<see>`, `<c>`.

* All public members should have at the very least a `<summary>`
* Add "This is a bindable property." to the end of the summary of the regular C# properties that are bindable properties.
* Keep the descriptions short and concise
* 1-2 lines typically, no screenshots or long code-blocks (those belong in the conceptual docs)
* 1-2 lines typically, no screenshots or long code blocks (those belong in the conceptual docs)
* Make sure the spelling is correct
* Add the descriptions at the highest base class/interface level. On an implementing type add `<inheritdoc/>` on each member
* If the implemented member differs too much you can choose to override the comments; typically this shouldn't be necessary
* Add the descriptions at the highest base class/interface level. On an implementing type, add `<inheritdoc/>` on each member
* If the implemented member differs too much, you can choose to override the comments; typically this shouldn't be necessary
* When adding `<inheritdoc/>` on a class where you want to inherit the comments from an interface, you will have to be explicit about which interface to inherit from. Even if the class only implements one interface. For example: `<inheritdoc cref="IEntry"/>` will inherit the comments from the `IEntry` interface.
* Do **not** add `<inheritdoc/>` to overridden members, this will potentially cause issues in the online API docs system and doesn't add any value. The documentation is inherited implicitly.
* Where applicable make references to other types and parameters with the appropriate tags (`<see cref="YourType"/>` and `<paramref name="parameterName"/>` respectively). This will create links in IntelliSense and online API docs
* Reference all C# keywords with a `<see langword="keyword"/>` tag. For example for `true`: `<see langword="true"/>`
* If you do want to add a minimal amount of code in your comment, use the `<c></c>` tags which formats it as code
* Do **not** add `<inheritdoc/>` to overridden members; this will potentially cause issues in the online API docs system and doesn't add any value. The documentation is inherited implicitly.
* Where applicable, make references to other types and parameters with the appropriate tags (`<see cref="YourType"/>` and `<paramref name="parameterName"/>` respectively). This will create links in IntelliSense and online API docs
* Reference all C# keywords with a `<see langword="keyword"/>` tag. For example, for `true`: `<see langword="true"/>`
* If you do want to add a minimal amount of code in your comment, use the `<c></c>` tags, which format it as code
* Think of things you'd like to know as a developer/future-you maintainer:
* default values that are not obvious
* in which scale a value should be (seconds or milliseconds, 0.0 is nothing 1.0 is everything)
* what exceptions can you expect and what triggers them
* what exceptions can you expect, and what triggers them?

If you are looking for examples, browse through the codebase, searching for the `<summary>` tag or `///` should give you all kinds of examples.
If you are looking for examples, browsing through the codebase, searching for the `<summary>` tag or `///` should give you all kinds of examples.

## "Testing" the documentation

You can "test" the docs by simply hovering over the type in Visual Studio. The IntelliSense updates should be instantaneous when you have edited something. See image below for an example.
You can "test" the docs by simply hovering over the type in Visual Studio. The IntelliSense updates should be instantaneous when you have edited something. See the image below for an example.

![Partial screenshot of the Visual Studio text editor showing comments being edited and changes immediately showing up in the tooltip of the relevant type.](assets/EditingDocumentationVisualStudio.png)
24 changes: 12 additions & 12 deletions docs/DevelopmentTips.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
### Reproducing an Issue/Debugging .NET MAUI Code
Open the .NET MAUI [workspace](https://code.visualstudio.com/docs/editor/workspaces) in VS Code by simply opening the root of your locally cloned .NET MAUI repository folder. VS Code will detect the workspace automatically and suggest that you open it.

In VS Code, select the device that you will be testing on. Using the Command Palette (<kbd>CTRL</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> or on macOS <kbd>Command</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd>) type `pick device` and you will be presented with a set of choices for your target device (Android, iOS, etc). First select the option that describes the platform you want to run the project on, and then select the device that is available for that platform in the next menu.
In VS Code, select the device that you will be testing on. Using the Command Palette (<kbd>CTRL</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> or on macOS <kbd>Command</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd>) type `pick device` and you will be presented with a set of choices for your target device (Android, iOS, etc.). First select the option that describes the platform you want to run the project on, and then select the device that is available for that platform in the next menu.

![VS Code Command Palette to pick a target device](https://github.com/dotnet/maui/assets/939291/d008102f-0295-4034-a60a-8c2b58f86641)

There is a sample project in `src/Controls/samples/Controls.Sample.Sandbox`. This is an empty project, which directly references the .NET MAUI code. In this project you can add your code to reproduce an issue while allowing you to set breakpoints in .NET MAUI source code and debug through it easily.

To let VS Code know this is the project you want run, select the Sandbox project by going to the Command Palette (<kbd>CTRL</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> or on macOS <kbd>Command</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd>) and start typing `pick startup` and select ".NET MAUI: Pick Startup Project" and then select the Sandbox project.
To let VS Code know this is the project you want to run, select the Sandbox project by going to the Command Palette (<kbd>CTRL</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> or on macOS <kbd>Command</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd>) and start typing `pick startup` and select ".NET MAUI: Pick Startup Project" and then select the Sandbox project.

![VS Code Command Palette to pick the startup project](https://github.com/dotnet/maui/assets/939291/eae00559-4811-4034-95ae-b6fd1ea6d1b7)

Expand Down Expand Up @@ -67,7 +67,7 @@ dotnet cake --target=VSCode

#### Testing branch against your project
`--sln=<Path to SLN>`
- This will pack .NET and then open a VS instance using the local pack. This is useful if you want to check to see if the changes in a branch will address your particular issues. Pack only runs the first time so you will need to explicitly add the `--pack` flag if you make changes and need to repack.
- This will pack .NET and then open a VS instance using the local pack. This is useful if you want to check to see if the changes in a branch will address your particular issues. Pack only runs the first time, so you will need to explicitly add the `--pack` flag if you make changes and need to repack.

```dotnetcli
dotnet tool restore
Expand All @@ -83,7 +83,7 @@ dotnet tool restore
dotnet cake --target=VS --pack --sln="<download_directory>\MauiApp2\MauiApp2.sln"
```

Create new .NET MAUI app using your new packs
Create a new .NET MAUI app using your new packs
```dotnetcli
dotnet tool restore
dotnet cake --pack
Expand Down Expand Up @@ -120,8 +120,8 @@ You will see the following prompt.
Waiting for debugger to attach (dotnet PID 13001). Press enter to continue...
```

You can then use VS or VSCode to attach to this process and debug you tasks.
You can start your test app with the `dotnet-local` script (so it uses your maui build)
You can then use VS or VSCode to attach to this process and debug your tasks.
You can start your test app with the `dotnet-local` script (so it uses your MAUI build).

### [MacOS](#tab/macos)

Expand All @@ -146,26 +146,26 @@ set MSBUILDDEBUGONSTART=2

Note: the `-m:1` is important as it restricts MSBuild to 1 node.

Once MSBuild starts it will print the following
Once MSBuild starts, it will print the following

```dotnetcli
Waiting for debugger to attach (dotnet PID xxxx). Press enter to continue...
```

You need to copy the PID value so we can use this in the IDE. For Visual Studio you can use the `Attach to Process` menu option, while you have the Microsoft.Maui.sln solution open. For VSCode open the workspace then use the `Attach to Process` Run and Debug option. You will be prompted for the PID and it will then connect.
You need to copy the PID value so we can use this in the IDE. For Visual Studio, you can use the `Attach to Process` menu option while you have the Microsoft.Maui.sln solution open. For VSCode, open the workspace, then use the `Attach to Process` Run and Debug option. You will be prompted for the PID and it will then connect.

Once connected go back to your command prompt and press ENTER so that the MSBuild process can continue.
Once connected, go back to your command prompt and press ENTER so that the MSBuild process can continue.

You will be able to set breakpoints in Tasks (but not Targets) and step through code from this point on.

If you want to test in-tree in VSCode the `Build Platform Sample` command will ask you if you want to debug MSBuild tasks and fill in the `MSBUILDDEBUGONSTART` for you. The PID text will appear in the `Terminal` window in VSCode. You can then use the `Attach to Process` Run and Debug option to attach to the process.
If you want to test in-tree in VSCode, the `Build Platform Sample` command will ask you if you want to debug MSBuild tasks and fill in the `MSBUILDDEBUGONSTART` for you. The PID text will appear in the `Terminal` window in VSCode. You can then use the `Attach to Process` Run and Debug option to attach to the process.


### Integration Tests

The Integration test project under `src/TestUtils/src/Microsoft.Maui.IntegrationTests` contains tests which build and/or run MAUI templates or other projects.
The Integration test project under `src/TestUtils/src/Microsoft.Maui.IntegrationTests` contains tests that build and/or run MAUI templates or other projects.

These tests can be ran using the test explorer in VS, or from command line with `dotnet test`. Here's how to run an individual test with parameters from command line:
These tests can be run using the Test Explorer in VS, or from the command line with `dotnet test`. Here's how to run an individual test with parameters from command line:

```bash
dotnet test src/TestUtils/src/Microsoft.Maui.IntegrationTests --logger "console;verbosity=diagnostic" --filter "Name=Build\(%22maui%22,%22net7.0%22,%22Debug%22,False\)"
Expand Down
8 changes: 4 additions & 4 deletions docs/IssueManagementPolicies.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ In general, we recommend you open a new issue if you have a bug, feature request

If a contributor reviews an issue and determines that more information is needed from the author, they will post a comment requesting that information and apply the `s/needs-info` label. This label indicates that the author needs to post a response in order for us to continue investigating the issue.

If the author does not post a response within **7 days**, the issue will be automatically closed. If the author responds within **7 days** after the issue is closed, the issue will be automatically re-opened. We recognize that you may not be able to respond immediately to our requests, we're happy to hear from you whenever you're able to provide the new information.
If the author does not post a response within **7 days**, the issue will be automatically closed. If the author responds within **7 days** after the issue is closed, the issue will be automatically re-opened. We recognize that you may not be able to respond immediately to our requests; we're happy to hear from you whenever you're able to provide the new information.

### PR: pending author input
Similar to the `Needs Author Feedback` process above, PRs also require author input from time to time. When a member of our team asks for some follow-up changes from the author, we mark these PRs with `s/pr-needs-author-input` label. After doing so, we expect the author to respond within 14 days.
Similar to the `Needs Author Feedback` process above, PRs also require author input from time to time. When a member of our team asks for some follow-up changes from the author, we mark these PRs with the `s/pr-needs-author-input` label. After doing so, we expect the author to respond within 14 days.
If the author does not post a response or updates the PR within **14 days**, the PR will be automatically closed. If the author responds within **7 days** after the PR is closed, the PR will be automatically re-opened. We recognize that you may not be able to respond immediately to our requests, we're happy to hear from you whenever you're able to provide the new information.

## Duplicate issues

If we determine that the issue is a duplicate of another, we will close the issue and comment with the issue we believe is a duplicate one. Note that we might close an issue as duplicate which is not the one that has been reported the earliest. We might close an issue that has been reported earlier because the later issue has more relevant information and/or discussion.
If we determine that the issue is a duplicate of another, we will close the issue and comment with the issue we believe is the duplicate one. Note that we might close an issue as duplicate which is not the one that has been reported the earliest. We might close an issue that has been reported earlier because the later issue has more relevant information and/or discussion.

## Locking closed issues

After an issue has been closed and had no activity for **30 days** it will be automatically locked as *resolved*. This is done in order to reduce confusion as to where to post new comments. If you are still encountering the problem reported in an issue, or have a related question or bug report, feel free to open a *new issue* and link to the original (now locked) issue!
After an issue has been closed and had no activity for **30 days** it will be automatically locked as *resolved*. This is done in order to reduce confusion as to where to post new comments. If you are still encountering the problem reported in an issue or have a related question or bug report, feel free to open a *new issue* and link to the original (now locked) issue!
Loading

0 comments on commit 78ca201

Please sign in to comment.