Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions src/components/miners/MinerPRsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -579,12 +579,18 @@ const MinerPRsTable: React.FC<MinerPRsTableProps> = ({ githubId }) => {
<Box
sx={{
display: 'flex',
gap: { xs: 0.75, sm: 0.5 },
flexWrap: 'wrap',
width: { xs: '100%', sm: 'auto' },
flexWrap: 'nowrap',
gap: 0.75,
width: '100%',
maxWidth: '100%',
minWidth: 0,
overflowX: 'auto',
WebkitOverflowScrolling: 'touch',
scrollbarWidth: 'none',
msOverflowStyle: 'none',
'&::-webkit-scrollbar': { display: 'none' },
'& > .MuiButton-root': {
flex: { xs: 1, sm: 'none' },
minWidth: 0,
flexShrink: 0,
},
}}
>
Expand Down
32 changes: 26 additions & 6 deletions src/components/miners/MinerRepoStandings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -389,14 +389,14 @@ const MinerRepoStandings: React.FC<MinerRepoStandingsProps> = ({
>
<Box
sx={{
p: 3,
p: { xs: 2, sm: 3 },
borderBottom: '1px solid',
borderColor: 'border.light',
display: 'flex',
alignItems: 'center',
flexDirection: { xs: 'column', sm: 'row' },
alignItems: { xs: 'stretch', sm: 'center' },
justifyContent: 'space-between',
gap: 2,
flexWrap: 'wrap',
}}
>
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 0.4 }}>
Expand Down Expand Up @@ -434,11 +434,30 @@ const MinerRepoStandings: React.FC<MinerRepoStandingsProps> = ({
</Box>

{rows.length > 0 && (
<Box sx={{ display: 'flex', alignItems: 'center', gap: 1 }}>
<Box
sx={{
display: 'flex',
alignItems: 'center',
gap: 1,
width: { xs: '100%', sm: 'auto' },
minWidth: 0,
overflowX: 'auto',
flexWrap: 'nowrap',
WebkitOverflowScrolling: 'touch',
scrollbarWidth: 'none',
msOverflowStyle: 'none',
'&::-webkit-scrollbar': { display: 'none' },
'& > *': { flexShrink: 0 },
}}
>
{view === 'cards' && (
<>
<Typography
sx={{ fontSize: '0.92rem', color: 'text.secondary' }}
sx={{
display: { xs: 'none', sm: 'block' },
fontSize: '0.92rem',
color: 'text.secondary',
}}
>
Sort:
</Typography>
Expand Down Expand Up @@ -491,7 +510,7 @@ const MinerRepoStandings: React.FC<MinerRepoStandingsProps> = ({
: 'background.default',
fontSize: '0.8rem',
height: 32,
minWidth: 156,
minWidth: { xs: 120, sm: 156 },
borderRadius: 2,
'& .MuiOutlinedInput-notchedOutline': {
borderColor: isSortMenuOpen
Expand Down Expand Up @@ -551,6 +570,7 @@ const MinerRepoStandings: React.FC<MinerRepoStandingsProps> = ({
size="small"
aria-label="Standings view"
sx={{
flexShrink: 0,
'& .MuiToggleButton-root': {
color: 'text.secondary',
borderColor: 'border.light',
Expand Down
127 changes: 60 additions & 67 deletions src/pages/MinerDetailsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,79 +103,17 @@ const MinerDetailsPage: React.FC = () => {
px: { xs: 2, md: 0 },
}}
>
{/* ── Header: back · mode toggle · watch ─────────────── */}
<Box
sx={{
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
gap: 2,
flexWrap: 'wrap',
}}
>
<BackButton to="/repositories" />
{/* ── Header: back + watch on one row; mode toggle below ─ */}
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 1.5 }}>
<Box
sx={{
display: 'flex',
alignItems: 'center',
gap: 1.5,
flexWrap: 'wrap',
justifyContent: 'space-between',
gap: 2,
}}
>
{/* Mode toggle — a real page-level axis, not a stat */}
<Box
sx={{
display: 'flex',
gap: 0.5,
backgroundColor: 'surface.subtle',
p: 0.5,
borderRadius: 2,
}}
>
{(
[
{ label: 'OSS Contributions', value: 'prs' as const },
{ label: 'Issue Discovery', value: 'issues' as const },
] as const
).map((option) => {
const isActive = viewMode === option.value;
return (
<LinkBox
key={option.value}
href={buildModeHref(option.value)}
replace
sx={{
px: 2,
py: 0.75,
borderRadius: 1.5,
cursor: 'pointer',
backgroundColor: isActive
? 'surface.elevated'
: 'transparent',
color: isActive
? 'text.primary'
: (t) => alpha(t.palette.text.primary, 0.5),
transition: 'all 0.2s',
'&:hover': {
backgroundColor: 'surface.elevated',
color: 'text.primary',
},
}}
>
<Typography
sx={{
fontSize: '0.8rem',
fontWeight: 600,
textAlign: 'center',
whiteSpace: 'nowrap',
}}
>
{option.label}
</Typography>
</LinkBox>
);
})}
</Box>
<BackButton to="/repositories" />
{minerExists && (
<WatchlistButton
category="miners"
Expand All @@ -184,6 +122,61 @@ const MinerDetailsPage: React.FC = () => {
/>
)}
</Box>
<Box
sx={{
display: 'flex',
gap: 0.5,
backgroundColor: 'surface.subtle',
p: 0.5,
borderRadius: 2,
alignSelf: { xs: 'stretch', sm: 'flex-start' },
}}
>
{(
[
{ label: 'OSS Contributions', value: 'prs' as const },
{ label: 'Issue Discovery', value: 'issues' as const },
] as const
).map((option) => {
const isActive = viewMode === option.value;
return (
<LinkBox
key={option.value}
href={buildModeHref(option.value)}
replace
sx={{
flex: 1,
px: 2,
py: 0.75,
borderRadius: 1.5,
cursor: 'pointer',
backgroundColor: isActive
? 'surface.elevated'
: 'transparent',
color: isActive
? 'text.primary'
: (t) => alpha(t.palette.text.primary, 0.5),
transition: 'all 0.2s',
'&:hover': {
backgroundColor: 'surface.elevated',
color: 'text.primary',
},
}}
>
<Typography
sx={{
fontSize: '0.8rem',
fontWeight: 600,
textAlign: 'center',
whiteSpace: { xs: 'normal', sm: 'nowrap' },
}}
>
{option.label}
</Typography>
</LinkBox>
);
})}
</Box>
</Box>

{/* ── Two-column shell: main + sticky identity rail ──── */}
Expand Down
Loading