Skip to content

Commit d035176

Browse files
authored
chore: remove smart prompts (#5875)
1 parent fa38cc9 commit d035176

26 files changed

+24
-1181
lines changed

packages/shared/src/components/feeds/FeedSettings/components/SmartPrompts.tsx

Lines changed: 0 additions & 102 deletions
This file was deleted.

packages/shared/src/components/feeds/FeedSettings/sections/FeedSettingsAISection.tsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ import {
2929
import { Divider } from '../../../utilities';
3030
import { Switch } from '../../../fields/Switch';
3131
import { labels } from '../../../../lib';
32-
import { SmartPrompts } from '../components/SmartPrompts';
3332
import { featurePlusCtaCopy } from '../../../../lib/featureManagement';
3433
import Link from '../../../utilities/Link';
3534
import { Tooltip } from '../../../tooltip/Tooltip';
@@ -109,15 +108,15 @@ export const FeedSettingsAISection = (): ReactElement => {
109108
<LanguageDropdown
110109
className={{ container: 'w-full max-w-60' }}
111110
name="language"
112-
defaultValue={user.language}
111+
defaultValue={user?.language}
113112
onChange={(value) => {
114113
onLanguageChange(value);
115114

116115
displayToast(
117116
labels.feed.settings.globalPreferenceNotice.contentLanguage,
118117
);
119118
}}
120-
icon={null}
119+
icon={undefined}
121120
disabled={!isPlus}
122121
/>
123122
</section>
@@ -210,10 +209,6 @@ export const FeedSettingsAISection = (): ReactElement => {
210209
</Switch>
211210
</ConditionalWrapper>
212211
</section>
213-
214-
<Divider className="bg-border-subtlest-tertiary" />
215-
216-
<SmartPrompts />
217212
</>
218213
);
219214
};

packages/shared/src/components/modals/common.tsx

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -213,18 +213,6 @@ const AddToCustomFeedModal = dynamic(
213213
),
214214
);
215215

216-
const SmartPromptModal = dynamic(() =>
217-
import(
218-
/* webpackChunkName: "smartPromptModal" */ './plus/SmartPromptModal'
219-
).then((mod) => mod.SmartPromptModal),
220-
);
221-
222-
const MobileSmartPromptsModal = dynamic(() =>
223-
import(
224-
/* webpackChunkName: "mobileSmartPromptsModal" */ './plus/MobileSmartPromptsModal'
225-
).then((mod) => mod.MobileSmartPromptsModal),
226-
);
227-
228216
const CookieConsentModal = dynamic(
229217
() =>
230218
import(
@@ -503,8 +491,6 @@ export const modals = {
503491
[LazyModal.ClickbaitShield]: ClickbaitShieldModal,
504492
[LazyModal.MoveBookmark]: MoveBookmarkModal,
505493
[LazyModal.AddToCustomFeed]: AddToCustomFeedModal,
506-
[LazyModal.SmartPrompt]: SmartPromptModal,
507-
[LazyModal.MobileSmartPrompts]: MobileSmartPromptsModal,
508494
[LazyModal.CookieConsent]: CookieConsentModal,
509495
[LazyModal.ReportUser]: ReportUserModal,
510496
[LazyModal.PlusMarketing]: PlusMarketingModal,

packages/shared/src/components/modals/common/types.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,7 @@ export enum LazyModal {
6464
ReportUser = 'reportUser',
6565
GiftPlus = 'giftPlus',
6666
GiftPlusReceived = 'giftPlusReceived',
67-
SmartPrompt = 'smartPrompt',
6867
PlusMarketing = 'plusMarketing',
69-
MobileSmartPrompts = 'mobileSmartPrompts',
7068
GiveAward = 'giveAward',
7169
ContentModal = 'contentModal',
7270
CustomLinks = 'customLinks',

packages/shared/src/components/modals/plus/MobileSmartPromptsModal.tsx

Lines changed: 0 additions & 54 deletions
This file was deleted.

packages/shared/src/components/modals/plus/SmartPromptModal.tsx

Lines changed: 0 additions & 71 deletions
This file was deleted.

packages/shared/src/components/plus/PlusList.tsx

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import { useLogContext } from '../../contexts/LogContext';
99
import {
1010
BlockIcon,
1111
BriefIcon,
12-
CustomPromptIcon,
1312
FolderIcon,
1413
HashtagIcon,
1514
LabelIcon,
@@ -28,8 +27,6 @@ import {
2827
plusShowcasePresidentialBriefImage,
2928
plusShowcaseShieldImage,
3029
plusShowcaseShieldVideo,
31-
plusShowcaseSmartPrompsImage,
32-
plusShowcaseSmartPrompsVideo,
3330
plusShowcaseSquadImage,
3431
plusShowcaseTeamImage,
3532
plusShowcaseTeamVideo,
@@ -86,22 +83,6 @@ export const plusFeatureListControl: Array<PlusItem> = [
8683
mediaType: 'image',
8784
},
8885
},
89-
{
90-
id: 'smart prompts',
91-
label: 'Run prompts on any post',
92-
status: PlusItemStatus.Ready,
93-
tooltip: `Turn any post into an interactive learning experience. Ask AI to simplify concepts, challenge ideas, compare alternatives, or create your own custom prompt.`,
94-
icon: <CustomPromptIcon secondary />,
95-
iconClasses: 'bg-overlay-float-bacon text-accent-bacon-default',
96-
modalProps: {
97-
title: 'Run prompts on any post',
98-
description:
99-
'Turn any post into an interactive learning experience. Ask AI to simplify concepts, challenge ideas, compare alternatives, or create your own custom prompt.',
100-
videoUrl: plusShowcaseSmartPrompsVideo,
101-
imageUrl: plusShowcaseSmartPrompsImage,
102-
mediaType: 'video',
103-
},
104-
},
10586
{
10687
id: 'custom feeds',
10788
label: 'Advanced custom feeds',

packages/shared/src/components/post/PostContent.tsx

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import { cloudinaryPostImageCoverPlaceholder } from '../../lib/image';
2525
import { withPostById } from './withPostById';
2626
import { PostClickbaitShield } from './common/PostClickbaitShield';
2727
import { useSmartTitle } from '../../hooks/post/useSmartTitle';
28-
import { SmartPrompt } from './smartPrompts/SmartPrompt';
28+
import ShowMoreContent from '../cards/common/ShowMoreContent';
2929
import { PostTagList } from './tags/PostTagList';
3030
import PostSourceInfo from './PostSourceInfo';
3131

@@ -191,10 +191,19 @@ export function PostContentRaw({
191191
/>
192192
)}
193193
{post.summary && (
194-
<SmartPrompt
195-
post={post}
196-
className={isCompactModalSpacing ? 'mb-4 gap-2' : undefined}
197-
/>
194+
<div
195+
className={classNames(
196+
'mb-6 text-text-secondary',
197+
isCompactModalSpacing && 'mb-4',
198+
)}
199+
>
200+
<ShowMoreContent
201+
className={{ wrapper: 'overflow-hidden' }}
202+
content={post.summary}
203+
charactersLimit={330}
204+
threshold={50}
205+
/>
206+
</div>
198207
)}
199208
<PostTagList post={post} />
200209
<PostMetadata

0 commit comments

Comments
 (0)