Skip to content

Commit 147faec

Browse files
authored
feat: smart composer experiment (#6048)
1 parent 951b918 commit 147faec

30 files changed

Lines changed: 2863 additions & 236 deletions

packages/shared/src/components/fields/RichTextEditor/RichTextToolbar.tsx

Lines changed: 340 additions & 64 deletions
Large diffs are not rendered by default.

packages/shared/src/components/fields/RichTextInput.tsx

Lines changed: 277 additions & 146 deletions
Large diffs are not rendered by default.
Lines changed: 7 additions & 0 deletions
Loading
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import type { ReactElement } from 'react';
2+
import React from 'react';
3+
import type { IconProps } from '../../Icon';
4+
import Icon from '../../Icon';
5+
import OutlinedIcon from './outlined.svg';
6+
import FilledIcon from './filled.svg';
7+
8+
export const MaximizeIcon = (props: IconProps): ReactElement => (
9+
<Icon {...props} IconPrimary={OutlinedIcon} IconSecondary={FilledIcon} />
10+
);
Lines changed: 7 additions & 0 deletions
Loading
Lines changed: 7 additions & 0 deletions
Loading
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import type { ReactElement } from 'react';
2+
import React from 'react';
3+
import type { IconProps } from '../../Icon';
4+
import Icon from '../../Icon';
5+
import OutlinedIcon from './outlined.svg';
6+
import FilledIcon from './filled.svg';
7+
8+
export const MinimizeIcon = (props: IconProps): ReactElement => (
9+
<Icon {...props} IconPrimary={OutlinedIcon} IconSecondary={FilledIcon} />
10+
);
Lines changed: 7 additions & 0 deletions
Loading

packages/shared/src/components/icons/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,15 @@ export * from './Magic';
9696
export * from './Mail';
9797
export * from './Markdown';
9898
export * from './Mastodon';
99+
export * from './Maximize';
99100
export * from './MedalBadge';
100101
export * from './Megaphone';
101102
export * from './Menu';
102103
export * from './Merge';
103104
export * from './Microphone';
104105
export * from './Microsoft';
105106
export * from './MiniClose';
107+
export * from './Minimize';
106108
export * from './Minus';
107109
export * from './Moon';
108110
export * from './MoveTo';

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,13 @@ const CreateSharedPostModal = dynamic(
4848
),
4949
);
5050

51+
const SmartComposerModal = dynamic(
52+
() =>
53+
import(
54+
/* webpackChunkName: "smartComposerModal" */ './post/SmartComposerModal'
55+
),
56+
);
57+
5158
const ReportPostModal = dynamic(
5259
() =>
5360
import(
@@ -495,6 +502,7 @@ export const modals = {
495502
[LazyModal.ReadingHistory]: ReadingHistoryModal,
496503
[LazyModal.SquadPromotion]: SquadPromotionModal,
497504
[LazyModal.CreateSharedPost]: CreateSharedPostModal,
505+
[LazyModal.SmartComposer]: SmartComposerModal,
498506
[LazyModal.ReportPost]: ReportPostModal,
499507
[LazyModal.ReportComment]: ReportCommentModal,
500508
[LazyModal.SquadNotifications]: SquadNotificationsModal,

0 commit comments

Comments
 (0)