Skip to content

Commit aa8315e

Browse files
tsahimatsliahclaude
andcommitted
refactor(explore): centered editorial layout, glossary-hub style
Rework both Explore surfaces into clean, centered, constrained columns matching the recruiter glossary hub + Medium, in our design system: - Lobby: centered hero with a descriptive subtitle + search, a wrapping centered category quick-nav, and a multi-column directory of topic links (formatted names) grouped under category headings — replacing the flat full-width chip grid. Trending leaderboards become a titled section. - Topic page: drop the bordered card header for a clean centered identity header (larger title, stat row, description, Follow/Following + Block), wrap all content in a centered max-w column with consistent rhythm and section dividers, and align the feeds/rails to the column. - Category section renders topic links (formatKeyword) instead of chips. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 2a0a7dc commit aa8315e

4 files changed

Lines changed: 325 additions & 318 deletions

File tree

packages/shared/src/components/explore/ExploreCategorySection.tsx

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ import type { ReactElement } from 'react';
22
import React, { useState } from 'react';
33
import classNames from 'classnames';
44
import type { TagCategory } from '../../graphql/feedSettings';
5-
import { TagChip } from '../tags/TagChip';
65
import { getExploreTagPageLink } from '../../lib/links';
6+
import { formatKeyword } from '../../lib/strings';
7+
import Link from '../utilities/Link';
78
import {
89
Typography,
910
TypographyColor,
@@ -12,17 +13,17 @@ import {
1213
} from '../typography/Typography';
1314
import { ClickableText } from '../buttons/ClickableText';
1415

15-
const COLLAPSED_COUNT = 12;
16+
const COLLAPSED_COUNT = 8;
1617

1718
interface ExploreCategorySectionProps {
1819
category: TagCategory;
19-
followedTags: Set<string>;
2020
className?: string;
2121
}
2222

23+
// One column block in the Explore directory: an emoji + title heading above a
24+
// vertical list of topic links (Medium "Explore topics" / glossary hub style).
2325
export function ExploreCategorySection({
2426
category,
25-
followedTags,
2627
className,
2728
}: ExploreCategorySectionProps): ReactElement | null {
2829
const [expanded, setExpanded] = useState(false);
@@ -39,7 +40,10 @@ export function ExploreCategorySection({
3940
return (
4041
<section
4142
id={`explore-category-${category.id}`}
42-
className={classNames('flex scroll-mt-20 flex-col gap-3', className)}
43+
className={classNames(
44+
'mb-8 flex scroll-mt-24 break-inside-avoid flex-col gap-3',
45+
className,
46+
)}
4347
>
4448
<Typography
4549
tag={TypographyTag.H2}
@@ -50,25 +54,30 @@ export function ExploreCategorySection({
5054
{category.emoji ? `${category.emoji} ` : ''}
5155
{category.title}
5256
</Typography>
53-
<div className="flex flex-wrap gap-2">
57+
<ul className="flex flex-col gap-2.5">
5458
{visibleTags.map((tag) => (
55-
<TagChip
56-
key={tag}
57-
tag={tag}
58-
size="md"
59-
isFollowed={followedTags.has(tag)}
60-
link={getExploreTagPageLink(tag)}
61-
/>
59+
<li key={tag}>
60+
<Link href={getExploreTagPageLink(tag)} passHref prefetch={false}>
61+
<Typography
62+
tag={TypographyTag.Link}
63+
type={TypographyType.Callout}
64+
color={TypographyColor.Secondary}
65+
className="cursor-pointer no-underline transition-colors hover:text-text-primary"
66+
>
67+
{formatKeyword(tag)}
68+
</Typography>
69+
</Link>
70+
</li>
6271
))}
63-
</div>
72+
</ul>
6473
{hasMore && (
6574
<ClickableText
6675
tag="button"
6776
type="button"
6877
onClick={() => setExpanded((prev) => !prev)}
6978
className="w-fit"
7079
>
71-
{expanded ? 'Show less' : `Show all ${category.tags.length}`}
80+
{expanded ? 'Show less' : 'More'}
7281
</ClickableText>
7382
)}
7483
</section>

0 commit comments

Comments
 (0)