IQSS / dataverse

Open source research data repository software
http://dataverse.org
Other
877 stars 484 forks source link

Dataverse - Broken Filter Results button to toggle facets side panel #6403

Closed jggautier closed 4 years ago

jggautier commented 4 years ago

When the Dataverse search results is viewed on narrow screens (e.g. narrow desktop browser windows and phones), the metadata facets are replaced by a Filter Results button.

Screen Shot 2019-11-23 at 5 08 19 PM

Clicking on/tapping that button should show the facets. But since Dataverse 4.18, clicking on that button doesn't do anything. I'm seeing this on the latest versions of Chome, Firefox and Safari.

pdurbin commented 4 years ago

@jggautier good catch. It's broken on Android too.

mheppler commented 4 years ago

This appears to have been broken in the PR to address memory leaks in #6035. Will need to review with @landreev this reasons for commenting out the necessary jQuery function for this toggle button. It appears to have been an oversight. In which case, it may make sense to move this function to the dv_rebind_bootstrap_ui.js file, and delete all this inline javascript from the search-include-fragment.xhtml, as it is already commented out.

    <script>
        <ui:remove>
        // The javascript below would be called once the page finished 
        // the initial rendering, and trigger an extra partial submit that 
        // displayed the extra cosmetic features of the page - the thumbnails
        // primarily - thus making the initial load happen faster. 
        // We have decided to disable this feature (at least for now) in order 
        // to be able to change SearchIncludeFragment and ThumbnailServiceWrapper 
        // to @RequestScoped (to eliminate the objects in memory associated with the 
        // @View scope).
        // For postLoad() see: https://github.com/IQSS/dataverse/issues/2004
        //<![CDATA[
        //$(document).ready(function () {
            // Calls the p:remoteCommand postLoad.
            // Posted at end of fragment to work correctly with Account information
        //    postLoad();

        //    $('[data-toggle=offcanvas]').click(function() {
        //        $('.row-offcanvas').toggleClass('active', 200);
        //    });
        //});
        //]]>
        </ui:remove>
    </script>
mheppler commented 4 years ago

Moved commented out jQuery on search-include-fragment.xhtml for Filter Results btn to dv_rebind_bootstrap_ui.js, and deleted all the other commented out javascript.

Also, fixed a CSS issue that broke Contact and Share btn tooltips, as well as Link and Edit btns dropdown menus on dataverse pg when viewed in an extra small (<768px) browser window.

@kcondon let me know if you have any questions testing this.