Spaces:
Sleeping
Sleeping
Commit ·
a88c856
1
Parent(s): ed78629
Mirror feed: gradient fade on 3rd item with Show more overlay
Browse filesReplace the separate button with a gradient that fades the bottom of the
3rd card from transparent to the page background (#0f1117), with a "Show more"
pill overlaid on it. Clicking anywhere on the gradient expands the feed.
"Show less" appears as a plain text link below when expanded.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
frontend/src/components/ProfileView.jsx
CHANGED
|
@@ -153,35 +153,55 @@ function MirrorFeed({ insights }) {
|
|
| 153 |
|
| 154 |
const hasMore = insights.length > FEED_MIN_VISIBLE
|
| 155 |
const visible = expanded ? insights : insights.slice(0, FEED_MIN_VISIBLE)
|
| 156 |
-
const hiddenCount = insights.length - FEED_MIN_VISIBLE
|
| 157 |
|
| 158 |
return (
|
| 159 |
<div>
|
| 160 |
-
<div style={{
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 166 |
</div>
|
| 167 |
|
| 168 |
-
{
|
|
|
|
| 169 |
<button
|
| 170 |
-
onClick={() => setExpanded(
|
| 171 |
style={{
|
| 172 |
-
marginTop:
|
| 173 |
-
|
| 174 |
-
|
| 175 |
-
color: "#4a4865", transition: "all 0.15s",
|
| 176 |
-
display: "flex", alignItems: "center", justifyContent: "center", gap: 6,
|
| 177 |
}}
|
| 178 |
-
onMouseEnter={e => { e.currentTarget.style.borderColor = "#2e3450"; e.currentTarget.style.color = "#8b89aa" }}
|
| 179 |
-
onMouseLeave={e => { e.currentTarget.style.borderColor = "#1e2438"; e.currentTarget.style.color = "#4a4865" }}
|
| 180 |
>
|
| 181 |
-
|
| 182 |
-
transform: expanded ? "rotate(180deg)" : "rotate(0deg)",
|
| 183 |
-
transition: "transform 0.2s", fontSize: 10 }}>▼</span>
|
| 184 |
-
{expanded ? "Show less" : `Show ${hiddenCount} more`}
|
| 185 |
</button>
|
| 186 |
)}
|
| 187 |
</div>
|
|
|
|
| 153 |
|
| 154 |
const hasMore = insights.length > FEED_MIN_VISIBLE
|
| 155 |
const visible = expanded ? insights : insights.slice(0, FEED_MIN_VISIBLE)
|
|
|
|
| 156 |
|
| 157 |
return (
|
| 158 |
<div>
|
| 159 |
+
<div style={{ position: "relative" }}>
|
| 160 |
+
<div style={{ background: "#151922", border: "1px solid #1e2438",
|
| 161 |
+
borderRadius: 12, overflow: "hidden",
|
| 162 |
+
boxShadow: "0 2px 16px rgba(0,0,0,0.3)" }}>
|
| 163 |
+
{visible.map((insight, i) => (
|
| 164 |
+
<MirrorFeedItem key={insight.signal || i} insight={insight} i={i} total={visible.length} />
|
| 165 |
+
))}
|
| 166 |
+
</div>
|
| 167 |
+
|
| 168 |
+
{/* Gradient fade over last item with Show more pill */}
|
| 169 |
+
{hasMore && !expanded && (
|
| 170 |
+
<div
|
| 171 |
+
onClick={() => setExpanded(true)}
|
| 172 |
+
style={{
|
| 173 |
+
position: "absolute", bottom: 0, left: 0, right: 0,
|
| 174 |
+
height: 90,
|
| 175 |
+
background: "linear-gradient(to bottom, transparent, #0f1117)",
|
| 176 |
+
borderRadius: "0 0 12px 12px",
|
| 177 |
+
display: "flex", alignItems: "flex-end",
|
| 178 |
+
justifyContent: "center", paddingBottom: 14,
|
| 179 |
+
cursor: "pointer",
|
| 180 |
+
}}
|
| 181 |
+
>
|
| 182 |
+
<span style={{
|
| 183 |
+
fontSize: 12, fontWeight: 600, color: "#5b9cf6",
|
| 184 |
+
background: "rgba(15,17,23,0.85)",
|
| 185 |
+
border: "1px solid rgba(29,78,216,0.3)",
|
| 186 |
+
borderRadius: 20, padding: "5px 18px",
|
| 187 |
+
}}>
|
| 188 |
+
Show more
|
| 189 |
+
</span>
|
| 190 |
+
</div>
|
| 191 |
+
)}
|
| 192 |
</div>
|
| 193 |
|
| 194 |
+
{/* Show less — simple link below when expanded */}
|
| 195 |
+
{expanded && hasMore && (
|
| 196 |
<button
|
| 197 |
+
onClick={() => setExpanded(false)}
|
| 198 |
style={{
|
| 199 |
+
marginTop: 8, background: "none", border: "none",
|
| 200 |
+
cursor: "pointer", fontSize: 12, color: "#4a4865",
|
| 201 |
+
display: "block", width: "100%", textAlign: "center", padding: "6px 0",
|
|
|
|
|
|
|
| 202 |
}}
|
|
|
|
|
|
|
| 203 |
>
|
| 204 |
+
Show less
|
|
|
|
|
|
|
|
|
|
| 205 |
</button>
|
| 206 |
)}
|
| 207 |
</div>
|