Wunderbyte-GmbH / moodle-theme_squared

Moodle Theme based on squares
GNU General Public License v3.0
2 stars 3 forks source link

Search field in navbar is collapsed (due to JS error) #9

Open dasistwas opened 2 years ago

dasistwas commented 2 years ago

Hi @gjb2048 ,

thank you for the M3.10 version of squared. Here are some issues, which we would be happy if you could fix them;

gjb2048 commented 2 years ago

@dasistwas What do you want me to do about the 'navbarsearch' setting (https://github.com/Wunderbyte-GmbH/moodle-theme_squared/issues/8#issuecomment-835421049)? As I suspect it is related to "The search field in the navbar is not working (width 0 and button not responding".

gjb2048 commented 2 years ago

@dasistwas Just checked and I can replicate the error, so will be down to the change for 'core/search-input', therefore please could you let me know how you'd like this rectified please -> https://github.com/Wunderbyte-GmbH/moodle-theme_squared/issues/8#issuecomment-835421049.

gjb2048 commented 2 years ago

Hi @dasistwas,

This is the patch in Adaptable -> https://gitlab.com/jezhops/moodle-theme_adaptable/-/commit/6fd3466befa33f0aa0d7834964eee255b62655d0 and the specific code that I can adapt -> https://gitlab.com/jezhops/moodle-theme_adaptable/-/blob/6fd3466befa33f0aa0d7834964eee255b62655d0/classes/output/core_renderer_toolbox.php#L3543-3571. I just need to know what you'd like me to do please.

Kind regards,

Gareth

dasistwas commented 2 years ago

HI Gareth, if you could apply that solution in squared, that would be great. Kind regards, David

gjb2048 commented 2 years ago

Hi David (@dasistwas),

All implemented and managed to keep all three existing options for 'navbarsearch'. Please let me know if you're happy with the result:

Screenshot 2021-09-01 110324

and I'll publish on Moodle dot org.

As there is a change to the function definition of PHPUnit's setUp() and because the search has changed here, I've created a MOODLE_39_STABLE branch and now 'master' is M3.10 with the square name 'Rathausplatz'.

Kind regards,

Gareth

gjb2048 commented 2 years ago

@dasistwas Any news on this please?

dasistwas commented 2 years ago

Looks good, but too many search boxes on this page: https://onlinecampus.virtuelle-ph.at/course/search.php?context=2&q=test Screenshot 2021-10-30 at 19-22-34 Onlinecampus Virtuelle PH Suchergebnisse

gjb2048 commented 2 years ago

@dasistwas Ok, I'll remove the ones on the navbar and breadcrumb.

gjb2048 commented 2 years ago

Also, realised that I can ignore 'SetUp' and use own method instead in the future.

gjb2048 commented 2 years ago

@dasistwas I've removed the search boxes as much as I can on the above commit, however the one on the navbar on the course search page cannot be removed, due to non-overrideable core code in '/course/search.php':

    if ((can_edit_in_category() || !empty($usercatlist))) {
        $aurl = new moodle_url('/course/management.php', $searchcriteria);
        $searchform = $OUTPUT->single_button($aurl, get_string('managecourses'), 'get');
    } else {
        $searchform = $courserenderer->course_search_form($search);
    }
    $PAGE->set_button($searchform);
gjb2048 commented 2 years ago

@dasistwas I'll publish the theme on Moodle dot org as soon as I can.

gjb2048 commented 2 years ago

@dasistwas Released: https://moodle.org/mod/forum/discuss.php?d=428636 - I'll eMail you with specifics!