Spaces:
Running
Running
fix: stagger sequence now guaranteed via inline animationDelay
Browse filesnth-child CSS approach was unreliable — the Python replacement script
cascaded 140ms→240ms→400ms making card 3 appear last (400ms = same as 5).
Fix: set animationDelay inline from map() index in App.jsx so the
1,2,3,4,5 order is always correct regardless of DOM structure.
80ms base + 80ms per card = 80/160/240/320/400ms.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- ui/src/App.jsx +6 -3
- ui/src/index.css +2 -6
ui/src/App.jsx
CHANGED
|
@@ -740,10 +740,11 @@ export default function App() {
|
|
| 740 |
{ icon: "entry", title: "Entry points", body: "Find all main entry points across repos" },
|
| 741 |
{ icon: "config", title: "Configuration", body: "How do these repos handle env & config?" },
|
| 742 |
{ icon: "pattern", title: "Design patterns", body: "Common abstractions across all repos" },
|
| 743 |
-
].map(({ icon, title, body }) => {
|
| 744 |
const q = `${title}: ${body}`;
|
| 745 |
return (
|
| 746 |
<button key={title} className="suggestion-btn"
|
|
|
|
| 747 |
onClick={() => { setInput(q); textareaRef.current?.focus(); }}>
|
| 748 |
<span className="suggestion-icon">{ICONS[icon]}</span>
|
| 749 |
<span className="suggestion-content">
|
|
@@ -816,10 +817,11 @@ export default function App() {
|
|
| 816 |
{ icon: "diagram", title: "Generate a diagram", body: "Visual map of the main components" },
|
| 817 |
{ icon: "shield", title: "Error handling", body: "How edge cases are managed across the codebase" },
|
| 818 |
{ icon: "flow", title: "Data flow", body: "How data moves from input to final result" },
|
| 819 |
-
].map(({ icon, title, body }) => {
|
| 820 |
const q = `${title}: ${body}`;
|
| 821 |
return (
|
| 822 |
<button key={title} className="suggestion-btn"
|
|
|
|
| 823 |
onClick={() => { setInput(q); textareaRef.current?.focus(); }}>
|
| 824 |
<span className="suggestion-icon">{ICONS[icon]}</span>
|
| 825 |
<span className="suggestion-content">
|
|
@@ -844,10 +846,11 @@ export default function App() {
|
|
| 844 |
{ icon: "classes", title: "Key classes", body: "What each major class does" },
|
| 845 |
{ icon: "flow", title: "Data processing", body: "How data is transformed through the system" },
|
| 846 |
{ icon: "package", title: "Dependencies", body: "External libraries and how they're used" },
|
| 847 |
-
].map(({ icon, title, body }) => {
|
| 848 |
const q = `${title}: ${body}`;
|
| 849 |
return (
|
| 850 |
<button key={title} className="suggestion-btn"
|
|
|
|
| 851 |
onClick={() => { setInput(q); textareaRef.current?.focus(); }}>
|
| 852 |
<span className="suggestion-icon">{ICONS[icon]}</span>
|
| 853 |
<span className="suggestion-content">
|
|
|
|
| 740 |
{ icon: "entry", title: "Entry points", body: "Find all main entry points across repos" },
|
| 741 |
{ icon: "config", title: "Configuration", body: "How do these repos handle env & config?" },
|
| 742 |
{ icon: "pattern", title: "Design patterns", body: "Common abstractions across all repos" },
|
| 743 |
+
].map(({ icon, title, body }, i) => {
|
| 744 |
const q = `${title}: ${body}`;
|
| 745 |
return (
|
| 746 |
<button key={title} className="suggestion-btn"
|
| 747 |
+
style={{ animationDelay: `${80 + i * 80}ms` }}
|
| 748 |
onClick={() => { setInput(q); textareaRef.current?.focus(); }}>
|
| 749 |
<span className="suggestion-icon">{ICONS[icon]}</span>
|
| 750 |
<span className="suggestion-content">
|
|
|
|
| 817 |
{ icon: "diagram", title: "Generate a diagram", body: "Visual map of the main components" },
|
| 818 |
{ icon: "shield", title: "Error handling", body: "How edge cases are managed across the codebase" },
|
| 819 |
{ icon: "flow", title: "Data flow", body: "How data moves from input to final result" },
|
| 820 |
+
].map(({ icon, title, body }, i) => {
|
| 821 |
const q = `${title}: ${body}`;
|
| 822 |
return (
|
| 823 |
<button key={title} className="suggestion-btn"
|
| 824 |
+
style={{ animationDelay: `${80 + i * 80}ms` }}
|
| 825 |
onClick={() => { setInput(q); textareaRef.current?.focus(); }}>
|
| 826 |
<span className="suggestion-icon">{ICONS[icon]}</span>
|
| 827 |
<span className="suggestion-content">
|
|
|
|
| 846 |
{ icon: "classes", title: "Key classes", body: "What each major class does" },
|
| 847 |
{ icon: "flow", title: "Data processing", body: "How data is transformed through the system" },
|
| 848 |
{ icon: "package", title: "Dependencies", body: "External libraries and how they're used" },
|
| 849 |
+
].map(({ icon, title, body }, i) => {
|
| 850 |
const q = `${title}: ${body}`;
|
| 851 |
return (
|
| 852 |
<button key={title} className="suggestion-btn"
|
| 853 |
+
style={{ animationDelay: `${80 + i * 80}ms` }}
|
| 854 |
onClick={() => { setInput(q); textareaRef.current?.focus(); }}>
|
| 855 |
<span className="suggestion-icon">{ICONS[icon]}</span>
|
| 856 |
<span className="suggestion-content">
|
ui/src/index.css
CHANGED
|
@@ -1543,16 +1543,12 @@ textarea:focus-visible {
|
|
| 1543 |
margin-bottom: 18px;
|
| 1544 |
}
|
| 1545 |
|
| 1546 |
-
/* Staggered entrance —
|
|
|
|
| 1547 |
@keyframes suggestionIn {
|
| 1548 |
from { opacity: 0; transform: translateY(10px); }
|
| 1549 |
to { opacity: 1; transform: translateY(0); }
|
| 1550 |
}
|
| 1551 |
-
.suggestions .suggestion-btn:nth-child(1) { animation-delay: 80ms; }
|
| 1552 |
-
.suggestions .suggestion-btn:nth-child(2) { animation-delay: 160ms; }
|
| 1553 |
-
.suggestions .suggestion-btn:nth-child(3) { animation-delay: 400ms; }
|
| 1554 |
-
.suggestions .suggestion-btn:nth-child(4) { animation-delay: 320ms; }
|
| 1555 |
-
.suggestions .suggestion-btn:nth-child(5) { animation-delay: 400ms; }
|
| 1556 |
|
| 1557 |
.suggestion-btn {
|
| 1558 |
display: flex;
|
|
|
|
| 1543 |
margin-bottom: 18px;
|
| 1544 |
}
|
| 1545 |
|
| 1546 |
+
/* Staggered entrance — delay set inline via animationDelay style prop in App.jsx
|
| 1547 |
+
so index-based order is always guaranteed correct */
|
| 1548 |
@keyframes suggestionIn {
|
| 1549 |
from { opacity: 0; transform: translateY(10px); }
|
| 1550 |
to { opacity: 1; transform: translateY(0); }
|
| 1551 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1552 |
|
| 1553 |
.suggestion-btn {
|
| 1554 |
display: flex;
|