mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 05:23:40 +08:00
bdec564d14
- 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. |
||
---|---|---|
.. | ||
admin | ||
custom-proxy | ||
deprecation-silencer | ||
dialog-holder | ||
discourse | ||
discourse-common | ||
discourse-hbr | ||
discourse-i18n | ||
discourse-markdown-it | ||
discourse-plugins | ||
discourse-widget-hbs | ||
docs | ||
ember-addons | ||
ember-cli-progress-ci | ||
ember-production-deprecations | ||
float-kit | ||
locales | ||
pretty-text | ||
select-kit | ||
theme-transpiler | ||
truth-helpers | ||
.npmrc | ||
handlebars-shim.js | ||
polyfills.js | ||
run-patch-package | ||
service-worker.js.erb |