Adaptable 3.11 - Gap above Header

Adaptable 3.11 - Gap above Header

by Nick Walker -
Number of replies: 8
I have Moodle 3.11.3 and Adaptable 3.11.0.3. With a fresh install of the Adaptable theme and no Adaptable settings configured when I view any page (e.g. Front page, courses, dashboard) other than an administration page, there is a white gap/border above the top of the header. I don't remember seeing this when I previously testing Moodle and Adaptable with 3.10: its possible I just didn't notice it before but I think I would have. 

This is the gap I can see:
Gap above header

I also see the same gap if an alert is showing:

Gap above alert

If I reduce the width of the screen so that the header reduces in height (just before it swaps to using a hamburger-menu to replace the navbar), the gap disappears:

Reduced width has no gap

And as I said, there is no gap when I look on Admin pages:

Admin pages have no gap

Is there anything I can do to get rid of this gap or do I need to wait for a future update to the theme (assuming it is not 'by design').

Thanks

Nick
Average of ratings: -
In reply to Nick Walker

Re: Adaptable 3.11 - Gap above Header

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
I've done a complete clean install of M3.11.3 and Adaptable 3.11.0.3 from scratch and cannot replicate.
Average of ratings: Useful (1)
In reply to Gareth J Barnard

Re: Adaptable 3.11 - Gap above Header

by Nick Walker -
Thanks for your reply Gareth. The issue is present in both Chrome and Edge on Windows for me (I don't have other browsers to try currently) - we have Moodle running on Windows Server. Before posting the message above I had initially imported the Adaptable settings into M3.11.3 that I'd worked on when testing using Moodle and Adaptable 3.10 (using the json import function) and had wondered if doing this had caused the issue. So then I swapped the theme to 'classic' and uninstalled the Adaptable theme plugin and made sure it deleted the adaptable folder from the Moodle Themes folder - when uninstalling the message said it would delete all settings from the database. Then I installed the Adaptable 3.11.0.3 again, and without changing any settings this issue appears: this is why I described it as a 'fresh install'. So does this suggest that some settings are being left behind when uninstalling or could there be some other settings outside of the theme causing this?
In reply to Nick Walker

Re: Adaptable 3.11 - Gap above Header

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
Dear Nick,

When I did a fresh install, I wiped the database, so thus as Adaptable does store its setting values in the database, then it is a possibility that Moodle did not delete them on uninstall (Adaptable uses the core method for settings). Therefore, as the JSON import / export is these settings, then please export them for the problem site and post them here - if that has a privacy issue, then edit the file (its a JSON text file) and remove any sensitive data beforehand.

I tested on Chrome on Windows.

The problem could be anything really, the only way I can tell is to investigate locally if I can reproduce the problem.

As for 'outside the theme', please confirm that you only have core Moodle + Adaptable code on the installation with the issue.

G
Average of ratings: Useful (1)
In reply to Gareth J Barnard

Re: Adaptable 3.11 - Gap above Header

by Nick Walker -
There was quite a lot in the json that I woudn't want to post here so I've taken out some content which was mainly tools menus and help links on the navbar. I've attached it to this post.

I'm running just the core Moodle code and Adaptable (and various plugins) although the moodle is one we've been running for over a decade and has been upgraded a few times.

Thanks for your continued help.

Nick
In reply to Nick Walker

Re: Adaptable 3.11 - Gap above Header

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
Thanks, still can't replicate.

Looking into the possibilities, '#page' has a top margin of 50px which is reset in Adaptable in some SCSS to '0', thus if your gap is '50px' then that could indicate the area to look at why the SCSS for this is not working.

Is your site public?
Average of ratings: Useful (1)
In reply to Gareth J Barnard

Re: Adaptable 3.11 - Gap above Header

by Nick Walker -
Thank you for trying, it is very much appreciated. No it isn't public. Your replies have been very helpful at least to know that this is a problem with my settings rather than an issue with the theme - I didn't want to spend more time trying to track this down only for it to turn out to be a problem with Adaptable. But I'll do some work now and your thoughts on the #page top margin looks like a good starting point. I'll reply here if I manage to solve it.

All the best

Nick
In reply to Nick Walker

Re: Adaptable 3.11 - Gap above Header

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
Dear Nick,

I can't replicate with the setting values you've given me in the JSON export file. It may or may not be an issue (bug) with Adaptable - the moodle dot org published version in the plugin's DB. If I can replicate then I'm in a position to be able to fix it and update the theme.

G
In reply to Gareth J Barnard

Re: Adaptable 3.11 - Gap above Header

by Nick Walker -
Hi Gareth.

I've not managed to fix this but thought I'd mention my findings so far in case it gives you any clues or suggestions as to what I should look at...

Firstly the gap at the top appears to be 20 pixels.

If I uninstall the adaptable plugin I've confirmed that all the entries in the table mdl_config_plugins with the field plugin= 'theme_adaptable' are deleted. But reinstalling still results in this gap.

Interestingly if I install the plugin without going through the upgradesettings.php (which usually applies all the default settings following installation of the plugin) and then change to use the adaptable theme, the formatting is quite odd (as expected) but the gap is still there! The only record at that stage in the mdl_config_plugins table for theme_adaptable is the version entry. So this suggests to me that this spacing gap can't be due to any of the settings for the adaptable plugin (except default ones that apply when there are no settings in the database).

It's all very puzzling.

Nick