A scroll-aware floating header feature has been added to the note-taking application. This header fades out during downward scrolling and fades back in when scrolling upward, enhancing the reading experience without causing layout shifts.
Technical Approach
The floating header is implemented using a ZStack overlay, which prevents jarring content jumps during scroll events. A ScrollDirection enum has been introduced to track scrolling behavior, while an onScroll callback chain facilitates communication between the WYSIWYGTextView and the MarkdownEditorView.
Technical Details
- Header fades out when scrolling down and fades in when scrolling up.
- Top inset parameter added to push editor content below the floating header.
- Subtle white gradient fade implemented below the header for visual transition.
- Header automatically reappears when scrolled near the top (offset < 50).
- CLAUDE.md updated with detailed implementation documentation.