moodle-an-hochschulen / moodle-theme_boost_campus

Moodle 3.x Boost child theme which is intended to meet the needs of university campuses and adds several features and improvements ––– for Moodle 4.x please use our Theme Boost Union
GNU General Public License v3.0
38 stars 25 forks source link

Back-to-top button is faded everytime the page is scrolled #112

Closed abias closed 1 year ago

abias commented 2 years ago

The back-to-top button is faded everytime the page is scrolled:

            // This function fades the button in when the page is scrolled down or fades it out
            // if the user is at the top of the page.
            $(window).scroll(function() {
                if ($(document).scrollTop() > 220) {
                    $('#back-to-top').fadeIn(300);
                } else {
                    $('#back-to-top').fadeOut(100);
                }
            });

Origin: https://github.com/moodleuulm/moodle-theme_boost_campus/blob/master/amd/src/backtotop.js#L40-L48

The check of the document position should be improved to avoid calling the fade function with every movement of the page.

abias commented 1 year ago

As we have documented on https://moodle.org/plugins/theme_boost_campus, Boost Campus will not be continued after Moodle 3.x anymore as we will focus on the successor Boost Union which is published on https://moodle.org/plugins/theme_boost_union. For the time being, as long as Moodle 3.x still receives security support, we will only fix critical bugs in Boost Campus if one arises.

In Boost Union, this feature was ported over but this issue was solved during the porting of the feature. Thus, there is nothing left to do here.