blob: 5881e03067543f134a209cac0924e237d06179c7 [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
Philip Zeyliger272a90e2025-05-16 14:49:51 -070011
12 render() {
13 return html`
banksean54505842025-07-03 00:18:44 +000014 <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>
Autoformatter8c463622025-05-16 21:54:17 +000017
banksean54505842025-07-03 00:18:44 +000018 <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 Zeyliger272a90e2025-05-16 14:49:51 -070023
banksean54505842025-07-03 00:18:44 +000024 <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 Zeyliger272a90e2025-05-16 14:49:51 -070029
banksean54505842025-07-03 00:18:44 +000030 <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 Zeyliger272a90e2025-05-16 14:49:51 -070038 </div>
39 `;
40 }
41}
42
43declare global {
44 interface HTMLElementTagNameMap {
45 "sketch-diff-empty-view": SketchDiffEmptyView;
46 }
47}