Skip to content

Commit 54cf1f2

Browse files
ostermanclaude
andcommitted
fix(roadmap): address CodeRabbit review feedback
- Add target="_blank" and rel="noopener noreferrer" to external GitHub links in FeaturedSection.tsx (PRD and PR links) - Add target="_blank" and rel="noopener noreferrer" to external GitHub links in InitiativeCard.tsx (issues and PRs) - Add target="_blank" and rel="noopener noreferrer" to external GitHub links in FeaturedDrawer.tsx (PRD and PR links) - Guard against division by zero in RoadmapStats.tsx progress bar width calculations 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 71f352a commit 54cf1f2

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

website/src/components/Roadmap/FeaturedDrawer.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,8 @@ export default function FeaturedDrawer({
160160
<Link
161161
to={`https://github.com/cloudposse/atmos/blob/main/docs/prd/${item.prd}.md`}
162162
className={styles.drawerLinkButton}
163+
target="_blank"
164+
rel="noopener noreferrer"
163165
>
164166
<RiFileTextLine />
165167
<span>View PRD</span>
@@ -169,6 +171,8 @@ export default function FeaturedDrawer({
169171
<Link
170172
to={`https://github.com/cloudposse/atmos/pull/${item.pr}`}
171173
className={styles.drawerLinkButton}
174+
target="_blank"
175+
rel="noopener noreferrer"
172176
>
173177
<RiGitPullRequestLine />
174178
<span>View PR #{item.pr}</span>

website/src/components/Roadmap/FeaturedSection.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ export default function FeaturedSection({ items }: FeaturedSectionProps): JSX.El
128128
className={styles.featuredLink}
129129
title="View PRD"
130130
onClick={(e) => e.stopPropagation()}
131+
target="_blank"
132+
rel="noopener noreferrer"
131133
>
132134
<RiFileTextLine />
133135
</Link>
@@ -138,6 +140,8 @@ export default function FeaturedSection({ items }: FeaturedSectionProps): JSX.El
138140
className={styles.featuredLink}
139141
title={`View PR #${item.pr}`}
140142
onClick={(e) => e.stopPropagation()}
143+
target="_blank"
144+
rel="noopener noreferrer"
141145
>
142146
<RiGitPullRequestLine />
143147
</Link>

website/src/components/Roadmap/InitiativeCard.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,8 @@ export default function InitiativeCard({
146146
to={`https://github.com/cloudposse/atmos/issues/${issue}`}
147147
className={styles.initiativeIssueLink}
148148
onClick={(e) => e.stopPropagation()}
149+
target="_blank"
150+
rel="noopener noreferrer"
149151
>
150152
#{issue}
151153
</Link>
@@ -165,6 +167,8 @@ export default function InitiativeCard({
165167
to={`https://github.com/cloudposse/atmos/pull/${pr.number}`}
166168
className={styles.initiativePrLink}
167169
onClick={(e) => e.stopPropagation()}
170+
target="_blank"
171+
rel="noopener noreferrer"
168172
>
169173
#{pr.number}
170174
</Link>

website/src/components/Roadmap/RoadmapStats.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,13 @@ export default function RoadmapStats({ initiatives }: RoadmapStatsProps): JSX.El
6060
<motion.div
6161
className={styles.statsProgressShipped}
6262
initial={{ width: 0 }}
63-
animate={{ width: `${(stats.shipped / stats.total) * 100}%` }}
63+
animate={{ width: `${stats.total > 0 ? (stats.shipped / stats.total) * 100 : 0}%` }}
6464
transition={{ duration: 0.8, ease: 'easeOut' }}
6565
/>
6666
<motion.div
6767
className={styles.statsProgressInProgress}
6868
initial={{ width: 0 }}
69-
animate={{ width: `${(stats.inProgress / stats.total) * 100}%` }}
69+
animate={{ width: `${stats.total > 0 ? (stats.inProgress / stats.total) * 100 : 0}%` }}
7070
transition={{ duration: 0.8, ease: 'easeOut', delay: 0.2 }}
7171
/>
7272
</div>

0 commit comments

Comments
 (0)