Skip to content

Improve rendering and JS performance for verse lists - #7

Draft
maktoufzied wants to merge 2 commits into
saikothasan:mainfrom
maktoufzied:feature/improve-rendering-performance
Draft

Improve rendering and JS performance for verse lists#7
maktoufzied wants to merge 2 commits into
saikothasan:mainfrom
maktoufzied:feature/improve-rendering-performance

Conversation

@maktoufzied

Copy link
Copy Markdown
  • Add content-visibility: auto to verse containers to skip rendering off-screen verses (surahs can have 200+ verses)
  • Use direct array index instead of .find() for surah lookup in API routes since surah IDs are sequential 1-114

- Add content-visibility: auto to verse containers to skip rendering
  off-screen verses (surahs can have 200+ verses)
- Use direct array index instead of .find() for surah lookup in API routes
  since surah IDs are sequential 1-114
The content-visibility optimization conflicts with framer-motion's
AnimatePresence and could cause visual glitches with fade animations.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant