blob: 28829b346b969650e69ed55887ee7aa8d30c5c07 [file] [log] [blame]
banksean54505842025-07-03 00:18:44 +00001import { html } from "lit";
Philip Zeyliger272a90e2025-05-16 14:49:51 -07002import { customElement } from "lit/decorators.js";
banksean54505842025-07-03 00:18:44 +00003import { SketchTailwindElement } from "./sketch-tailwind-element.js";
Philip Zeyliger272a90e2025-05-16 14:49:51 -07004
5/**
6 * A component that displays helpful information when the diff view is empty
7 */
8@customElement("sketch-diff-empty-view")
banksean54505842025-07-03 00:18:44 +00009export class SketchDiffEmptyView extends SketchTailwindElement {
Philip Zeyliger272a90e2025-05-16 14:49:51 -070010 render() {
11 return html`
Autoformatter9f5cb2e2025-07-03 00:25:35 +000012 <div
13 class="flex flex-col items-center justify-center h-full w-full box-border"
14 >
15 <div
16 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"
17 >
18 <h2 class="text-2xl font-semibold mb-6 text-center text-gray-800">
19 How to use the Diff View
20 </h2>
Autoformatter8c463622025-05-16 21:54:17 +000021
banksean54505842025-07-03 00:18:44 +000022 <p class="text-gray-600 leading-relaxed text-base text-left mb-4">
23 By default, the diff view shows differences between when you started
Autoformatter9f5cb2e2025-07-03 00:25:35 +000024 Sketch (the "sketch-base" tag) and the current state. Choose a
25 commit to look at, or, a range of commits, and navigate across
26 files.
banksean54505842025-07-03 00:18:44 +000027 </p>
Philip Zeyliger272a90e2025-05-16 14:49:51 -070028
banksean54505842025-07-03 00:18:44 +000029 <p class="text-gray-600 leading-relaxed text-base text-left mb-4">
Autoformatter9f5cb2e2025-07-03 00:25:35 +000030 You can select text to leave comments on the code. These will be
31 added to your chat window, and you can click Send to send them along
32 to the agent, which will respond in the chat window.
banksean54505842025-07-03 00:18:44 +000033 </p>
Philip Zeyliger272a90e2025-05-16 14:49:51 -070034
banksean54505842025-07-03 00:18:44 +000035 <p class="text-gray-600 leading-relaxed text-base text-left mb-4">
Autoformatter9f5cb2e2025-07-03 00:25:35 +000036 If the range includes
37 <strong class="font-semibold text-gray-800"
38 >Uncommitted Changes</strong
39 >, you can
40 <strong class="font-semibold text-gray-800">edit</strong> the text
41 as well, and it auto-saves. If you want to clear up a comment or
42 write your own text, just go ahead and do it! Once you're done,
43 though, be sure to commit your changes, either by asking the agent
44 to do so or in the Terminal view.
banksean54505842025-07-03 00:18:44 +000045 </p>
46 </div>
Philip Zeyliger272a90e2025-05-16 14:49:51 -070047 </div>
48 `;
49 }
50}
51
52declare global {
53 interface HTMLElementTagNameMap {
54 "sketch-diff-empty-view": SketchDiffEmptyView;
55 }
56}