mirror of
https://github.com/discourse/discourse.git
synced 2025-02-18 07:52:45 +08:00
![]() Previously we were using the `didInsertElement` hook and querying the DOM to check whether the other button was visible. This is problematic from a performance point of view because it forces the browser to render the layout prematurely. It can also lead to subtle bugs based on the current scroll position. In addition, having this logic on a `didInsertElement` hook makes it totally incompatible with the new 'loading slider' feature (because the component is not re-rendered between different topic lists). This commit updates the logic to be based simply on the count of topics in the list. If there are fewer than 5 topics, the top button is hidden. |
||
---|---|---|
.. | ||
images | ||
javascripts | ||
stylesheets |