chore: remove share opinion sidebar prompt
Delete the share opinion dialog and its sidebar trigger. Remove the related toast and footer action wiring. Clean up unused i18n entries in all supported languages.
This commit is contained in:
@@ -1,65 +0,0 @@
|
||||
import React from 'react';
|
||||
import { Icon } from '@/components/icon/Icon';
|
||||
import { SimpleMarkdownRenderer } from '@/components/chat/MarkdownRenderer';
|
||||
import { Dialog, DialogContent, DialogTitle } from '@/components/ui/dialog';
|
||||
import { useI18n } from '@/lib/i18n';
|
||||
import { openExternalUrl } from '@/lib/url';
|
||||
|
||||
type ShareOpinionDialogProps = {
|
||||
open: boolean;
|
||||
onOpenChange: (open: boolean) => void;
|
||||
};
|
||||
|
||||
const SHARE_OPINION_MARKDOWN = `**Help shape what OpenChamber becomes next!**
|
||||
|
||||
Hey 👋,
|
||||
|
||||
OpenChamber has grown mostly through word of mouth, GitHub issues, Discord feedback, and people telling me what is broken, confusing, or surprisingly useful.
|
||||
|
||||
I'm planning the next chapter now - mobile, better remote access, a tighter VS Code ↔ desktop/web/mobile flow, and more, but before building too much, I want to hear from the people actually using it.
|
||||
|
||||
I'm doing a round of short 1-on-1 calls. No sales pitch, no formal script - just a real conversation about how you use OpenChamber, what you love, what frustrates you, and what would make it much more valuable.
|
||||
|
||||
You can book a call or use the short survey below.
|
||||
|
||||
What you get:
|
||||
|
||||
- A direct chance to influence the roadmap
|
||||
- Your pain points and feature requests prioritized with more context
|
||||
- A Power User role in Discord for people helping shape the product
|
||||
- My genuine thanks for helping make OpenChamber better
|
||||
|
||||
**This project is what it is because of your feedback. Thank you, genuinely.**
|
||||
|
||||
I'll remove this button in 10 days 🙂`;
|
||||
|
||||
export function ShareOpinionDialog({ open, onOpenChange }: ShareOpinionDialogProps): React.ReactNode {
|
||||
const { t } = useI18n();
|
||||
|
||||
return (
|
||||
<Dialog open={open} onOpenChange={onOpenChange}>
|
||||
<DialogContent className="max-h-[85vh] max-w-2xl overflow-y-auto">
|
||||
<DialogTitle className="sr-only">{t('shareOpinion.dialog.title')}</DialogTitle>
|
||||
<SimpleMarkdownRenderer content={SHARE_OPINION_MARKDOWN} className="typography-markdown-body" enableFileReferences={false} />
|
||||
<div className="mt-4 flex flex-wrap gap-2">
|
||||
<button
|
||||
type="button"
|
||||
className="inline-flex items-center gap-2 rounded-xl border border-[var(--interactive-border)] bg-[var(--surface-elevated)] px-4 py-2.5 typography-ui-label text-foreground hover:bg-[var(--interactive-hover)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--interactive-focus-ring)]"
|
||||
onClick={() => void openExternalUrl('https://calendly.com/artmore/30min')}
|
||||
>
|
||||
<Icon name="video-chat" className="size-5 text-[var(--status-warning)]" />
|
||||
{t('shareOpinion.actions.bookCall')}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
className="inline-flex items-center gap-2 rounded-xl border border-[var(--interactive-border)] bg-[var(--surface-elevated)] px-4 py-2.5 typography-ui-label text-foreground hover:bg-[var(--interactive-hover)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--interactive-focus-ring)]"
|
||||
onClick={() => void openExternalUrl('https://forms.gle/cdMVKUGs5QuLWkA86')}
|
||||
>
|
||||
<Icon name="survey" className="size-5 text-[var(--pr-merged)]" />
|
||||
{t('shareOpinion.actions.shortSurvey')}
|
||||
</button>
|
||||
</div>
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
);
|
||||
}
|
||||
@@ -36,7 +36,6 @@ import { useStickyProjectHeaders } from './sidebar/hooks/useStickyProjectHeaders
|
||||
import { getGitHubPrStatusKey, usePrVisualSummaryByKeys, useGitHubPrStatusStore } from '@/stores/useGitHubPrStatusStore';
|
||||
import { ProjectEditDialog } from '@/components/layout/ProjectEditDialog';
|
||||
import { UpdateDialog } from '@/components/ui/UpdateDialog';
|
||||
import { ShareOpinionDialog } from '@/components/feedback/ShareOpinionDialog';
|
||||
import { SessionGroupSection } from './sidebar/SessionGroupSection';
|
||||
import { SidebarHeader } from './sidebar/SidebarHeader';
|
||||
import { SidebarActivitySections } from './sidebar/SidebarActivitySections';
|
||||
@@ -82,7 +81,6 @@ import { useRuntimeAPIs } from '@/hooks/useRuntimeAPIs';
|
||||
import { useGitHubAuthStore } from '@/stores/useGitHubAuthStore';
|
||||
import { subscribeOpenchamberEvents } from '@/lib/openchamberEvents';
|
||||
|
||||
const SHARE_OPINION_TOAST_STORAGE_KEY = 'openchamber.shareOpinionToast.dismissed.v2';
|
||||
const PROJECT_COLLAPSE_STORAGE_KEY = 'oc.sessions.projectCollapse';
|
||||
const GROUP_ORDER_STORAGE_KEY = 'oc.sessions.groupOrder';
|
||||
const GROUP_COLLAPSE_STORAGE_KEY = 'oc.sessions.groupCollapse';
|
||||
@@ -199,7 +197,6 @@ export const SessionSidebar: React.FC<SessionSidebarProps> = ({
|
||||
const newWorktreeDialogOpen = useUIStore((state) => state.isNewWorktreeDialogOpen);
|
||||
const setNewWorktreeDialogOpen = useUIStore((state) => state.setNewWorktreeDialogOpen);
|
||||
const [updateDialogOpen, setUpdateDialogOpen] = React.useState(false);
|
||||
const [shareOpinionDialogOpen, setShareOpinionDialogOpen] = React.useState(false);
|
||||
const [openSidebarMenuKey, setOpenSidebarMenuKey] = React.useState<string | null>(null);
|
||||
const [renamingFolderId, setRenamingFolderId] = React.useState<string | null>(null);
|
||||
const [renameFolderDraft, setRenameFolderDraft] = React.useState('');
|
||||
@@ -678,36 +675,6 @@ export const SessionSidebar: React.FC<SessionSidebarProps> = ({
|
||||
});
|
||||
}, [t, updateStore]);
|
||||
|
||||
const handleOpenShareOpinionDialog = React.useCallback(() => {
|
||||
setShareOpinionDialogOpen(true);
|
||||
}, []);
|
||||
|
||||
React.useEffect(() => {
|
||||
if (typeof window === 'undefined') {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
if (window.localStorage.getItem(SHARE_OPINION_TOAST_STORAGE_KEY) === 'true') {
|
||||
return;
|
||||
}
|
||||
window.localStorage.setItem(SHARE_OPINION_TOAST_STORAGE_KEY, 'true');
|
||||
} catch {
|
||||
// If storage is unavailable, still show once for this sidebar mount.
|
||||
}
|
||||
const timeoutId = window.setTimeout(() => {
|
||||
toast.info(t('shareOpinion.toast.title'), {
|
||||
description: t('shareOpinion.toast.description'),
|
||||
action: {
|
||||
label: t('shareOpinion.actions.shareOpinion'),
|
||||
onClick: () => setShareOpinionDialogOpen(true),
|
||||
},
|
||||
duration: 12_000,
|
||||
});
|
||||
}, 1_000);
|
||||
|
||||
return () => window.clearTimeout(timeoutId);
|
||||
}, [t]);
|
||||
|
||||
const handleOpenSettings = React.useCallback(() => {
|
||||
if (mobileVariant) {
|
||||
setSessionSwitcherOpen(false);
|
||||
@@ -1733,16 +1700,10 @@ export const SessionSidebar: React.FC<SessionSidebarProps> = ({
|
||||
onOpenShortcuts={toggleHelpDialog}
|
||||
onOpenAbout={() => setAboutDialogOpen(true)}
|
||||
onOpenUpdate={handleOpenUpdateDialog}
|
||||
onOpenShareOpinion={handleOpenShareOpinionDialog}
|
||||
showRuntimeButtons={!isVSCode}
|
||||
showUpdateButton={showSidebarUpdateButton}
|
||||
/>
|
||||
|
||||
<ShareOpinionDialog
|
||||
open={shareOpinionDialogOpen}
|
||||
onOpenChange={setShareOpinionDialogOpen}
|
||||
/>
|
||||
|
||||
<UpdateDialog
|
||||
open={updateDialogOpen}
|
||||
onOpenChange={setUpdateDialogOpen}
|
||||
|
||||
@@ -9,7 +9,6 @@ type Props = {
|
||||
onOpenShortcuts: () => void;
|
||||
onOpenAbout: () => void;
|
||||
onOpenUpdate: () => void;
|
||||
onOpenShareOpinion: () => void;
|
||||
showRuntimeButtons?: boolean;
|
||||
showUpdateButton?: boolean;
|
||||
};
|
||||
@@ -21,12 +20,15 @@ export function SidebarFooter({
|
||||
onOpenShortcuts,
|
||||
onOpenAbout,
|
||||
onOpenUpdate,
|
||||
onOpenShareOpinion,
|
||||
showRuntimeButtons = true,
|
||||
showUpdateButton = true,
|
||||
}: Props): React.ReactNode {
|
||||
const { t } = useI18n();
|
||||
|
||||
if (!showRuntimeButtons && !showUpdateButton) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="flex shrink-0 items-center justify-start gap-1 px-2.5 py-2">
|
||||
{showRuntimeButtons ? (
|
||||
@@ -67,17 +69,7 @@ export function SidebarFooter({
|
||||
>
|
||||
{t('sessions.sidebar.footer.actions.update')}
|
||||
</Button>
|
||||
) : (
|
||||
<Button
|
||||
type="button"
|
||||
variant="default"
|
||||
size="xs"
|
||||
className="ml-auto border-[var(--primary-base)]/15 bg-[var(--primary-base)]/5 text-[var(--primary-base)]/60 hover:bg-[var(--primary-base)]/10 hover:text-[var(--primary-base)]/75"
|
||||
onClick={onOpenShareOpinion}
|
||||
>
|
||||
{t('sessions.sidebar.footer.actions.shareOpinion')}
|
||||
</Button>
|
||||
)}
|
||||
) : null}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user