Skip to content

Latest commit

 

History

History
31 lines (20 loc) · 1.39 KB

File metadata and controls

31 lines (20 loc) · 1.39 KB

Part 02: Enhancing UI with Inline Chat

Now, you'll improve the loading experience using Copilot's inline chat.

NOTE: This exercise does supply specific prompts to type, but as part of the learning experience we encourage you to discover how to interact with Copilot. Feel free to talk in natural language, describing what you're looking for or need to accomplish.

  1. [] In the Solution explorer under the Store project open Components/Pages/Products.razor.

  2. [] Find the "Loading..." text in the code.

  3. [] Select this text and right-click.

  4. [] Choose "Chat" or press Alt+/.

  5. [] In the inline chat, type: Update this razor to have a simple spinner style, using built in bootstrap styles.

    Screenshot of VS with inline chat

  6. [] Select Tab to accept the changes, and it should look similar to:

    <div class="spinner-border text-primary" role="status">
        <span class="visually-hidden">Loading...</span>
    </div>
  7. [] Run the application to see your new loading spinner in action.

  8. [] Stop debugging and close the application

Key Takeaway: Inline chat allows you to make targeted improvements to your code without leaving your editor context.


Back: Part 01 - Code Completion with Ghost Text | Next: Part 03 - Referencing Code Files in Chat