Skip to content

Commit c0d0063

Browse files
Add team-goals shortcuts to the toolbar and page header
When the team select has a team chosen, a "View team goals" button beside it opens that team's drawer. The page header gains a "Jump to this quarter's team goals" control that scrolls the Editor viewport to the teams grid, respecting reduced motion. Generated-By: PostHog Code Task-Id: 9ecd4529-67fb-4091-9d52-2f321cccc016
1 parent c63da2b commit c0d0063

3 files changed

Lines changed: 37 additions & 3 deletions

File tree

src/components/Roadmap/EarlyAccessFeaturesSection.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,6 +1003,7 @@ export default function EarlyAccessFeaturesSection(): JSX.Element | null {
10031003
teamFilter === 'all' ? true : teamFilter === 'unassigned' ? false : team.slug === teamFilter
10041004
return matchesQuery && matchesTeamSelect
10051005
})
1006+
const filterGridTeam = gridTeams.find((team) => team.slug === teamFilter)
10061007

10071008
const openFeature = (feature: EarlyAccessFeature) => {
10081009
setSelectedFlagKey(feature.flagKey)
@@ -1070,6 +1071,18 @@ export default function EarlyAccessFeaturesSection(): JSX.Element | null {
10701071
className="!h-10 w-full max-w-full overflow-hidden !rounded-[8px] px-3 [&>span]:min-w-0 [&>span]:truncate"
10711072
/>
10721073
</div>
1074+
{filterGridTeam && (
1075+
<OSButton
1076+
data-roadmap-item=""
1077+
type="button"
1078+
size="md"
1079+
variant="secondary"
1080+
className="!h-10 shrink-0"
1081+
onClick={() => openTeam(filterGridTeam.slug)}
1082+
>
1083+
View team goals
1084+
</OSButton>
1085+
)}
10731086
<span className="ml-auto shrink-0 whitespace-nowrap text-sm text-secondary">
10741087
{filteredTotal} of {total} features
10751088
</span>

src/components/Roadmap/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Below the board, `TeamQuarterSection` renders one compact card per team: mini cr
3535

3636
## Filtering
3737

38-
One search query is applied before grouping into lanes. It matches the title, full description, flag key, and owning team name — and, for the team grid, the team name. Search is cleared directly from the search field. The team selector is applied at the same time and filters both surfaces: it lists every grid team (with its feature count, zero allowed) plus any feature-owning slugs without a grid card, includes an `Unassigned` option when necessary (which matches no grid card), and resets through its `All teams` option. Neither control adds a redundant filter chip below the toolbar. The toolbar uses the same primary surface as each lane header, and its rounded search and team controls share one height. Counts always reflect both filters. Empty lanes stay visually empty rather than adding a redundant no-results message; their zero count already communicates the state.
38+
One search query is applied before grouping into lanes. It matches the title, full description, flag key, and owning team name — and, for the team grid, the team name. Search is cleared directly from the search field. The team selector is applied at the same time and filters both surfaces: it lists every grid team (with its feature count, zero allowed) plus any feature-owning slugs without a grid card, includes an `Unassigned` option when necessary (which matches no grid card), and resets through its `All teams` option. When the selected team has a grid card, a `View team goals` button appears beside the selector and opens that team's drawer; it carries `data-roadmap-item` so the outside-click closer ignores it. The page header (in `src/pages/roadmap/index.js`) offers a matching jump control that scrolls the Editor viewport to the grid's `#teams` heading, respecting reduced motion. Neither control adds a redundant filter chip below the toolbar. The toolbar uses the same primary surface as each lane header, and its rounded search and team controls share one height. Counts always reflect both filters. Empty lanes stay visually empty rather than adding a redundant no-results message; their zero count already communicates the state.
3939

4040
Featured ordering is preserved within each lane: new cards lead, and joinable alpha/concept items lead their stage. There are no stage or sorting controls because the lanes themselves communicate stage.
4141

src/pages/roadmap/index.js

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,21 @@
11
import React from 'react'
2+
import { IconChevronDown } from '@posthog/icons'
23
import Editor from 'components/Editor'
4+
import OSButton from 'components/OSButton'
35
import SEO from 'components/seo'
46
import EarlyAccessFeaturesSection from 'components/Roadmap/EarlyAccessFeaturesSection'
57
import { ROADMAP_STAGE_STYLES } from 'components/Roadmap/roadmapStageStyles'
68

79
const RoadmapPage = () => {
10+
const scrollToTeamGoals = () => {
11+
const target = document.getElementById('teams')
12+
if (!target) {
13+
return
14+
}
15+
const reduceMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches
16+
target.scrollIntoView({ behavior: reduceMotion ? 'auto' : 'smooth', block: 'start' })
17+
}
18+
819
return (
920
<>
1021
<SEO
@@ -32,8 +43,7 @@ const RoadmapPage = () => {
3243
<h1 className="m-0 text-2xl @xl:text-3xl">Roadmap</h1>
3344
<p className="mb-0 mt-2 max-w-5xl text-base leading-relaxed text-secondary">
3445
Here's what we're building. Betas are ready to enable today, and anything coming soon
35-
has a waitlist. Drop your email and we'll let you know the moment it ships. Further
36-
down, see what every team is working on this quarter.
46+
has a waitlist. Drop your email and we'll let you know the moment it ships.
3747
</p>
3848
<p className="mb-0 mt-3 max-w-5xl text-sm leading-relaxed text-secondary">
3949
Every feature moves through stages:{' '}
@@ -56,6 +66,17 @@ const RoadmapPage = () => {
5666
</span>{' '}
5767
is ready to try, and then it reaches general availability.
5868
</p>
69+
<div className="mt-3">
70+
<OSButton
71+
type="button"
72+
size="sm"
73+
variant="secondary"
74+
icon={<IconChevronDown />}
75+
onClick={scrollToTeamGoals}
76+
>
77+
Jump to this quarter's team goals
78+
</OSButton>
79+
</div>
5980
</div>
6081
<img
6182
src="https://res.cloudinary.com/dmukukwp6/image/upload/w_1000,c_limit,q_auto,f_auto/self_driving_with_road_3ff29b8dc3.png"

0 commit comments

Comments
 (0)