Dock and padding

Dock and padding

by Gareth J Barnard -
Number of replies: 27
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hi Themers,

Before I raise a tracker issue, I believe I've noticed (M3.0) an issue with the Clean theme when blocks (one or more) are docked.  In that the padding is inconsistent.

When nothing is docked then you always get a 20px padding regardless of screen size.  So < 768px resolution then 20px on the 'body' tag and nothing on '.container-fluid', when >= 768 then 20px on '.container-fluid' and nothing on the 'body' tag.

However when things are docked then a padding of 45px (being roughly the width of the dock and nothing else) on the left in LTR and vice versa is applied to the 'body' tag.  Because the selector definition is 'body.has_dock #page' this is more specific than '.container-fluid' (which is contained within '#page'), thus negating its 20px padding when >= 768px.  When < 768px this is fine as the combination of the 20px 'body' padding and the 'body.has_dock #page' definition add up to 65px on the appropriate side:

Gap with docked and less than 768px

However, when >= 768px we are 20px short (because of the '.content-fluid' negation), causing the content to bump against the dock:

No gap when >= 768px!


thus with the correcting CSS:

@media (min-width: 768px) {
    body.has_dock #page {
        padding-left: 65px;
    }
    body.has_dock.dir-rtl #page {
        padding-right: 65px;
    }
}

we can get:

Showing corrected CSS for >= 768px

If you can verify and confirm my findings I'll raise an issue.


Cheers,

Gareth



Average of ratings: -
In reply to Gareth J Barnard

Re: Dock and padding

by Hartmut Scherer -

Hi Gareth,

I can confirm your finding. Where can users see whether Moodle core themes have changed? Is there a version log file?

With kind regards,

Hartmut

In reply to Hartmut Scherer

Re: Dock and padding

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

Thank you Hartmut for testing smile.

The core theme versions are only changed between major releases of Moodle itself, thus the only way to see changes within a major release is by examining the Git log.  Start here: https://docs.moodle.org/dev/Git_for_developers and here: http://gitref.org/branching/#log - I use a GUI: https://tortoisegit.org/ - so: https://tortoisegit.org/about/screenshots/#Log_Dialog.

Cheers,

Gareth

In reply to Gareth J Barnard

Re: Dock and padding

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers
In reply to Mary Evans

Re: Dock and padding

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

Interesting Mary smile.  Is what I've stated something that you consider a Clean issue though?

In reply to Gareth J Barnard

Re: Dock and padding

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

It a a theme problem most certainly, however since Clean and More themes also need it then it should be in Bootstrapbase. The only reason I added it into Aftreburner is that at that time it was the only older 2.0 theme in Moodle that was responsive. However I reckon that blocks should be undocked when less than 768px since users like space, docking blocks seems a waste of space to me.as the dock takes up realestate.

I am quite looking forward to no Base theme, no blocks and using Bootstrap 4.

Then we can get on with our lives.

Cheers

Mary

In reply to Mary Evans

Re: Dock and padding

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

Thanks Mary.

Interesting, so what would replace 'blocks'?

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

Re: Dock and padding

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Bridges of course! What else?

In reply to Mary Evans

Re: Dock and padding

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

Is that built with the 'rivet' framework Mary? ;)

In reply to Gareth J Barnard

Re: Dock and padding

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Nah!  I'm talking Iron Bridge technology here...

Mortise and Tenons, Dovetails and Wedges

We just need a big hammer!

Mary

In reply to Mary Evans

Re: Dock and padding

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

That'll be the thin end of the wedge!

But are you really thinking of MDL-52973 ?

In reply to Gareth J Barnard

Re: Dock and padding

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Making lists of links so that the right information is displayed on a page, at the right time, in the right place is a start. That's the main essence of an information system, of which Moodle is in essence. However I was really thinking of how we could join or 'dovetail' the contents of a block, as we know it, to sit inside a page. Lets face it the whole context of block regions is becoming nonsensical. Things like this are commonly called 'widgets'. The fact we call them blocks is not the problem it's the way that they have been neglected and shoved to the side that is the problem and the fact we had to plead and pester Moodle HQ to get the blocks into and area of a page where none had ventured before, is proof that we saw, and still do see a need for them. That said they are 'old school' and perhaps need updating and called 'Apps', that way at least they could have a place of their own.

In reply to Gareth J Barnard

Re: Dock and padding

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

Dear Moodlers,

After many weeks of waiting, my patch MDL-53724 has been rejected for several reasons.  One of which is votes.  Therefore if you believe it needs to be fixed in core, then please would you be so kind as to vote for it.

Thank you,

Gareth

In reply to Gareth J Barnard

Re: Dock and padding

by Fernando Acedo -
Picture of Plugin developers Picture of Testers

Gareth,

is the issue you open in the tracker the same than this bug ?

https://moodle.org/mod/forum/discuss.php?d=326234#p1320268

Because this is a bug. Sorry but still shocked after read the tracker. Unbelievable.

Average of ratings: Useful (1)
In reply to Fernando Acedo

Re: Dock and padding

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

Hi Fernando,

Looking at the screen shots on https://moodle.org/mod/forum/discuss.php?d=326234#p1320268 they do indeed look similar in respect to the side with the dock having less margin than the other at a screen resolution.

The patch I have there I've already applied to Shoelace and it seems fine for both LTR and RTL, so feel free to use it in Adaptable as an addition until that tracker issue goes through.

Kind regards,

Gareth

In reply to Gareth J Barnard

Re: Dock and padding

by Fernando Acedo -
Picture of Plugin developers Picture of Testers

So if the issue is recurrent to all the based BS it is clearly a bug.

This is another sample of the different point of view from HQ and the rest of the world.

I already voted but before add some comment I will test it and document the bug.

Anyway, the answer provided is not acceptable in any way from HQ. First, It is not intended, and second, get more votes to consider it. That's crazy.


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

Re: Dock and padding

by Fernando Acedo -
Picture of Plugin developers Picture of Testers

Gareth, trying to replicate the issue with Adaptable and no luck. Adaptable always keep the same margin doesn't matter the screen width.

You can try our demo site: https://3-bits.com/demo/adaptable/

It allows blocks docking.

Is the issue located in some special layout? I tested several but can't find this issue.

The issue commented in https://moodle.org/mod/forum/discuss.php?d=326234#p1320268 use a special custom code to display a panel instead the block.

In reply to Fernando Acedo

Re: Dock and padding

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

Hi Fernando,

I tried the demo site but could not find a page with blocks to dock using guest access.

There is no specific layout for the issue, its a dock.less thing for all.

Kind regards,

Gareth

In reply to Gareth J Barnard

Re: Dock and padding

by Fernando Acedo -
Picture of Plugin developers Picture of Testers

You can login as teacher or student and enter in one of the demo courses.

The "Essentials" course is the same used in the QA testing so you have all kind of blocks to play with.

In reply to Fernando Acedo

Re: Dock and padding

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

Looking at it, Adaptable has the problem:

Attachment 2016-05-04 18_06_47-Course_ How to Moodle 2.0.png
In reply to Gareth J Barnard

Re: Dock and padding

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

Which can be solved:

Attachment 2016-05-04 18_07_59-Course_ How to Moodle 2.0.png
In reply to Gareth J Barnard

Re: Dock and padding

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

However, the current responsive behaviour at < 768px that is found in Clean etc. is not in Adaptable so thus the problem also happens at smaller resolutions - so an additional issue:

Attachment 2016-05-04 18_09_24-Course_ How to Moodle 2.0.png
In reply to Gareth J Barnard

Re: Dock and padding

by Fernando Acedo -
Picture of Plugin developers Picture of Testers

Gareth, thanks for the testing.

I remember some changes in the default layout because we found problems in the mobile view. In fact there are some still pending to do. I will try to take a look in some moment of this week. Then I could verify what exactly happens.



Average of ratings: Useful (1)