Skip to content

Commit ae4e5f1

Browse files
Redirect /wip to the teams section and align card/button styles
The /wip redirect now targets /roadmap#teams, and the page scrolls the Editor viewport to the teams grid when it loads with that hash (native anchor navigation doesn't reach into the app's scroll container). Design pass: team cards now match FeatureCard padding (p-3/gap-3), the section header aligns with the page header at px-2, the heading gets scroll-mt breathing room, and the toolbar button drops a height override that broke OSButton's two-layer hover effect. Generated-By: PostHog Code Task-Id: 9ecd4529-67fb-4091-9d52-2f321cccc016
1 parent c0d0063 commit ae4e5f1

5 files changed

Lines changed: 18 additions & 8 deletions

File tree

src/components/Roadmap/EarlyAccessFeaturesSection.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1077,7 +1077,7 @@ export default function EarlyAccessFeaturesSection(): JSX.Element | null {
10771077
type="button"
10781078
size="md"
10791079
variant="secondary"
1080-
className="!h-10 shrink-0"
1080+
className="shrink-0"
10811081
onClick={() => openTeam(filterGridTeam.slug)}
10821082
>
10831083
View team goals

src/components/Roadmap/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Roadmap board
22

3-
`EarlyAccessFeaturesSection` powers `/roadmap`. It presents the same early-access data and enrollment flows as the PostHog app in a compact, changelog-style board, followed by a quarter grid showing what every team is working on (the former `/wip` page, which now redirects here).
3+
`EarlyAccessFeaturesSection` powers `/roadmap`. It presents the same early-access data and enrollment flows as the PostHog app in a compact, changelog-style board, followed by a quarter grid showing what every team is working on (the former `/wip` page, which now redirects to `/roadmap#teams`; the page shell scrolls the Editor viewport to the grid when it sees that hash, since native anchor navigation doesn't reach into the app's own scroll container).
44

55
## Data ownership
66

src/components/Roadmap/TeamQuarterSection.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const TeamCard = ({
2828
aria-haspopup="dialog"
2929
aria-expanded={active}
3030
onClick={onClick}
31-
className={`flex w-full items-center gap-2.5 rounded-md border border-primary p-2.5 text-left hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-red dark:focus-visible:ring-yellow ${
31+
className={`flex w-full items-center gap-3 rounded-md border border-primary p-3 text-left hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-red dark:focus-visible:ring-yellow ${
3232
active ? 'bg-accent' : 'bg-primary'
3333
}`}
3434
>
@@ -70,9 +70,9 @@ const TeamQuarterSection = ({
7070
onTeamClick: (slug: string) => void
7171
}): JSX.Element => (
7272
<section aria-labelledby="teams" className="flex flex-col gap-3">
73-
<header className="px-1">
73+
<header className="px-2">
7474
<div className="flex flex-wrap items-baseline gap-x-3 gap-y-1">
75-
<h2 id="teams" className="m-0 text-xl text-primary">
75+
<h2 id="teams" className="m-0 scroll-mt-4 text-xl text-primary">
7676
What teams are working on this quarter
7777
</h2>
7878
<span className="shrink-0 whitespace-nowrap text-sm text-secondary">
@@ -88,7 +88,7 @@ const TeamQuarterSection = ({
8888
</p>
8989
</header>
9090
{teams.length === 0 ? (
91-
<p className="m-0 px-1 text-sm text-muted">No teams match.</p>
91+
<p className="m-0 px-2 text-sm text-muted">No teams match.</p>
9292
) : (
9393
<ul className="m-0 grid list-none grid-cols-2 gap-2 p-0 @xl:grid-cols-3 @3xl:grid-cols-4 @5xl:grid-cols-6">
9494
{teams.map((team) => (

src/pages/roadmap/index.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from 'react'
1+
import React, { useEffect } from 'react'
22
import { IconChevronDown } from '@posthog/icons'
33
import Editor from 'components/Editor'
44
import OSButton from 'components/OSButton'
@@ -16,6 +16,16 @@ const RoadmapPage = () => {
1616
target.scrollIntoView({ behavior: reduceMotion ? 'auto' : 'smooth', block: 'start' })
1717
}
1818

19+
// /wip redirects to /roadmap#teams; the Editor scrolls in its own viewport, so native
20+
// anchor navigation doesn't reach the heading — scroll it into view after first paint.
21+
useEffect(() => {
22+
if (window.location.hash !== '#teams') {
23+
return
24+
}
25+
const timeout = window.setTimeout(scrollToTeamGoals, 100)
26+
return () => window.clearTimeout(timeout)
27+
}, [])
28+
1929
return (
2030
<>
2131
<SEO

vercel.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1705,7 +1705,7 @@
17051705
},
17061706
{
17071707
"source": "/wip",
1708-
"destination": "/roadmap"
1708+
"destination": "/roadmap#teams"
17091709
},
17101710
{
17111711
"source": "/handbook/company/diversity",

0 commit comments

Comments
 (0)