Skip to content

Commit ca0110a

Browse files
cursoragentmrubens
andcommitted
Improve ShareButton UI responsiveness and styling details
Co-authored-by: matt <[email protected]>
1 parent 356d421 commit ca0110a

File tree

1 file changed

+36
-32
lines changed

1 file changed

+36
-32
lines changed

webview-ui/src/components/chat/ShareButton.tsx

Lines changed: 36 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -163,12 +163,12 @@ export const ShareButton = ({ item, disabled = false }: ShareButtonProps) => {
163163
</Button>
164164
</PopoverTrigger>
165165
</StandardTooltip>
166-
<PopoverContent className="w-56 p-0" align="start">
166+
<PopoverContent className="w-64 sm:w-72 md:w-80 p-0" align="start">
167167
{shareSuccess ? (
168-
<div className="p-3">
168+
<div className="p-3 sm:p-4">
169169
<div className="flex items-center gap-2 text-sm text-green-600 dark:text-green-400">
170-
<span className="codicon codicon-check"></span>
171-
<span>
170+
<span className="codicon codicon-check flex-shrink-0"></span>
171+
<span className="break-words">
172172
{shareSuccess.visibility === "public"
173173
? t("chat:task.shareSuccessPublic")
174174
: t("chat:task.shareSuccessOrganization")}
@@ -182,26 +182,30 @@ export const ShareButton = ({ item, disabled = false }: ShareButtonProps) => {
182182
{cloudUserInfo?.organizationName && (
183183
<CommandItem
184184
onSelect={() => handleShare("organization")}
185-
className="cursor-pointer">
186-
<div className="flex items-center gap-2">
187-
<span className="codicon codicon-organization text-sm"></span>
188-
<div className="flex flex-col">
189-
<span className="text-sm">
185+
className="cursor-pointer p-3 sm:p-4">
186+
<div className="flex items-start gap-2 w-full">
187+
<span className="codicon codicon-organization text-sm flex-shrink-0 mt-0.5"></span>
188+
<div className="flex flex-col min-w-0 flex-1">
189+
<span className="text-sm font-medium leading-tight">
190190
{t("chat:task.shareWithOrganization")}
191191
</span>
192-
<span className="text-xs text-vscode-descriptionForeground">
192+
<span className="text-xs text-vscode-descriptionForeground mt-1 break-words leading-relaxed">
193193
{t("chat:task.shareWithOrganizationDescription")}
194194
</span>
195195
</div>
196196
</div>
197197
</CommandItem>
198198
)}
199-
<CommandItem onSelect={() => handleShare("public")} className="cursor-pointer">
200-
<div className="flex items-center gap-2">
201-
<span className="codicon codicon-globe text-sm"></span>
202-
<div className="flex flex-col">
203-
<span className="text-sm">{t("chat:task.sharePublicly")}</span>
204-
<span className="text-xs text-vscode-descriptionForeground">
199+
<CommandItem
200+
onSelect={() => handleShare("public")}
201+
className="cursor-pointer p-3 sm:p-4">
202+
<div className="flex items-start gap-2 w-full">
203+
<span className="codicon codicon-globe text-sm flex-shrink-0 mt-0.5"></span>
204+
<div className="flex flex-col min-w-0 flex-1">
205+
<span className="text-sm font-medium leading-tight">
206+
{t("chat:task.sharePublicly")}
207+
</span>
208+
<span className="text-xs text-vscode-descriptionForeground mt-1 break-words leading-relaxed">
205209
{t("chat:task.sharePubliclyDescription")}
206210
</span>
207211
</div>
@@ -228,36 +232,36 @@ export const ShareButton = ({ item, disabled = false }: ShareButtonProps) => {
228232

229233
{/* Connect to Cloud Modal */}
230234
<Dialog open={connectModalOpen} onOpenChange={setConnectModalOpen}>
231-
<DialogContent className="max-w-sm">
232-
<DialogHeader className="text-center">
233-
<DialogTitle className="text-lg font-medium text-vscode-foreground">
235+
<DialogContent className="max-w-sm sm:max-w-md w-[calc(100vw-2rem)] mx-4">
236+
<DialogHeader className="text-center space-y-3">
237+
<DialogTitle className="text-lg sm:text-xl font-medium text-vscode-foreground leading-tight">
234238
{t("account:cloudBenefitsTitle")}
235239
</DialogTitle>
236240
</DialogHeader>
237241

238242
<div className="flex flex-col space-y-6">
239-
<div>
240-
<p className="text-md text-vscode-descriptionForeground mb-4">
243+
<div className="space-y-4">
244+
<p className="text-sm sm:text-base text-vscode-descriptionForeground leading-relaxed">
241245
{t("account:cloudBenefitsSubtitle")}
242246
</p>
243-
<ul className="text-sm text-vscode-descriptionForeground space-y-2">
244-
<li className="flex items-start">
245-
<span className="mr-2 text-vscode-foreground"></span>
246-
{t("account:cloudBenefitSharing")}
247+
<ul className="text-sm text-vscode-descriptionForeground space-y-3">
248+
<li className="flex items-start gap-3">
249+
<span className="text-vscode-foreground flex-shrink-0 mt-0.5"></span>
250+
<span className="leading-relaxed">{t("account:cloudBenefitSharing")}</span>
247251
</li>
248-
<li className="flex items-start">
249-
<span className="mr-2 text-vscode-foreground"></span>
250-
{t("account:cloudBenefitHistory")}
252+
<li className="flex items-start gap-3">
253+
<span className="text-vscode-foreground flex-shrink-0 mt-0.5"></span>
254+
<span className="leading-relaxed">{t("account:cloudBenefitHistory")}</span>
251255
</li>
252-
<li className="flex items-start">
253-
<span className="mr-2 text-vscode-foreground"></span>
254-
{t("account:cloudBenefitMetrics")}
256+
<li className="flex items-start gap-3">
257+
<span className="text-vscode-foreground flex-shrink-0 mt-0.5"></span>
258+
<span className="leading-relaxed">{t("account:cloudBenefitMetrics")}</span>
255259
</li>
256260
</ul>
257261
</div>
258262

259263
<div className="flex flex-col gap-4">
260-
<Button onClick={handleConnectToCloud} className="w-full">
264+
<Button onClick={handleConnectToCloud} className="w-full h-10 sm:h-11 text-sm sm:text-base">
261265
{t("account:connect")}
262266
</Button>
263267
</div>

0 commit comments

Comments
 (0)