Skip to content

Commit f8e44c2

Browse files
refactor(ui): rename impl nav back-link to .compare() and align divider
Renames the library-selector back-link from "impls.all()" to ".compare()", since the prior name read as internal jargon rather than describing what the target view does (compare all library implementations for the spec). Also offsets the vertical divider's right margin by -5 px to compensate for the previous IconButton's internal left padding, which was pushing the chevron visually farther from the divider than the back-link text on the left and made the rule look off-center. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 4f8fa24 commit f8e44c2

1 file changed

Lines changed: 6 additions & 9 deletions

File tree

app/src/components/LibraryPills.tsx

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export const LibraryPills = memo(function LibraryPills({
102102
role="button"
103103
tabIndex={0}
104104
onKeyDown={(e: React.KeyboardEvent) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); onAll(); } }}
105-
aria-label="Back to all implementations"
105+
aria-label="Back to library comparison"
106106
sx={{
107107
display: 'inline-flex',
108108
alignItems: 'center',
@@ -113,22 +113,19 @@ export const LibraryPills = memo(function LibraryPills({
113113
cursor: 'pointer',
114114
whiteSpace: 'nowrap',
115115
transition: 'color 0.2s',
116-
'& .all-subject': { opacity: 0.7, transition: 'opacity 0.2s' },
117116
'& .all-arrow': { transition: 'transform 0.2s' },
118117
'&:hover': { color: colors.primary },
119-
'&:hover .all-subject': { opacity: 1 },
120118
'&:hover .all-arrow': { transform: 'translateX(-3px)' },
121119
'&:focus-visible': { outline: `2px solid ${colors.primary}`, outlineOffset: 2, borderRadius: '2px' },
122120
}}
123121
>
124122
<Box component="span" className="all-arrow"></Box>
125-
<Box component="span">
126-
<Box component="span" className="all-subject">impls</Box>
127-
.all()
128-
</Box>
123+
<Box component="span">.compare()</Box>
129124
</Box>
130-
{/* Divider only on ≥sm where the row is horizontal */}
131-
<Box sx={{ height: 20, width: '1px', bgcolor: 'var(--rule)', mx: 1.5, display: { xs: 'none', sm: 'block' } }} />
125+
{/* Vertical divider. Asymmetric mx compensates for the prev IconButton's
126+
~5 px internal left padding so the visible whitespace on either side
127+
of the rule is equal. */}
128+
<Box sx={{ height: 20, width: '1px', bgcolor: 'var(--rule)', ml: 1.5, mr: '7px', display: { xs: 'none', sm: 'block' } }} />
132129
</>
133130
)}
134131

0 commit comments

Comments
 (0)