diff --git a/components/plugins/copy-block.tsx b/components/plugins/copy-block.tsx
index fbcbfda..be95c7c 100644
--- a/components/plugins/copy-block.tsx
+++ b/components/plugins/copy-block.tsx
@@ -4,15 +4,28 @@ import { useState } from 'react'
import { Check, Copy } from 'lucide-react'
import { track } from '@/lib/analytics'
-/** A code block with a copy button; `label` names it for screen readers. */
-export function CopyBlock({ code, label, copiedLabel }: { code: string; label: string; copiedLabel: string }) {
+/**
+ * A code block with a copy button beside it, not on top of it: a long
+ * command scrolls inside its own column and is never hidden under the button.
+ */
+export function CopyBlock({
+ code,
+ label,
+ copiedLabel,
+ trackWhat,
+}: {
+ code: string
+ label: string
+ copiedLabel: string
+ trackWhat?: string
+}) {
const [copied, setCopied] = useState(false)
const copy = async () => {
try {
await navigator.clipboard.writeText(code)
setCopied(true)
- track('copy-plugins-config', { what: label })
+ track('copy-plugins-config', { what: trackWhat ?? label })
window.setTimeout(() => setCopied(false), 1600)
} catch {
setCopied(false)
@@ -20,8 +33,8 @@ export function CopyBlock({ code, label, copiedLabel }: { code: string; label: s
}
return (
-
-
+
+
{code}
diff --git a/components/plugins/plugin-browser.tsx b/components/plugins/plugin-browser.tsx
index c38b9c3..320f693 100644
--- a/components/plugins/plugin-browser.tsx
+++ b/components/plugins/plugin-browser.tsx
@@ -19,7 +19,7 @@ export interface BrowserPlugin {
}
function remoteLine(host: string, id: string, version: string): string {
- return `- remote: "${host}/${id}:${version}"`
+ return `- remote: ${host}/${id}\n version: ${version}`
}
function useCopy() {
@@ -86,7 +86,7 @@ export function PluginBrowser({
})
return (
-
+