Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import {
import { Divider } from '../../../utilities';
import { Switch } from '../../../fields/Switch';
import { labels } from '../../../../lib';
import { SmartPrompts } from '../components/SmartPrompts';
import { featurePlusCtaCopy } from '../../../../lib/featureManagement';
import Link from '../../../utilities/Link';
import { Tooltip } from '../../../tooltip/Tooltip';
Expand Down Expand Up @@ -109,15 +108,15 @@ export const FeedSettingsAISection = (): ReactElement => {
<LanguageDropdown
className={{ container: 'w-full max-w-60' }}
name="language"
defaultValue={user.language}
defaultValue={user?.language}
onChange={(value) => {
onLanguageChange(value);

displayToast(
labels.feed.settings.globalPreferenceNotice.contentLanguage,
);
}}
icon={null}
icon={undefined}
disabled={!isPlus}
/>
</section>
Expand Down Expand Up @@ -210,10 +209,6 @@ export const FeedSettingsAISection = (): ReactElement => {
</Switch>
</ConditionalWrapper>
</section>

<Divider className="bg-border-subtlest-tertiary" />

<SmartPrompts />
</>
);
};
14 changes: 0 additions & 14 deletions packages/shared/src/components/modals/common.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -213,18 +213,6 @@ const AddToCustomFeedModal = dynamic(
),
);

const SmartPromptModal = dynamic(() =>
import(
/* webpackChunkName: "smartPromptModal" */ './plus/SmartPromptModal'
).then((mod) => mod.SmartPromptModal),
);

const MobileSmartPromptsModal = dynamic(() =>
import(
/* webpackChunkName: "mobileSmartPromptsModal" */ './plus/MobileSmartPromptsModal'
).then((mod) => mod.MobileSmartPromptsModal),
);

const CookieConsentModal = dynamic(
() =>
import(
Expand Down Expand Up @@ -503,8 +491,6 @@ export const modals = {
[LazyModal.ClickbaitShield]: ClickbaitShieldModal,
[LazyModal.MoveBookmark]: MoveBookmarkModal,
[LazyModal.AddToCustomFeed]: AddToCustomFeedModal,
[LazyModal.SmartPrompt]: SmartPromptModal,
[LazyModal.MobileSmartPrompts]: MobileSmartPromptsModal,
[LazyModal.CookieConsent]: CookieConsentModal,
[LazyModal.ReportUser]: ReportUserModal,
[LazyModal.PlusMarketing]: PlusMarketingModal,
Expand Down
2 changes: 0 additions & 2 deletions packages/shared/src/components/modals/common/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,7 @@ export enum LazyModal {
ReportUser = 'reportUser',
GiftPlus = 'giftPlus',
GiftPlusReceived = 'giftPlusReceived',
SmartPrompt = 'smartPrompt',
PlusMarketing = 'plusMarketing',
MobileSmartPrompts = 'mobileSmartPrompts',
GiveAward = 'giveAward',
ContentModal = 'contentModal',
CustomLinks = 'customLinks',
Expand Down

This file was deleted.

71 changes: 0 additions & 71 deletions packages/shared/src/components/modals/plus/SmartPromptModal.tsx

This file was deleted.

19 changes: 0 additions & 19 deletions packages/shared/src/components/plus/PlusList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { useLogContext } from '../../contexts/LogContext';
import {
BlockIcon,
BriefIcon,
CustomPromptIcon,
FolderIcon,
HashtagIcon,
LabelIcon,
Expand All @@ -28,8 +27,6 @@ import {
plusShowcasePresidentialBriefImage,
plusShowcaseShieldImage,
plusShowcaseShieldVideo,
plusShowcaseSmartPrompsImage,
plusShowcaseSmartPrompsVideo,
plusShowcaseSquadImage,
plusShowcaseTeamImage,
plusShowcaseTeamVideo,
Expand Down Expand Up @@ -86,22 +83,6 @@ export const plusFeatureListControl: Array<PlusItem> = [
mediaType: 'image',
},
},
{
id: 'smart prompts',
label: 'Run prompts on any post',
status: PlusItemStatus.Ready,
tooltip: `Turn any post into an interactive learning experience. Ask AI to simplify concepts, challenge ideas, compare alternatives, or create your own custom prompt.`,
icon: <CustomPromptIcon secondary />,
iconClasses: 'bg-overlay-float-bacon text-accent-bacon-default',
modalProps: {
title: 'Run prompts on any post',
description:
'Turn any post into an interactive learning experience. Ask AI to simplify concepts, challenge ideas, compare alternatives, or create your own custom prompt.',
videoUrl: plusShowcaseSmartPrompsVideo,
imageUrl: plusShowcaseSmartPrompsImage,
mediaType: 'video',
},
},
{
id: 'custom feeds',
label: 'Advanced custom feeds',
Expand Down
19 changes: 14 additions & 5 deletions packages/shared/src/components/post/PostContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { cloudinaryPostImageCoverPlaceholder } from '../../lib/image';
import { withPostById } from './withPostById';
import { PostClickbaitShield } from './common/PostClickbaitShield';
import { useSmartTitle } from '../../hooks/post/useSmartTitle';
import { SmartPrompt } from './smartPrompts/SmartPrompt';
import ShowMoreContent from '../cards/common/ShowMoreContent';
import { PostTagList } from './tags/PostTagList';
import PostSourceInfo from './PostSourceInfo';

Expand Down Expand Up @@ -191,10 +191,19 @@ export function PostContentRaw({
/>
)}
{post.summary && (
<SmartPrompt
post={post}
className={isCompactModalSpacing ? 'mb-4 gap-2' : undefined}
/>
<div
className={classNames(
'mb-6 text-text-secondary',
isCompactModalSpacing && 'mb-4',
)}
>
<ShowMoreContent
className={{ wrapper: 'overflow-hidden' }}
content={post.summary}
charactersLimit={330}
threshold={50}
/>
</div>
)}
<PostTagList post={post} />
<PostMetadata
Expand Down
Loading
Loading