From d06ab77e60878d69d816bf4615aeae884bc50e9c Mon Sep 17 00:00:00 2001 From: ajaysi Date: Tue, 31 Mar 2026 20:13:24 +0530 Subject: [PATCH] Improve podcast avatar display and info banner - Avatar images now use full available width (max 280px, responsive) - Auto-collapse info banner after 8 seconds - Add 'Show tips' link to expand collapsed info - Fix image sizing to use contain instead of cover for better visibility --- .../CreateStep/AvatarSelector.tsx | 35 +++++----- .../PodcastMaker/CreateStep/CreateActions.tsx | 69 +++++++++++++------ 2 files changed, 67 insertions(+), 37 deletions(-) diff --git a/frontend/src/components/PodcastMaker/CreateStep/AvatarSelector.tsx b/frontend/src/components/PodcastMaker/CreateStep/AvatarSelector.tsx index 7ffb6d5d..89dcb6d7 100644 --- a/frontend/src/components/PodcastMaker/CreateStep/AvatarSelector.tsx +++ b/frontend/src/components/PodcastMaker/CreateStep/AvatarSelector.tsx @@ -160,17 +160,18 @@ export const AvatarSelector: React.FC = ({ {loadingBrandAvatar ? ( ) : avatarPreview && avatarPreview === brandAvatarFromDb ? ( - - + + = ({ ) : brandAvatarFromDb ? ( - + = ({ {avatarFile && avatarPreview ? ( - + = ({ canSubmit, isSubmitting, }) => { + const [showInfo, setShowInfo] = useState(true); + + useEffect(() => { + const timer = setTimeout(() => { + setShowInfo(false); + }, 8000); + return () => clearTimeout(timer); + }, []); + return ( - - {/* Info Banner */} - } - sx={{ - background: alpha("#f0f4ff", 0.6), - border: "1px solid rgba(99, 102, 241, 0.15)", - borderRadius: 2, - boxShadow: "0 1px 3px rgba(99, 102, 241, 0.08)", - "& .MuiAlert-message": { - width: "100%", - }, - }} - > - - Podcast avatar Image is required, brand avatar is Default, you can choose existing images from asset library Or Upload your Picture. If not, AI Avatar will be generated automatically. - - + + {/* Collapsible Info Banner */} + + } + onClose={() => setShowInfo(false)} + sx={{ + background: alpha("#f0f4ff", 0.6), + border: "1px solid rgba(99, 102, 241, 0.15)", + borderRadius: 2, + boxShadow: "0 1px 3px rgba(99, 102, 241, 0.08)", + "& .MuiAlert-message": { + width: "100%", + }, + }} + > + + Podcast avatar Image is required. Brand avatar is default. You can choose from asset library or upload your picture. If not, AI Avatar will be generated automatically. + + + + + {!showInfo && ( + + + setShowInfo(true)} + > + Show tips + + + )} }>