Skip to content

Commit 6994633

Browse files
committed
Improve layout by switching to stacked design
LAYOUT IMPROVEMENTS: - Removed problematic side-by-side layout that wasn't working well - Switched to clean stacked layout across all screen sizes - Removed sticky positioning that was causing layout issues - Simplified to natural top-to-bottom reading flow BENEFITS: - Better use of horizontal space - Natural reading flow (passage → questions) - No layout conflicts or z-index issues - Consistent experience across all devices - Cleaner, more focused design - Better learning UX following reading patterns The stacked layout provides a much better user experience with natural reading flow and eliminates layout issues.
1 parent fe6fd6b commit 6994633

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

app/components/TextGenerator/ReadingPassage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const ReadingPassage = () => {
3838

3939
return (
4040
<div data-testid="reading-passage" className="mb-6 lg:mb-0">
41-
<div className="lg:sticky lg:top-4 lg:z-10">
41+
<div>
4242
<div className="flex items-center justify-between mb-4">
4343
<div className="flex items-center text-blue-400">
4444
<BookOpenIcon className="w-5 h-5 mr-2 hidden sm:inline-flex" />

app/components/TextGenerator/TextGeneratorContainer.tsx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -86,19 +86,17 @@ const TextGeneratorContainer = () => {
8686
data-testid="generated-content"
8787
ref={generatedContentRef}
8888
>
89-
<div className="flex flex-col lg:flex-row lg:gap-8 lg:items-start">
89+
<div className="flex flex-col gap-6">
9090
<motion.div
91-
className="lg:w-2/5 lg:sticky lg:top-4 lg:self-start lg:max-h-screen lg:overflow-y-auto"
92-
initial={{ opacity: 0, x: -20 }}
93-
animate={{ opacity: 1, x: 0 }}
91+
initial={{ opacity: 0, y: -20 }}
92+
animate={{ opacity: 1, y: 0 }}
9493
transition={{ duration: 0.6, delay: 0.1 }}
9594
>
9695
<ReadingPassage />
9796
</motion.div>
9897
<motion.div
99-
className="lg:w-3/5 lg:pl-4 lg:min-h-0"
100-
initial={{ opacity: 0, x: 20 }}
101-
animate={{ opacity: 1, x: 0 }}
98+
initial={{ opacity: 0, y: 20 }}
99+
animate={{ opacity: 1, y: 0 }}
102100
transition={{ duration: 0.6, delay: 0.2 }}
103101
>
104102
<QuizSection />

0 commit comments

Comments
 (0)