discourse/app
David Taylor bdec564d14
DEV: Refactor header topic-info handling (#27989)
- Move topic-title on-screen detection to intersection-observer (via new modifier), and add a boolean to header service which indicates whether it's on-screen

- Move scroll-direction from Mixin to dedicated service. Teach it to pause scroll monitoring while transitions are in progress, to avoid reporting false changes in scroll direction. Also resets to a 'neutral' state after each navigation, which indicates the the user has not yet scrolled

- When entering a topic view, notify the header service which post is being targeted. It can then make an educated guess about whether the topic title is likely to be in-view

- Update header service `topicInfoVisible` to be a declarative getter, based on the three refactored sources of truth mentioned above

- Update legacy widget header to use the header service for topic info

All of these changes mean that the header no longer 'flickers' when navigating into topics on mobile. As well as the improved UX, this should also improve our Cumulative Layout Shift (CLS) web vital metrics.
2024-07-23 10:24:44 +01:00
..
assets DEV: Refactor header topic-info handling (#27989) 2024-07-23 10:24:44 +01:00
controllers FIX: return is invalid inside a block (#28036) 2024-07-23 09:56:38 +02:00
helpers UX: Use localized time format in embedded comments (#28014) 2024-07-22 18:42:36 +08:00
jobs FEATURE: Add Mechanism to redeliver all failed webhook events (#27609) 2024-07-08 15:43:16 -05:00
mailers UX: Use a dropdown for SSL mode for group SMTP (#27932) 2024-07-18 10:33:14 +10:00
models FEATURE: Clean up previously logged information after permanently deleting posts (#28033) 2024-07-23 15:27:11 +08:00
serializers FEATURE: Use new topic bulk actions menu for all sites (#28003) 2024-07-23 11:39:27 +10:00
services FEATURE: Clean up previously logged information after permanently deleting posts (#28033) 2024-07-23 15:27:11 +08:00
views FIX: Exclude reply count on posts due to required Comment nesting (#27892) 2024-07-15 09:40:47 +08:00