| banksean | 5450584 | 2025-07-03 00:18:44 +0000 | [diff] [blame^] | 1 | import { html } from "lit"; |
| Philip Zeyliger | 272a90e | 2025-05-16 14:49:51 -0700 | [diff] [blame] | 2 | import { customElement } from "lit/decorators.js"; |
| banksean | 5450584 | 2025-07-03 00:18:44 +0000 | [diff] [blame^] | 3 | import { SketchTailwindElement } from "./sketch-tailwind-element.js"; |
| Philip Zeyliger | 272a90e | 2025-05-16 14:49:51 -0700 | [diff] [blame] | 4 | |
| 5 | /** |
| 6 | * A component that displays helpful information when the diff view is empty |
| 7 | */ |
| 8 | @customElement("sketch-diff-empty-view") |
| banksean | 5450584 | 2025-07-03 00:18:44 +0000 | [diff] [blame^] | 9 | export class SketchDiffEmptyView extends SketchTailwindElement { |
| Philip Zeyliger | 272a90e | 2025-05-16 14:49:51 -0700 | [diff] [blame] | 10 | |
| Philip Zeyliger | 272a90e | 2025-05-16 14:49:51 -0700 | [diff] [blame] | 11 | |
| 12 | render() { |
| 13 | return html` |
| banksean | 5450584 | 2025-07-03 00:18:44 +0000 | [diff] [blame^] | 14 | <div class="flex flex-col items-center justify-center h-full w-full box-border"> |
| 15 | <div class="m-8 mx-auto max-w-4xl w-11/12 p-8 border-2 border-gray-300 rounded-lg shadow-sm bg-white text-center"> |
| 16 | <h2 class="text-2xl font-semibold mb-6 text-center text-gray-800">How to use the Diff View</h2> |
| Autoformatter | 8c46362 | 2025-05-16 21:54:17 +0000 | [diff] [blame] | 17 | |
| banksean | 5450584 | 2025-07-03 00:18:44 +0000 | [diff] [blame^] | 18 | <p class="text-gray-600 leading-relaxed text-base text-left mb-4"> |
| 19 | By default, the diff view shows differences between when you started |
| 20 | Sketch (the "sketch-base" tag) and the current state. Choose a commit |
| 21 | to look at, or, a range of commits, and navigate across files. |
| 22 | </p> |
| Philip Zeyliger | 272a90e | 2025-05-16 14:49:51 -0700 | [diff] [blame] | 23 | |
| banksean | 5450584 | 2025-07-03 00:18:44 +0000 | [diff] [blame^] | 24 | <p class="text-gray-600 leading-relaxed text-base text-left mb-4"> |
| 25 | You can select text to leave comments on the code. These will be added |
| 26 | to your chat window, and you can click Send to send them along to the |
| 27 | agent, which will respond in the chat window. |
| 28 | </p> |
| Philip Zeyliger | 272a90e | 2025-05-16 14:49:51 -0700 | [diff] [blame] | 29 | |
| banksean | 5450584 | 2025-07-03 00:18:44 +0000 | [diff] [blame^] | 30 | <p class="text-gray-600 leading-relaxed text-base text-left mb-4"> |
| 31 | If the range includes <strong class="font-semibold text-gray-800">Uncommitted Changes</strong>, you can |
| 32 | <strong class="font-semibold text-gray-800">edit</strong> the text as well, and it auto-saves. If you want |
| 33 | to clear up a comment or write your own text, just go ahead and do it! |
| 34 | Once you're done, though, be sure to commit your changes, either by |
| 35 | asking the agent to do so or in the Terminal view. |
| 36 | </p> |
| 37 | </div> |
| Philip Zeyliger | 272a90e | 2025-05-16 14:49:51 -0700 | [diff] [blame] | 38 | </div> |
| 39 | `; |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | declare global { |
| 44 | interface HTMLElementTagNameMap { |
| 45 | "sketch-diff-empty-view": SketchDiffEmptyView; |
| 46 | } |
| 47 | } |