Skip to content

armgit / mimik

Public Imported from GitHub
0

🎬 A browser extension and desktop app that turns your clicks into step-by-step guides with annotated screenshots πŸ“–

feat: Guide Me buttons in sidepanel and fullview

Luis Ortize0e366b0b83e
diff --git a/src/ui/fullview/GuideContent.tsx b/src/ui/fullview/GuideContent.tsx
index aa8344d..8c0f9f8 100644
--- a/src/ui/fullview/GuideContent.tsx
+++ b/src/ui/fullview/GuideContent.tsx
@@ -1,3 +1,4 @@
+import { Play } from 'lucide-react';
import { useCallback, useEffect, useRef, useState } from 'react';
import { TypeAnimation } from 'react-type-animation';
import {
@@ -9,6 +10,7 @@ import {
updateStepDescription,
} from '@/core/guides/service';
import type { Guide, Screenshot, Step } from '@/core/guides/types';
+import { sendMessage } from '@/lib/messaging';
import { getFaviconUrl, getMostCommonDomain } from '@/lib/utils';
import { useFullview } from '@/stores/fullview';
import BlurCanvas from '@/ui/sidepanel/BlurCanvas';
@@ -208,6 +210,16 @@ export default function GuideContent({ guideId }: GuideContentProps) {
{domain}
</span>
)}
+ <button
+ onClick={async () => {
+ await sendMessage('startGuideMe', { guideId });
+ }}
+ disabled={!data.steps.some((s) => s.elementMeta)}
+ className="inline-flex items-center gap-1.5 text-[11px] font-semibold text-primary-foreground bg-primary hover:bg-primary/90 px-3 py-0.5 rounded-full transition-colors disabled:opacity-30 disabled:cursor-not-allowed ml-auto"
+ >
+ <Play size={11} />
+ Guide Me
+ </button>
</div>
<GuideStepList
diff --git a/src/ui/sidepanel/GuideEditor.tsx b/src/ui/sidepanel/GuideEditor.tsx
index ab4f378..11cdd93 100644
--- a/src/ui/sidepanel/GuideEditor.tsx
+++ b/src/ui/sidepanel/GuideEditor.tsx
@@ -1,4 +1,4 @@
-import { ArrowLeft, Layers, Maximize2 } from 'lucide-react';
+import { ArrowLeft, Layers, Maximize2, Play } from 'lucide-react';
import { useCallback, useEffect, useState } from 'react';
import {
deleteStep,
@@ -10,6 +10,7 @@ import {
} from '@/core/guides/service';
import type { Guide, Screenshot, Step } from '@/core/guides/types';
import { createTab, focusWindow, getExtensionURL, queryTabs, updateTab } from '@/lib/browser-api';
+import { sendMessage } from '@/lib/messaging';
import { getFaviconUrl, getMostCommonDomain } from '@/lib/utils';
import { Input } from '@/ui/components/ui/input';
import EmptyGuideState from '@/ui/shared/EmptyGuideState';
@@ -153,6 +154,17 @@ export default function GuideEditor({ guideId, onBack }: GuideEditorProps) {
>
<Maximize2 size={15} />
</button>
+ <button
+ onClick={async () => {
+ await sendMessage('startGuideMe', { guideId });
+ window.close();
+ }}
+ disabled={!data.steps.some((s) => s.elementMeta)}
+ className="shrink-0 p-1.5 rounded-md transition-colors text-warm hover:text-accent hover:bg-secondary disabled:opacity-30 disabled:cursor-not-allowed"
+ title="Guide Me"
+ >
+ <Play size={15} />
+ </button>
<div className="ml-auto shrink-0">
<ExportMenu guideId={guideId} guide={data.guide} steps={data.steps} screenshots={data.screenshots} />
</div>