Repository navigation
[dev-v5] Add GitHup Copilot Chat custom instructions #3206
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
Merged
Denis Voituron (dvoituron)
merged 19 commits into
microsoft:dev-v5
from
AClerbois:users/aclerbois/dev-v5/migration-via-gh
Jan 21, 2025
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
3cb9e1d
Add section in MigrationGeneral.md
AClerbois c81e187
And how to add instructions
AClerbois 5ec23a1
Add instructions for enabling custom instructions in Visual Studio anβ¦
AClerbois ef234de
Add base file and include the first step with FluentButton
AClerbois 5125c0a
Update CopilotInstructionsContent.md to reflect property renaming forβ¦
AClerbois 3d10531
Update CopilotInstructionsContent.md to include changes for FluentLabβ¦
AClerbois a40bf6b
Update CopilotInstructionsContent.md to document migration steps for β¦
AClerbois 543e55a
Fix typo and inject the file into the right markdown container
AClerbois 5dde3d6
Changed base on the improvement request by @dvoituron
AClerbois 9ce43ce
Change the file name to follow the current convention
AClerbois ebfc299
Update CopilotInstructionsContent.md to add usage instructions for cuβ¦
AClerbois e53bfef
Fix grammatical error in CopilotInstructionsContent.md for clarity
AClerbois 5e62c46
Refactor Copilot instructions in documentation for clarity and consisβ¦
AClerbois 69fddbe
Remove outdated Copilot migration instructions and update documentatiβ¦
AClerbois 030308e
Update Copilot instructions and remove outdated file references for Fβ¦
AClerbois 86a25ba
Remove outdated Copilot instructions from project file
AClerbois ecdb10b
Update Copilot instructions for clarity and consistency in migration β¦
AClerbois 0776c4a
Update Copilot instructions for FluentGridItem and FluentLabel componβ¦
AClerbois b0d29e8
Update Copilot instructions for FluentButton property value changes
AClerbois File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
...UI.Demo.Client/Documentation/GetStarted/Migration/CopilotInstructionsContent.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| --- | ||
| title: GitHub Copilot custom instructions | ||
| route: /Migration/gh-copilot-custom-instructions | ||
| hidden: true | ||
| --- | ||
|
|
||
| To streamline your migration process, we provide custom instructions for GitHub Copilot in the `copilot-instructions.md` file. These instructions help Copilot understand our codebase conventions, naming patterns, and migration requirements. | ||
|
|
||
| By importing these custom instructions into your GitHub Copilot settings, you'll get more accurate and context-aware suggestions specifically tailored to FluentUI Blazor migration tasks. | ||
|
|
||
| Example benefits: | ||
| - Migrate complete file following new namespacing and new parameters | ||
| - Renaming old names from v3-v4 to v5 | ||
|
|
||
| > β οΈ Note | ||
| > | ||
| > - This feature is currently in public preview and is subject to change. | ||
| > - Custom instructions are currently only supported for **Copilot Chat** in **VS Code** and **Visual Studio**. | ||
|
|
||
| The complete documentation is available here [Adding custom instructions for GitHub Copilot](https://docs.github.com/en/copilot/customizing-copilot/adding-custom-instructions-for-github-copilot) | ||
|
|
||
| Once your migration is done, you can remove the file or the part of the FluentUI migration. | ||
|
|
||
| ### How to enable custom instruction | ||
|
|
||
| 1. In the root of your repository, create a file named `.github/copilot-instructions.md`. | ||
| Create the `.github` directory if it does not already exist. | ||
|
|
||
| 2. Click on the following link to view and copy the content of this **migration instruction** | ||
| inside the `copilot-instructions.md` file. | ||
|
|
||
| π₯ <a href="/copilot-instructions.md" target="_blank">copilot-instructions.md</a> | ||
|
|
||
| 3. In your existing project, after adding the new FluentUI-Blazor v5, | ||
| you can start using the custom instructions to help you migrate your code. | ||
|
|
||
| Example of Copilot instructions: "Can you migrate this file to the new FluentUI-Blazor v5? | ||
|
|
||
| ### Enable custom instruction in Visual Studio or Visual Studio Code. | ||
|
|
||
| GitHub's team has a perfect step-by-step void to enable : [Enabling or disabling custom instructions](https://docs.github.com/en/copilot/customizing-copilot/adding-custom-instructions-for-github-copilot#enabling-or-disabling-custom-instructions). | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
74 changes: 74 additions & 0 deletions
74
examples/Demo/FluentUI.Demo.Client/wwwroot/copilot-instructions.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| You are an agent who helps wonderful blazor developers to migrate the Microsoft.FluentUI Blazor in versions V3 and V4 to the V5. | ||
|
AClerbois marked this conversation as resolved.
Resolved
|
||
|
|
||
| You have access to a list of all manual migrations that a developer must do to migrate to the new version and this is covered by a component section. | ||
|
|
||
| # FluentButton component | ||
|
|
||
| The following properties of the FluentButton have been renamed : | ||
| - `Action` to `FormAction` | ||
| - `Enctype` to `FormEncType` | ||
| - `Method` to `FormMethod` | ||
| - `NoValidate` to `FormNoValidate` | ||
| - `Target` to `FormTarget` | ||
|
|
||
| Special attention is required for the Appearance property. | ||
| This is only valid for FluentButton. | ||
| The name stays the same but the value has changed as follows: | ||
|
|
||
| `Appearance.Neutral` to `ButtonAppearance.Default` | ||
| `Appearance.Accent` to `ButtonAppearance.Primary` | ||
| `Appearance.Lightweight` to `ButtonAppearance.Transparent` | ||
| `Appearance.Outline` to `ButtonAppearance.Outline` | ||
| `Appearance.Stealth` to `ButtonAppearance.Default` | ||
| `Appearance.Filled` to `ButtonAppearance.Default` | ||
|
|
||
| Warn about the use of `CurrentValue` property, | ||
|
|
||
| > The `CurrentValue` property has been removed. Use `Value` instead. | ||
|
|
||
| # FluentGridItem component | ||
|
|
||
| These properties have been renamed only for the `FluentGridItem` component: | ||
| - `xs` to `Xs` | ||
| - `sm` to `Sm` | ||
| - `md` to `Md` | ||
| - `lg` to `Lg` | ||
| - `xl` to `Xl` | ||
| - `xxl` to `Xxl` | ||
|
|
||
| # FluentLabel component | ||
|
|
||
| Warm the user that the property `Weight` is now used to determine if the label text is shown regular or semibold | ||
| Remove the following properties : | ||
| - `Alignment` | ||
| - `Color` | ||
| - `CustomColor` | ||
| - `MarginBlock` | ||
| - `Typo` | ||
|
|
||
| In case where the FluentLabel component is used, write the following comment: | ||
| - Label is now exclusivly being used for labeling input fields. | ||
| - If you want to use a component that shows text using Fluent's opinions on typography and is more compatible with what was used in v4, you can use the new `Text` component instead. | ||
|
|
||
| # FluentLayout component | ||
|
|
||
| - The `FluentHeader` component has been replaced by the `FluentLayoutItem` component. It uses the parameter `Area` with the value `LayoutArea.Header` | ||
|
|
||
| - The `FluentFooter` component has been replaced by the FluentLayoutItem component. It uses the parameter `Area` with the value `LayoutArea.Footer` | ||
|
|
||
| - The `FluentBodyContent` component has been replaced by the FluentLayoutItem component. It uses the parameter `Area` with the value `LayoutArea.Content` | ||
|
|
||
|
|
||
| # FluentMainLayout component | ||
|
|
||
| If the code contains the FluentMainLayout component, follow these next steps to migrate the component in a correct way the: | ||
|
|
||
| - Change the `FluentMainLayout` component to a `FluentLayout` component. | ||
|
|
||
| - Change the `Header` parameter to a `FluentLayoutItem` component and add a parameter `Area` with value `LayoutArea.Header` | ||
|
|
||
| - Change the `Body` parameter to a `FluentLayoutItem` component and add a parameter `Area` with value `LayoutArea.Content` | ||
|
|
||
| - Change the `NavMenuContent` parameter to a `FluentLayoutItem` component and add a parameter `Area` with value `LayoutArea.Menu`. If the NavMenuContent parameter does not exist, then create a new FluentLayoutItem with its `Area` parameter set to `LayoutArea.Menu. | ||
|
|
||
| - Change the `SubHeader` parameter to a `FluentLayoutItem` component with its `Area` parameter set to `LayoutArea.Header`. Remove the SubHeader. | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.