Skip to content

Drop in a screenshot and convert it to clean code (HTML/Tailwind/React/Vue)

Python

Merge branch 'claude/improve-lightbox-ui-nwsfv'

Abi Raja0b6fc55c64a7
diff --cc frontend/src/components/sidebar/Sidebar.tsx
index 4230fe33,1bb17574..cfb5e7f9
--- a/frontend/src/components/sidebar/Sidebar.tsx
+++ b/frontend/src/components/sidebar/Sidebar.tsx
@@@ -17,9 -10,8 +10,9 @@@ import Variants from "../variants/Varia
import UpdateImageUpload, { UpdateImagePreview } from "../UpdateImageUpload";
import AgentActivity from "../agent/AgentActivity";
import WorkingPulse from "../core/WorkingPulse";
- import { Dialog, DialogPortal, DialogOverlay } from "../ui/dialog";
+ import ImageLightbox from "../ImageLightbox";
import { Commit } from "../commits/types";
+import { removeHighlight } from "../select-and-edit/utils";
interface SidebarProps {
showSelectAndEditFeature: boolean;
@@@ -62,22 -52,12 +53,15 @@@ function Sidebar(
}: SidebarProps) {
const textareaRef = useRef<HTMLTextAreaElement>(null);
const middlePaneRef = useRef<HTMLDivElement>(null);
- const lightboxViewportRef = useRef<HTMLDivElement>(null);
const [isErrorExpanded, setIsErrorExpanded] = useState(false);
+ const [isPromptExpanded, setIsPromptExpanded] = useState(false);
+ const [isPromptClamped, setIsPromptClamped] = useState(false);
+ const promptTextRef = useRef<HTMLParagraphElement>(null);
const [isDragging, setIsDragging] = useState(false);
const [nowMs, setNowMs] = useState(() => Date.now());
const [lightboxImage, setLightboxImage] = useState<string | null>(null);
- const [lightboxZoom, setLightboxZoom] = useState(1);
- const [lightboxNaturalSize, setLightboxNaturalSize] = useState<{
- width: number;
- height: number;
- } | null>(null);
- const [lightboxFitScale, setLightboxFitScale] = useState(1);
- const { appState, updateInstruction, setUpdateInstruction, updateImages, setUpdateImages, inSelectAndEditMode, toggleInSelectAndEditMode } = useAppStore();
+ const { appState, updateInstruction, setUpdateInstruction, updateImages, setUpdateImages, inSelectAndEditMode, toggleInSelectAndEditMode, selectedElement, setSelectedElement } = useAppStore();
// Helper function to convert file to data URL
const fileToDataURL = (file: File): Promise<string> => {