Dock and padding

Dock and padding

de către Gareth J Barnard-
Număr de răspunsuri: 27
Imaginea Core developers Imaginea Particularly helpful Moodlers Imaginea 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



Media notelor: -
Ca răspuns la Gareth J Barnard

Re: Dock and padding

de către 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

Ca răspuns la Hartmut Scherer

Re: Dock and padding

de către Gareth J Barnard-
Imaginea Core developers Imaginea Particularly helpful Moodlers Imaginea Plugin developers

Thank you Hartmut for testing surâs.

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

Ca răspuns la Gareth J Barnard

Re: Dock and padding

de către Mary Evans-
Ca răspuns la Mary Evans

Re: Dock and padding

de către Gareth J Barnard-
Imaginea Core developers Imaginea Particularly helpful Moodlers Imaginea Plugin developers

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

Ca răspuns la Gareth J Barnard

Re: Dock and padding

de către Mary Evans-

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

Ca răspuns la Mary Evans

Re: Dock and padding

de către Gareth J Barnard-
Imaginea Core developers Imaginea Particularly helpful Moodlers Imaginea Plugin developers

Thanks Mary.

Interesting, so what would replace 'blocks'?

Ca răspuns la Gareth J Barnard

Re: Dock and padding

de către Mary Evans-

Bridges of course! What else?

Ca răspuns la Mary Evans

Re: Dock and padding

de către Gareth J Barnard-
Imaginea Core developers Imaginea Particularly helpful Moodlers Imaginea Plugin developers

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

Ca răspuns la Gareth J Barnard

Re: Dock and padding

de către Mary Evans-

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

Mortise and Tenons, Dovetails and Wedges

We just need a big hammer!

Mary

Ca răspuns la Mary Evans

Re: Dock and padding

de către Gareth J Barnard-
Imaginea Core developers Imaginea Particularly helpful Moodlers Imaginea Plugin developers

That'll be the thin end of the wedge!

But are you really thinking of MDL-52973 ?

Ca răspuns la Gareth J Barnard

Re: Dock and padding

de către Mary Evans-

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.

Ca răspuns la Gareth J Barnard

Re: Dock and padding

de către Gareth J Barnard-
Imaginea Core developers Imaginea Particularly helpful Moodlers Imaginea 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

Ca răspuns la Gareth J Barnard

Re: Dock and padding

de către Fernando Acedo-
Imaginea Plugin developers Imaginea 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.

Ca răspuns la Fernando Acedo

Re: Dock and padding

de către Gareth J Barnard-
Imaginea Core developers Imaginea Particularly helpful Moodlers Imaginea 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

Ca răspuns la Gareth J Barnard

Re: Dock and padding

de către Fernando Acedo-
Imaginea Plugin developers Imaginea 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.


Ca răspuns la Gareth J Barnard

Re: Dock and padding

de către Fernando Acedo-
Imaginea Plugin developers Imaginea 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.

Ca răspuns la Fernando Acedo

Re: Dock and padding

de către Gareth J Barnard-
Imaginea Core developers Imaginea Particularly helpful Moodlers Imaginea 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

Ca răspuns la Gareth J Barnard

Re: Dock and padding

de către Fernando Acedo-
Imaginea Plugin developers Imaginea 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.

Ca răspuns la Fernando Acedo

Re: Dock and padding

de către Gareth J Barnard-
Imaginea Core developers Imaginea Particularly helpful Moodlers Imaginea Plugin developers

Looking at it, Adaptable has the problem:

Atașament 2016-05-04 18_06_47-Course_ How to Moodle 2.0.png
Ca răspuns la Gareth J Barnard

Re: Dock and padding

de către Gareth J Barnard-
Imaginea Core developers Imaginea Particularly helpful Moodlers Imaginea Plugin developers

Which can be solved:

Atașament 2016-05-04 18_07_59-Course_ How to Moodle 2.0.png
Ca răspuns la Gareth J Barnard

Re: Dock and padding

de către Gareth J Barnard-
Imaginea Core developers Imaginea Particularly helpful Moodlers Imaginea 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:

Atașament 2016-05-04 18_09_24-Course_ How to Moodle 2.0.png
Ca răspuns la Gareth J Barnard

Re: Dock and padding

de către Fernando Acedo-
Imaginea Plugin developers Imaginea 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.