Essential 2.8.1.1 - Release candidate 1.

Essential 2.8.1.1 - Release candidate 1.

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

Hello Moodlers,

If you have a M2.8 test server, please could you test Essential 2.8.1.1 - RC1:  https://github.com/gjb2048/moodle-theme_essential/releases/tag/V2.8.1.1-RC1

It has:

- FIX: Issue #417: M2.8 Mail Settings page needs checking.
- FIX: Issue #422: Regression from #179 in the core_renderer.php file.
- FIX: Issue #423: Forum floating buttons.
- FIX: Issue #425: Copyright date localization.
- FIX: Issue #429: Front page content area set to "Show before login only" still paritally displays.
- FIX: Issue #432: Adjusted lang string for 'oldnavbardesc'.  Thanks to Mathieu Pelletier (https://github.com/mkpelletier) for this.
- FIX: Issue #434: Explain if a logo uploaded then no header title will be shown.
- FIX: Issue #436: Header background colour setting.
- FIX: Apply MDL-46183.
- FIX: Apply MDL-45930.
- FIX: Apply MDL-44907.
- NEW: Issue #428: Add setting to customise header background image.  Thanks to Jerome Charaoui (https://github.com/jcharaoui) for this.
- NEW: Issue #433: Add a 'This Course' dropdown menu.  Thanks to ActionJONA (https://github.com/ActionJONA) for the ported BCU theme code.
- NEW: Added 'Essentials' child theme in 'essentials' sub-folder.  To use, read the 'Installation' instructions in 'essentials/README.txt'.
       The 'essentials' sub-folder is just a place to store and distribute the child theme.  It will NOT be available until you install it.
- NEW: Code refactoring to make child theme creation easier.
- NEW: LESS refactoring to make future transition to Bootstrap v3 easier.

The next M2.7 version will have most of the same fixes.  But the child and refactoring depend on how this goes.

The principle behind a release candidate this time is down to the refactoring I have done for child themes and the LESS.  I am only a one man band and not had time to learn Behat for unit test verification and validation.  If jUnit was supported, then a different matter.

With the future of technology being small smart devices and the need to keep bandwidth and file size down, I decided last year to implement RTL CSS switching (issue #249).  The beauty of this is that when you access a page in an LTR language then you only get what you need for the LTR language (bar a small bit I've yet to safely remove) and vice versa for RTL.  Currently with all other theme's (I believe) you get both LTR and RTL styles - all of them!  So even if you don't need LTR or RTL support, then you still get it.

I do wish to thank Bas Brands, David Scotson and Joby Harding for inspiring me to use Grunt and via code pose the whole RTL issue.  Nadav Kavalerchik needs a mention too for helping with invaluable testing.

The snag with how #249 was implemented was the organisation of the LESS files.  Everything was sort of intermixed with everything else.  So, I've broken things down a bit, such that the rough compartmentialisation consists of:

  • Bootstrap - cleaned back to a pure 2.3.2 from the source.
  • Bootstrap override - Essential tweeks and separate image serving needed for #249.
  • Moodle - broken down internally into the standard Moodle styles and separated out styles for #249.
  • Essential - styles for the theme broken down to have separated styles for #249.

I'm hoping that all of this will mean that its easier for others to understand, other frameworks to be used instead of Bootstrap and porting the functionality to other themes.

You might be asking about the technical principles and reasons behind of 'RTL CSS switching', well its like this:

  • Generate the styles for LTR.
  • Use Grunt CSS flip to generate the RTL version.
  • Because Moodle core with TDM off will only serve 'one' combined set of styles, then any attempt in PHP to adjust to LTR / RTL (right_to_left() function) fails.  Thus you have to serve the styles yourself as there are now 'two' files.  The disadvantage of this is you loose all of the useful CSS-preprocessing functionality that serves things like images / fonts and replaces settings with values.  Hence the need to pull apart a little of the Bootstrap sprites and quite a bit of the Moodle image definition selectors.  This is then all served as normal by Moodle's CSS serving mechanism.

The layout files serve both in the order of the 'Flipable CSS' then the 'Pre-processable CSS' - which in that order allows 'Custom CSS' to work.

The 'Flipable CSS' employs HTTP header attributes to detect when a client already has the same copy of the CSS already and thus gets a 304 'Not modified' such that its not downloaded again = caching.  This works with TDM off, but even if you are a developer, recompiling the LESS -> CSS will cause the contents / file date time to change and the code will react and send the new version to the client, no 'Purge all caches' in this instance.

That's about it really.  I realise that this post is a bit technical and long, but I have been meaning to write it so that you may understand how Essential works now and why.  And that you can take something from it, develop your child themes and possibly integrate its technology in your themes for the very reasons I have done in Essential.

Kind regards,

Gareth


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

Re: Essential 2.8.1.1 - Release candidate 1.

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

Thank you Gareth for all the hard work you have put into this theme, I really don't know where you find the stamina to keep carrying on! 

I keep trying to hava a go and customise a copy of Essesntial, but end up trashing it after a few hours as I truly get completely lost in all the configurations, the different stylsheets, the long list if settings. I have not tried Grunt yet, but I dare say I will when I find time.

Glad that this is finally getting to be a more stable theme and that you can release iEssential as an RC1

cheers

Mary

Average of ratings: Useful (1)
In reply to Mary Evans

Re: Essential 2.8.1.1 - Release candidate 1.

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

Thanks Mary.

I just love Software Engineering and pushing the technical envelope.

In reply to Gareth J Barnard

Re: Essential 2.8.1.1 - Release candidate 1.

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

I did too once...when I was in my early thirties and I had a Spectrum 48k I built my first Games Program.

 

In reply to Mary Evans

Re: Essential 2.8.1.1 - Release candidate 1.

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

I first used a Commodore Pet, then ZX-81, then had a 16K Speccy.... Since then have programmed a 68000 in assembler, PC's - 80286 upwards, RM 380Z / 480Z, OpenVMS, Silicon Graphics, Sun Sparc, MacBook - older 68000 based, Raspberry Pi....

Its all down to doing what you love in life.

In reply to Gareth J Barnard

Re: Essential 2.8.1.1 - Release candidate 1.

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

I've decided to back-port the Child theme code to the forthcoming 2.7.9.5 as I've fixed an issue with custom font serving today in both 2.7 and 2.8 branches of the theme.  Bootstrap refactoring depends on the responses here and where things are likely to go with supporting 2.7 when 2.9 comes out as 2.7 is LTS.

In reply to Gareth J Barnard

Re: Essential 2.8.1.1 - Release candidate 1.

by Richard van Iwaarden -
Picture of Particularly helpful Moodlers

Can I find some more info over the 'this course' menu link?

Seems really nice. I need to translate some and I would like to add a custom link to our custom grade-report. IS there a place where I can do this?