Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
f6d9fbe
feat: add Pinterest-style post discovery mockup
tsahimatsliah Jun 2, 2026
7508344
feat: render discovery experience on the real post page behind flag
tsahimatsliah Jun 2, 2026
5d62e66
fix: show post discovery preview by default
tsahimatsliah Jun 2, 2026
a26f1f7
fix: align discovery post layout with platform reading surface
tsahimatsliah Jun 2, 2026
bbc7988
fix: remove duplicate discovery read action
tsahimatsliah Jun 2, 2026
bdce1ca
test: keep classic post page tests on classic layout
tsahimatsliah Jun 2, 2026
5611539
fix: force discovery feed to render as card grid
tsahimatsliah Jun 2, 2026
cd76374
fix: reuse production post actions in discovery layout
tsahimatsliah Jun 2, 2026
6b6ac31
fix: let discovery feed use full page width
tsahimatsliah Jun 2, 2026
5e02970
fix: reuse production post details in discovery layout
tsahimatsliah Jun 2, 2026
7788b4f
fix: use reader source strip in discovery hero
tsahimatsliah Jun 2, 2026
b97f254
fix: render discovery feed across available page width
tsahimatsliah Jun 2, 2026
edb1437
fix: restore production post details column structure
tsahimatsliah Jun 2, 2026
f83318d
fix: polish discovery discussion sidebar card
tsahimatsliah Jun 2, 2026
74dcd4d
fix: render more-like-this as three-column card grid
tsahimatsliah Jun 2, 2026
d49c6cf
fix: tighten discovery actions and comment rail spacing
tsahimatsliah Jun 2, 2026
41eeabe
fix: place action bar at top of discussion card
tsahimatsliah Jun 2, 2026
368a480
fix: remove discovery post column separator
tsahimatsliah Jun 2, 2026
d3e492d
fix: simplify discussion card actions and sharing
tsahimatsliah Jun 2, 2026
a9122fd
fix: remove duplicate discovery stats row
tsahimatsliah Jun 2, 2026
b65975b
fix: let related discovery feed use main feed columns
tsahimatsliah Jun 2, 2026
94cae4c
fix: align discovery header action icon sizes
tsahimatsliah Jun 2, 2026
3826f85
fix: make discovery toc compact and collapsible
tsahimatsliah Jun 2, 2026
ff0cb4c
fix: align keep-exploring feed spacing
tsahimatsliah Jun 2, 2026
e6677df
fix: polish discovery post details and video layout
tsahimatsliah Jun 2, 2026
6e5a6f1
fix: refine discovery left column and discussion composer
tsahimatsliah Jun 2, 2026
82f9df6
fix: set discovery columns to 768px content and 340px discussion
tsahimatsliah Jun 2, 2026
59b4482
feat: move discovery stats strip to left column above action bar
tsahimatsliah Jun 2, 2026
2393af8
fix: make discovery left content 768px inside column padding
tsahimatsliah Jun 2, 2026
1bb35a9
feat: redesign discovery composer and share section
tsahimatsliah Jun 2, 2026
eaafc74
feat: medium-style header order for discovery left column
tsahimatsliah Jun 2, 2026
66aa313
fix: drop separator borders around discovery comment composer
tsahimatsliah Jun 2, 2026
572dce6
fix: simplify discovery composer footer (drop markdown hint + send icon)
tsahimatsliah Jun 2, 2026
b5cd095
fix: remove top gap above first comment in discovery panel
tsahimatsliah Jun 2, 2026
ed0137c
fix: match share row icons to comment action bar style
tsahimatsliah Jun 2, 2026
ba87fbb
fix: move source strip above title, metadata below media in discovery
tsahimatsliah Jun 2, 2026
368f700
fix: replace action bar box border with bottom separator in discovery
tsahimatsliah Jun 2, 2026
477df20
fix: move clickbait shield to right of engagement strip in discovery
tsahimatsliah Jun 2, 2026
91757fe
feat: center content column with ghost spacer opposite comments rail
tsahimatsliah Jun 2, 2026
d8f9c83
feat: redesign discovery action bar with counts, icon-only utilities,…
tsahimatsliah Jun 2, 2026
dc8ec92
feat: anchor follow button to source name and show full read button i…
tsahimatsliah Jun 2, 2026
49fad96
style: increase spacing and button size in discovery action bar
tsahimatsliah Jun 2, 2026
01d3998
style: enlarge action bar icons in discovery
tsahimatsliah Jun 2, 2026
48ad616
style: subtle follow button and primary read button in discovery
tsahimatsliah Jun 2, 2026
0de36c0
fix: align discovery feed gutter and gap to home feed layout
tsahimatsliah Jun 2, 2026
ae3f2b3
feat: icon-only clickbait shield and reordered discovery action bar u…
tsahimatsliah Jun 2, 2026
997b251
style: add vertical padding around discovery post title
tsahimatsliah Jun 2, 2026
a9a099d
fix: center post details and comments together in discovery feed area
tsahimatsliah Jun 2, 2026
922f742
fix(discovery): shrink cover image, action bar icons, stack comments …
tsahimatsliah Jun 4, 2026
9b56e04
fix(discovery): flatten comments, reorder header, smaller action bar,…
tsahimatsliah Jun 4, 2026
3152792
feat(discovery): small image beside title, read button below TLDR
tsahimatsliah Jun 4, 2026
3980d2f
feat(discovery): read button back to top-right, composer above comments
tsahimatsliah Jun 4, 2026
6a9ac3c
style(discovery): flatten table of contents to a bordered strip
tsahimatsliah Jun 4, 2026
fb17f33
feat(discovery): swap signup nudge for onboarding-hero design
tsahimatsliah Jun 4, 2026
c3811fd
feat(discovery): float ad to the right rail, content stays centered
tsahimatsliah Jun 4, 2026
0610439
feat(discovery): widen right-rail ad, share strip, signup box, single…
tsahimatsliah Jun 4, 2026
a326b27
feat(discovery): compact share strip with inline squads below composer
tsahimatsliah Jun 4, 2026
d811578
feat(discovery): render shared posts as the underlying article + label
tsahimatsliah Jun 4, 2026
b9a0e51
feat(discovery): consistent focus card across post types
tsahimatsliah Jun 8, 2026
9e4b167
feat(discovery): remove table of contents from the focus card
tsahimatsliah Jun 8, 2026
d1a21bf
feat(discovery): extend discovery layout to shares/collections + modals
tsahimatsliah Jun 8, 2026
389d913
feat(discovery): render full post body per type, not just a TLDR
tsahimatsliah Jun 8, 2026
c618c79
feat(discovery): source hover card on shared-via link + modal width
tsahimatsliah Jun 8, 2026
68b2ed1
feat(discovery): match bottom share strip to top, hide it with no com…
tsahimatsliah Jun 8, 2026
dc7fca6
style(discovery): widen gap before the source follow button
tsahimatsliah Jun 8, 2026
80aacfa
fix(discovery): let the focus card scroll inside the post modal
tsahimatsliah Jun 8, 2026
c4be4dd
feat(discovery): show sharer as author, refine shared-via + title row
tsahimatsliah Jun 8, 2026
0952db7
fix(discovery): center shared-via row, trim author to two lines
tsahimatsliah Jun 8, 2026
ae49f21
fix(discovery): show follow button on the shared post author
tsahimatsliah Jun 8, 2026
d0c0d8d
feat(discovery): bring back collection sources as an inline carousel
tsahimatsliah Jun 8, 2026
2dd2ad0
fix(discovery): subtle, smaller follow button beside the author
tsahimatsliah Jun 8, 2026
670cd83
style(discovery): match post stats text color to the icons (secondary)
tsahimatsliah Jun 8, 2026
0e7ad5b
feat(discovery): clickable stats row with reposts and awards
tsahimatsliah Jun 8, 2026
4ac385b
style(discovery): move date/read-time metadata above the content
tsahimatsliah Jun 8, 2026
b24a7d2
feat(discovery): inline clickable counts, award button, reposts in ac…
tsahimatsliah Jun 9, 2026
b38184e
fix(discovery): show "Shared via" only for true Share-type posts
tsahimatsliah Jun 9, 2026
50b1e25
fix(discovery): outline award icon when not awarded
tsahimatsliah Jun 9, 2026
929820c
feat(discovery): action-bar counts, stats strip, sticky bar, share/ad…
tsahimatsliah Jun 9, 2026
97ad48a
fix(discovery): match production award icon fill state
tsahimatsliah Jun 9, 2026
cd44385
feat(discovery): flat inline ad layout above the composer
tsahimatsliah Jun 9, 2026
7f7dba9
feat(discovery): scroll-to-comments + working sticky bar with stuck X
tsahimatsliah Jun 9, 2026
52f4dec
fix(discovery): always show an ad title on the icon line
tsahimatsliah Jun 9, 2026
f99fbd3
fix(discovery): consistent comment-style author header for authored p…
tsahimatsliah Jun 9, 2026
33949da
feat(discovery): rebuild action bar on CardAction guideline (PR #6064)
tsahimatsliah Jun 9, 2026
4e59a45
fix(discovery): sticky action bar on the post page below the header
tsahimatsliah Jun 9, 2026
eccf62c
feat(discovery): show Read post button for shared posts
tsahimatsliah Jun 9, 2026
a846b5d
style(discovery): match comment-section header, drop the handle
tsahimatsliah Jun 9, 2026
4a6b3eb
fix(discovery): smoother composer trigger + tighter top gap
tsahimatsliah Jun 9, 2026
c41bc5d
fix(discovery): drop action bar top border when stuck
tsahimatsliah Jun 9, 2026
65bdfc0
style(discovery): match source strip avatar/name size to comments
tsahimatsliah Jun 9, 2026
0f53fe6
feat(discovery): fade/slide the composer in when it opens
tsahimatsliah Jun 9, 2026
7458e23
fix(discovery): left-align sort strip, outline award icon by default
tsahimatsliah Jun 9, 2026
ec56d2d
fix(discovery): remove double gap around the action bar
tsahimatsliah Jun 9, 2026
12544c7
fix(discovery): put ad title on the logo row, shrink height
tsahimatsliah Jun 9, 2026
b0b202a
style(discovery): smaller, medium-weight inline ad title
tsahimatsliah Jun 9, 2026
273f1a6
feat(discovery): 70% video preview that expands to full width on play
tsahimatsliah Jun 9, 2026
2720713
style(discovery): reduce top padding on the post page
tsahimatsliah Jun 9, 2026
66e275d
fix(discovery): muted autoplay on click + align inline ad attribution
tsahimatsliah Jun 9, 2026
d35dcd3
feat(discovery): cap video TL;DR to four lines with inline Show more
tsahimatsliah Jun 9, 2026
0275ec6
style(ad): vertically center inline ad strip, tighten title spacing
tsahimatsliah Jun 9, 2026
cf2c586
fix(ad): balance inline ad padding by removing AdPixel flex gap
tsahimatsliah Jun 10, 2026
173d2fa
style(ad): add hover state to inline ad card
tsahimatsliah Jun 10, 2026
1643fc3
fix(discovery): remove doubled page padding, tighten action bar gap
tsahimatsliah Jun 10, 2026
8688f5c
fix(discovery): match production mobile side padding on focus card
tsahimatsliah Jun 10, 2026
83c4bcf
fix(discovery): match production reader side padding (px-4) on mobile
tsahimatsliah Jun 10, 2026
68b1d0e
style(ad): soften inline ad hover state
tsahimatsliah Jun 10, 2026
1a8bc21
fix(discovery): unify Read post button + fix mobile title/image layout
tsahimatsliah Jun 10, 2026
7b15877
style(discovery): square cover image, stacked below title on mobile
tsahimatsliah Jun 10, 2026
d711237
style(discovery): square cover only below laptop, wide ratio on desktop
tsahimatsliah Jun 10, 2026
25a1a81
feat(discovery): morphing engagement bar (Liquid Glass-style)
tsahimatsliah Jun 10, 2026
e9a54d2
fix(discovery): mobile header — read button below title, fewer squads
tsahimatsliah Jun 10, 2026
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
30 changes: 20 additions & 10 deletions packages/shared/src/components/ShareBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,24 @@ import { useAuthContext } from '../contexts/AuthContext';

interface ShareBarProps {
post: Post;
visibleRows?: number;
}

const visibleRows = 2;
const columns = 4;
const fixedOptions = 4;
const maxVisibleOptions = visibleRows * columns;
const maxVisibleSquadsWhenCollapsed = maxVisibleOptions - fixedOptions;

export default function ShareBar({ post }: ShareBarProps): ReactElement {
export default function ShareBar({
post,
visibleRows = 2,
}: ShareBarProps): ReactElement {
const [isExpanded, setIsExpanded] = useState(false);
const maxVisibleOptions = visibleRows * columns;
const maxVisibleSquadsWhenCollapsed = Math.max(
maxVisibleOptions - fixedOptions,
0,
);
const shouldShowSquadOptions =
isExpanded || maxVisibleSquadsWhenCollapsed > 0;
const href = post.commentsPermalink;
const cid = ReferralCampaignKey.SharePost;
const { getShortUrl } = useGetShortUrl();
Expand Down Expand Up @@ -130,12 +138,14 @@ export default function ShareBar({ post }: ShareBarProps): ReactElement {
onClick={() => onClick(ShareProvider.Twitter)}
label="X"
/>
<SquadsToShare
size={ButtonSize.Medium}
squadAvatarSize={ProfileImageSize.Large}
maxItems={isExpanded ? undefined : maxVisibleSquadsWhenCollapsed}
onClick={(_, squad) => onShareToSquad(squad)}
/>
{shouldShowSquadOptions && (
<SquadsToShare
size={ButtonSize.Medium}
squadAvatarSize={ProfileImageSize.Large}
maxItems={isExpanded ? undefined : maxVisibleSquadsWhenCollapsed}
onClick={(_, squad) => onShareToSquad(squad)}
/>
)}
</div>
{shouldShowToggle && (
<Button
Expand Down
49 changes: 31 additions & 18 deletions packages/shared/src/components/modals/ArticlePostModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import type { Post } from '../../graphql/posts';
import { PostType } from '../../graphql/posts';
import type { PassedPostNavigationProps } from '../post/common';
import { Origin } from '../../lib/log';
import { usePostDiscoveryExperience } from '../../hooks/post/usePostDiscoveryExperience';
import { PostFocusCard } from '../post/discovery/PostFocusCard';

interface ArticlePostModalProps extends ModalProps, PassedPostNavigationProps {
id: string;
Expand All @@ -29,12 +31,15 @@ export default function ArticlePostModal({
isDisplayed: props.isOpen,
offset: 0,
});
const { showDiscovery } = usePostDiscoveryExperience(post);

return (
<BasePostModal
{...props}
post={post}
onAfterOpen={onLoad}
size={showDiscovery ? Modal.Size.Large : Modal.Size.XLarge}
className={showDiscovery ? 'laptop:!overflow-visible' : undefined}
onRequestClose={onRequestClose}
postType={PostType.Article}
source={post.source}
Expand All @@ -43,24 +48,32 @@ export default function ArticlePostModal({
onPreviousPost={onPreviousPost}
onNextPost={onNextPost}
>
<PostContent
position={position}
post={post}
postPosition={postPosition}
onPreviousPost={onPreviousPost}
onNextPost={onNextPost}
inlineActions
className={{
onboarding: 'mt-8',
navigation: { actions: 'ml-auto tablet:hidden' },
fixedNavigation: {
container: modalSizeToClassName[Modal.Size.XLarge],
actions: 'ml-auto',
},
}}
onClose={onRequestClose}
origin={Origin.ArticleModal}
/>
{showDiscovery ? (
<PostFocusCard
post={post}
origin={Origin.ArticleModal}
onClose={() => onRequestClose?.(undefined as never)}
/>
) : (
<PostContent
position={position}
post={post}
postPosition={postPosition}
onPreviousPost={onPreviousPost}
onNextPost={onNextPost}
inlineActions
className={{
onboarding: 'mt-8',
navigation: { actions: 'ml-auto tablet:hidden' },
fixedNavigation: {
container: modalSizeToClassName[Modal.Size.XLarge],
actions: 'ml-auto',
},
}}
onClose={onRequestClose}
origin={Origin.ArticleModal}
/>
)}
</BasePostModal>
);
}
49 changes: 31 additions & 18 deletions packages/shared/src/components/modals/CollectionPostModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import type { Post } from '../../graphql/posts';
import { PostType } from '../../graphql/posts';
import type { PassedPostNavigationProps } from '../post/common';
import { CollectionPostContent } from '../post/collection';
import { usePostDiscoveryExperience } from '../../hooks/post/usePostDiscoveryExperience';
import { PostFocusCard } from '../post/discovery/PostFocusCard';

interface CollectionPostModalProps
extends ModalProps,
Expand All @@ -31,12 +33,15 @@ export default function CollectionPostModal({
isDisplayed: props.isOpen,
offset: 0,
});
const { showDiscovery } = usePostDiscoveryExperience(post);

return (
<BasePostModal
{...props}
post={post}
onAfterOpen={onLoad}
size={showDiscovery ? Modal.Size.Large : Modal.Size.XLarge}
className={showDiscovery ? 'laptop:!overflow-visible' : undefined}
onRequestClose={onRequestClose}
postType={PostType.Collection}
source={post.source}
Expand All @@ -45,24 +50,32 @@ export default function CollectionPostModal({
onPreviousPost={onPreviousPost}
onNextPost={onNextPost}
>
<CollectionPostContent
position={position}
post={post}
postPosition={postPosition}
onPreviousPost={onPreviousPost}
onNextPost={onNextPost}
inlineActions
className={{
onboarding: 'mt-8',
navigation: { actions: 'ml-auto laptop:hidden' },
fixedNavigation: {
container: modalSizeToClassName[Modal.Size.XLarge],
actions: 'ml-auto',
},
}}
onClose={onRequestClose}
origin={Origin.CollectionModal}
/>
{showDiscovery ? (
<PostFocusCard
post={post}
origin={Origin.CollectionModal}
onClose={() => onRequestClose?.(undefined as never)}
/>
) : (
<CollectionPostContent
position={position}
post={post}
postPosition={postPosition}
onPreviousPost={onPreviousPost}
onNextPost={onNextPost}
inlineActions
className={{
onboarding: 'mt-8',
navigation: { actions: 'ml-auto laptop:hidden' },
fixedNavigation: {
container: modalSizeToClassName[Modal.Size.XLarge],
actions: 'ml-auto',
},
}}
onClose={onRequestClose}
origin={Origin.CollectionModal}
/>
)}
</BasePostModal>
);
}
65 changes: 41 additions & 24 deletions packages/shared/src/components/modals/SharePostModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import { PostType } from '../../graphql/posts';
import EnableNotification from '../notifications/EnableNotification';
import { SquadPostContent } from '../post/SquadPostContent';
import { isSourceUserSource } from '../../graphql/sources';
import { usePostDiscoveryExperience } from '../../hooks/post/usePostDiscoveryExperience';
import { PostFocusCard } from '../post/discovery/PostFocusCard';

interface PostModalProps extends ModalProps, PassedPostNavigationProps {
id: string;
Expand All @@ -31,13 +33,15 @@ export default function PostModal({
isDisplayed: props.isOpen,
offset: 0,
});
const { showDiscovery } = usePostDiscoveryExperience(post);

return (
<BasePostModal
{...props}
post={post}
onAfterOpen={onLoad}
size={Modal.Size.XLarge}
size={showDiscovery ? Modal.Size.Large : Modal.Size.XLarge}
className={showDiscovery ? 'laptop:!overflow-visible' : undefined}
onRequestClose={onRequestClose}
postType={PostType.Share}
source={post.source}
Expand All @@ -46,29 +50,42 @@ export default function PostModal({
onPreviousPost={onPreviousPost}
onNextPost={onNextPost}
>
<EnableNotification
source={NotificationPromptSource.SquadPostModal}
label={
isSourceUserSource(post?.source)
? post?.author?.username
: post?.source?.handle
}
/>
<SquadPostContent
position={position}
post={post}
onPreviousPost={onPreviousPost}
onNextPost={onNextPost}
postPosition={postPosition}
inlineActions
onClose={onRequestClose}
origin={Origin.ArticleModal}
className={{
fixedNavigation: { container: '!w-[inherit]', actions: 'ml-auto' },
navigation: { actions: 'ml-auto tablet:hidden' },
onboarding: 'mb-0 mt-8',
}}
/>
{showDiscovery ? (
<PostFocusCard
post={post}
origin={Origin.ArticleModal}
onClose={() => onRequestClose?.(undefined as never)}
/>
) : (
<>
<EnableNotification
source={NotificationPromptSource.SquadPostModal}
label={
isSourceUserSource(post?.source)
? post?.author?.username
: post?.source?.handle
}
/>
<SquadPostContent
position={position}
post={post}
onPreviousPost={onPreviousPost}
onNextPost={onNextPost}
postPosition={postPosition}
inlineActions
onClose={onRequestClose}
origin={Origin.ArticleModal}
className={{
fixedNavigation: {
container: '!w-[inherit]',
actions: 'ml-auto',
},
navigation: { actions: 'ml-auto tablet:hidden' },
onboarding: 'mb-0 mt-8',
}}
/>
</>
)}
</BasePostModal>
);
}
14 changes: 12 additions & 2 deletions packages/shared/src/components/post/PostComments.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ interface PostCommentsProps {
onClickUpvote?: (commentId: string, upvotes: number) => unknown;
className?: CommentClassName;
onCommented?: MainCommentProps['onCommented'];
/**
* Drop the list's top margin. Use when comments are the first element in
* their container (e.g. the discovery discussion panel) so they don't get an
* extra gap above the first item.
*/
removeTopSpacing?: boolean;
}

const noopShare = (): void => {};
Expand All @@ -61,6 +67,7 @@ export function PostComments({
joinNotificationCommentId,
className = {},
onCommented,
removeTopSpacing = false,
}: PostCommentsProps): ReactElement {
const { id } = post;
const container = useRef<HTMLDivElement | null>(null);
Expand Down Expand Up @@ -119,9 +126,12 @@ export function PostComments({
isModalThread
? classNames(
'mb-12 flex flex-col gap-4',
isComposerOpen ? 'mt-2' : 'mt-5',
!removeTopSpacing && (isComposerOpen ? 'mt-2' : 'mt-5'),
)
: classNames(
'-mx-4 mb-12 flex flex-col gap-4 mobileL:mx-0',
!removeTopSpacing && 'mt-6',
)
: '-mx-4 mb-12 mt-6 flex flex-col gap-4 mobileL:mx-0'
}
ref={container}
>
Expand Down
16 changes: 10 additions & 6 deletions packages/shared/src/components/post/PostHeaderActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ export function PostHeaderActions({
isFixedNavigation,
buttonSize,
hideSubscribeAction,
hideMenuOptions,
readButtonVariant,
...props
}: PostHeaderActionsProps): ReactElement {
const { openNewTab } = useContext(SettingsContext);
Expand Down Expand Up @@ -110,7 +112,7 @@ export function PostHeaderActions({
variant={
isFixedNavigation || isMobile
? ButtonVariant.Tertiary
: ButtonVariant.Secondary
: readButtonVariant ?? ButtonVariant.Secondary
}
tag="a"
href={readHref}
Expand All @@ -133,11 +135,13 @@ export function PostHeaderActions({
{isCollection && !hideSubscribeAction && (
<CollectionSubscribeButton post={post} />
)}
<PostMenuOptions
post={post}
origin={Origin.ArticleModal}
buttonSize={buttonSize}
/>
{!hideMenuOptions && (
<PostMenuOptions
post={post}
origin={Origin.ArticleModal}
buttonSize={buttonSize}
/>
)}
</Container>
);
}
Loading
Loading