continuing elegance: 2.7

continuing elegance: 2.7

Danny Wahl -
回帖数:49

I'm in no way "officially" approved by Julian to do/announce this, but this is open source ;)

Seems that he's gotten busier than maybe he anticipated with c*nvas (that thing takes like 4 days just to install...) and elegance has been severely neglected.  To that end I've made a few changes on my branch and have pushed a 2.7 version to github:

  • merged all existing pull requests from the original theme
  • updated all styles to latest bootstrap 3 them AND
  • marked theme_bootstrap as a dependency

I've bumped the version to 2.7 AND the requirement to Moodle 2.7.  I've left it at MATURITY_STABLE for easy upgrades- but I moved it to 2.7 to try to discourage early adopters a bit.

I didn't rename the theme because this IS still elegance.

If you want write access to my github repo please ask me, I will give it.  I don't want to own this project- but I also don't want to let it die.  Especially since we rolled out Elegance literally a day before the announcement was made.

https://github.com/thedannywahl/moodle-theme_elegance

happy testing 大笑

回复Danny Wahl

Re: continuing elegance: 2.7

Richard Oelmann -
Core developers的头像 Plugin developers的头像 Testers的头像

Is theme_bootstrap a dependency Danny? Or is that just for your updated version? What does it depend on theme_bootstrap for that is not built in as part of the previous versions of Elegance or have you removed some areas of Elegance to allow theme_bootstrap to control those areas?

I have Julian's Elegance running on my systems but do not have Bas' theme_bootstrap running on any of them.

If you have made changes that create a dependency on theme_bootstrap then I really think perhaps a change of name should be part of your changes as that, to me at least, would seem to be a fairly major item in supporting Elegance, if some versions require theme_bootstrap and others dont.

Apologes for asking the questions rather than looking at the code myself - unfortunately right now Im struggling with a back/neck problem that is restricting me to about 15 minutes at a time on my computer and most of that is being dedicated to a masters assignment that I have to have the draft of in next week 微笑

回复Richard Oelmann

Re: continuing elegance: 2.7

Danny Wahl -

Richard,

Previously Julian would do a huge copy/pasta of the entire bootstrap3 theme into elegance and then include the js/css, etc...

BUT now that bootstrap3 theme is in the downloads plugin I have actually marked it as a dependency.

I don't think this is a huge issue because anyone trying to install elegance (my update) will get notified of the need for bootstrap3 and then they can immediately and instantly install it through the plugins manager - pretty seamless.

This gives me the advantage of not supporting 2 themes in one 微笑 and instantly getting Bas's bootstrap3 updates as he pushes them to the plugin DB - instead of me merging them.

回复Danny Wahl

Re: continuing elegance: 2.7

Richard Oelmann -
Core developers的头像 Plugin developers的头像 Testers的头像

I understand Danny and have had a quick look at the code and can see the chnages you have made to make your 'elegance' a child theme of Bas' bootstrap (and of course Im familiar with the advantages of that approach 微笑 ). And I think its a great job and will make ongoing support and maintenance much easier.

I still feel though that you need to rename the theme to avoid the major 'break' between the two versions and also should Julian or anyone else continue to fork the existing elegance as a standalone theme without the parent dependency.

Having two very similar themes, but essentially so different in the background technologies (clone v child), with exactly the same name is going to cause significant confusion in providing support into the future - its hard enough to get some people to identify the moodle version and theme version they have used in the first place, let alone to have two essentially parallel versions of elegance one which clones theme_bootstrap and one which treats it as a parent.

回复Richard Oelmann

Re: continuing elegance: 2.7

Gareth J Barnard -
Core developers的头像 Particularly helpful Moodlers的头像 Plugin developers的头像

So are we talking a new theme name here, like:

Elementary

Europa

....

?

回复Gareth J Barnard

Re: continuing elegance: 2.7

Richard Oelmann -
Core developers的头像 Plugin developers的头像 Testers的头像

I like Bas' suggestion - elegantphoenix - keeps the link with elegance but does give a different name so people know which they are dealing with instantly (of course its Danny's work, so really its up to him though 微笑 )

The other option of course is to see if Julian will accept Danny's changes into the main branch of Elegance so that Elegance vX.X is the bootstrap3 clone version and Elegance vX.Y is Danny's bootstrap3 child version with all future developments being done on that branch. Then all we need is to ensure that people do give us the correct version number when they are requesting support 微笑

Personally I think its a good step forward and somehow needs to keep the link with Julian's original elegance, but that it would benefit from some different naming to identify the branch more easily for support/ongoing maintenance purposes.

I guess I also need to look at the elegantchild theme to see how this might affect that as well (It needs updating to Jullian's latest anyway 微笑 )

回复Richard Oelmann

Re: continuing elegance: 2.7

Danny Wahl -

Hi thanks again for your input Richard.  I have decided for now not to rename the theme for a couple of reasons:

1) institutionally it provides us an easier upgrade path from elegance 2.6.3 to "elegance" 2.7

2) If Julian picks up the project again and wants my code it's a simple merge (as you said)

3) it's more time consuming for me to rename all the components just to rename them - and that's time not used making the theme work

4) for now it's only available on github - so if you want it you have to explicitly grab my repo.

so if this ever gets to the plugins db then yes - I might consider renaming it at that point, UNLESS Julian marks me as a contributor and I can actually push my version as the "official" Elegance theme.

tl;dr: right now renaming doesn't matter, maybe in the future 吐舌头 

回复Danny Wahl

Re: continuing elegance: 2.7

Mary Evans -

Hi Danny,

I totally agree with your logic, which makes a lot of sense.

OK on a new tack...

How to I go about being able to push fixes to your GITHUB Elegance Repo?

Do I do this by forking the branch first and then, like I do with Moodle, make a new branch with my fix and push to your master branch? If this is right, do you have a naming convention for this like Moodle's MDL-xxxxxx issue ticket number? If not shall we start one in Moodle Add-ons (CONTRIB-xxxx)

Cheers

Mary

回复Mary Evans

Re: continuing elegance: 2.7

Danny Wahl -
As to naming conventions, no I don't care - descriptive is good, make use of comments on github issues 微笑

here's the ultra long version of a pull request:

  1. fork my project on github
    git clone git@github.com:thedannywahl/moodle-theme_elegance.git
  2. add my project as a remote 'upstream' (or whatever you want to call it- I use usernames)
    mv moodle-theme_elegance elegance; cd elegance
    git remote add upstream git@github.com:thedannywahl/moodle-theme_elegance.git
  3. fetch upstream/master and merge to local/master
    git fetch upstream; git merge upstream/master
  4. push local/master to origin/master (our remotes are now in sync)
    git push origin master
  5. create a new branch with a descriptive name git checkout -b fix_broken_widget origin/master
    git checkout -b fix_broken_widget
  6. publish the branch to origin
    git push -u origin fix_broken_widget
  7. generate the pull request (it's really simple - just go to your fork on github and click the "pull request" button)

Now, once I've merged the pull request you'll switch back to master (git checkout master) and then do step 3 and 4 again to re-sync.  And steps 5-7 for the next bug...

also, for what it's worth, I use git-tower, but I find the github app very useful for managing all this stuff too 微笑  In the future I'll see how to give you direct push access - but you'll have to do most of this setup anyways.

回复Danny Wahl

Re: continuing elegance: 2.7

Gareth J Barnard -
Core developers的头像 Particularly helpful Moodlers的头像 Plugin developers的头像

Hi Danny,

Pragmatically, this is how I see things:

So, why not expend the effort and make Elegance a 'child' of Bootstrap?  This brings benefits of:

  • Pooling effort in one place to make things better.
  • Single point of change.
  • No need to maintain Elegance in line with Bootstrap.
  • Customisations are achievable both in terms of CSS, PHP and JavaScript on top of Bootstrap.  Shoehorn demonstrates this.

Cheers,

Gareth

回复Gareth J Barnard

Re: continuing elegance: 2.7

Mary Evans -

I am inclined to agree with Gareth in relation to making this a Child theme, and also Richard who suggested a change of theme name.

Basically, anyone who can fix this theme and Essential is welcome to them, as I am finding both of these themes a nightmare!

The 'good news' is that Martin might well approve Bas's Bootstrap into Moodle 2.8 which is due out in November! cheers

Related tracker issues:

MDL-40177

MDL-45269

回复Gareth J Barnard

Re: continuing elegance: 2.7

Danny Wahl -

So, why not expend the effort and make Elegance a 'child' of Bootstrap? 

Gareth, that's what I did ;)  Sorry if it was unclear

回复Danny Wahl

Re: continuing elegance: 2.7

Mary Evans -

But you need to rename it, is what WE are telling YOU!!! 微笑

Other than that, this is spot on...thanks for taking the time to fix it.

回复Mary Evans

Re: continuing elegance: 2.7

Danny Wahl -

Hi Mary,

I see the arguments but I think for now it's not necessary to rename it- perhaps in the future, please see above for more details on my "why".

回复Danny Wahl

Re: continuing elegance: 2.7

Bas Brands -
Core developers的头像 Peer reviewers的头像 Plugin developers的头像 Plugins guardians的头像 Testers的头像

Hi Danny,

That's great! Theme elegance seems to have grown very popular and I have seen many forum posts in it's issues. As Gareth pointed out it should not have been released as a stable theme. However, it's out there and has been downloaded many times.

Improving the forked version will be a lot of work, lot's of it is still based on old versions of the Bootstrap 3 theme. Creating a new child theme for Moodle 2.7 might be a better approach then cleaning up Elegance. You could add the elegance features that work well bit by bit.

The "more" theme includes bootstrapbase less files and adds / overrides less variables using the Moodle 2.7 php less compiler. That keeps your CSS relatively nice and small. On github I have added a simple child theme https://github.com/bmbrands/theme_cerulean for bootstrap 3. You could copy that and use that as a starting point.

In the end I think that will result in a nice new theme using Elegance styling and bootstrap widgets and you could proudly call it your own. "elegantphoenix" might be a nice name for it 微笑




 


回复Danny Wahl

Re: continuing elegance: 2.7

Danny Wahl -

v2.7.0.01: I've ripped out a ton of classes and methods that were copied from theme_bootstrap and rehooked the rest of the classes to properly extend theme_bootstrap

I'm not aware of any regressions in my testing with the exception of possibly the course_summary- and that's just because I'm not sure if elegance modified the theme_bootstrap method, or if the theme_bootstrap method got updated and elegance was using an old one. Either way it's a trivial change 是的

回复Danny Wahl

Re: continuing elegance: 2.7

luciano biondo -
I am too ignorant about bootstrap to underestand your discussion, but if somebody is working to improve Elegance, I'm asking him to look at this little but useful modification. Thanks
https://moodle.org/mod/forum/discuss.php?d=259455
回复luciano biondo

Re: continuing elegance: 2.7

Richard Oelmann -
Core developers的头像 Plugin developers的头像 Testers的头像

Hi Luciano

I'm not sure that qualifies as a 'little but useful modification' - Useful yes, Little is the bit I'm not sure about. Its a solution that involves using more than one theme and also one that, in your suggestion, involves changes to the /course folder which is not part of a theme.

However, an alternative would be that you could use Elegance as your main theme, apply category themes and clone elegantchild as many times as you needed to allow different content to be applied for each category. The style content you identify could be added to the customcss of the various themes, using the relevant category ids as needed.

Essentially what you are talking about is the concept of 'multi-tenancy' moodle sites which has been discussed on many occasions but still has to come to full fruition.

回复Richard Oelmann

Re: continuing elegance: 2.7

Mary Evans -

I have to disagree with you Richard as the effect that Luciano suggested is one which should be suggested in Moodle Tracker as it does add a different slant to how a category page looks 

its all about the page layout which is set in the course index.php

回复Mary Evans

Re: continuing elegance: 2.7

Richard Oelmann -
Core developers的头像 Plugin developers的头像 Testers的头像

That I understand Mary - my main comment was that I don't think its a minor change in one theme that Luciano was asking to be looked at. At least not the way its set up at the moment - it requires changes in /course/index.php and separate child themes.

For myself, I'd love to see the changes and work done through the tracker to enable this to work - I'm just not sure that its a small change that can be built into Elegance, or any other single theme, as things stand currently although I'd be more than happy to work with you or anyone else who has any ideas how it can be achieved within one theme as requested 微笑

My back problem is improving, I hope to be back in work next week, my Master's assignment is due in next week and will be out of the way for the summer, so I'm hoping to get back on with a few Moodle related projects and you know this is the sort of challenge I enjoy - even if I can't always make it work 微笑 

回复Richard Oelmann

Re: continuing elegance: 2.7

Mary Evans -

The suggestion Luciano put forward as his idea of afix which works well in his case really needs a renderer, as does the main index.php in Moodle.

回复Mary Evans

Re: continuing elegance: 2.7

Richard Oelmann -
Core developers的头像 Plugin developers的头像 Testers的头像

Hi Mary,

My comments weren't intended as critical of the fix Luciano has in the other thread - as you say, its an appropriate fix for what he's trying to do. All I tried to do was suggest that it wasn't a 'little' fix for someone looking at Elegance theme on its own. The aim, and even the fix itself are good - but relate to more than someone looking at Elegance, unless I am missing the point of them.

I certainly didn't intend to start any kind of argument or make any suggestion that Luciano's fix in the other thread was incorrect, only that it involved more than just looking at this theme in isolation, which was my reading of the request in this thread.

If my posts contained any other implications, or I have misread anyone else's intentions I apologise, they were not intended.

回复Richard Oelmann

Re: continuing elegance: 2.7

Mary Evans -

I was not intending to be critical of you Richard, I was, or at least I thought I was, just making an observation at the things we are needing from Moodle developers to help us with themeing in general. And certainly not critical of you or indeed what you are say in this thread.

We must also remember that Luciano is Italian, and has it happens is from the same town in northern Italy where my mother lived during her childhood.  So there is an affinity, and also the Italians are passionate about their websites, they make them do what they want them to do, even if it means breaking some rules if necessary.  Luciano is a very well educated fellow and so he is entitled to a little bit of exaggeration, which I tend to see as very much the Italian way, making light of something that we see as trivial, I say 'we' because I consider myself Italian in temperament, but to others who look at things from a different prospective find it bizarre to make light of something that is breaking all the rules yet in reality is very, very trivial.

回复Mary Evans

Re: continuing elegance: 2.7

Richard Oelmann -
Core developers的头像 Plugin developers的头像 Testers的头像

微笑 I wasn't taking your comments as critical of me personally Mary, but was concerned that mine had been and didn't want to leave that impression! - but we both know we are all at least trying to pull in the same direction 微笑 

And we all know that some 'work arounds' could be done better, as well as themes being made easier and more powerful, if we can get the renderers for certain areas sorted in core - progressing, but still some way to go ;)

回复Richard Oelmann

Re: continuing elegance: 2.7

luciano biondo -
Sorry, I have red only now this thread.

What I meant is: with moodle it is possible to do a lot of very useful things and I hom that some of theese would not be deleted in developement of new versions.

Please: look at
http://www.unipocle.it
(sorry: server has some problem, if page doesn't charge try again 3-4 times)

and click on "SEZIONI" in the top bar. Click on "Università della vendita" and on each of the 4 rows under that.

You can see how I have used categories and childthemes to have a moodle site divided in sections each having a home page. Elegance theme allows to obtain this display in a very easy way.

I believe that this feature is very useful and I ask that it will remain in next versions.
回复Danny Wahl

Re: continuing elegance: 2.7

Danny Wahl -

bumped to 2.7.0.02

fixed activities and resources showing white page

回复Danny Wahl

Re: continuing elegance: 2.7

jose m. cordero -
Hi Danny,

Grateful if you told me where I should change the color of text to put as julian version (picture 1) I think it looks better.

Another problem I see is that the menus are deployed you should just click on the arrow and that if you click on the text menu only opens when you click with the mouse in the following menu. Pongo video.

Sorry for the translation. I hope you understand it correctly.

Thank you.
Julian
picture 1 (Julian)


Danny

picture 2 (Danny)

video.wmv

回复Danny Wahl

Re: continuing elegance: 2.7

Gareth J Barnard -
Core developers的头像 Particularly helpful Moodlers的头像 Plugin developers的头像

Hi Danny,

Please note the outstanding pull requests for the theme on https://github.com/moodleman/moodle-theme_elegance/pulls and indeed an issue with the FontAwesome filter: https://github.com/moodleman/moodle-filter_fontawesome/issues?state=open - which is related to the themes.

Cheers,

Gareth

回复Danny Wahl

Re: continuing elegance: 2.7

Usman Asar -
Plugin developers的头像 Testers的头像

Danny, Mary, Richard, Gareth! if anyone can assist.

Attached is screen shot of Elegance (As currently in use on imoot), The highlighted area (weather it needs scroll bars or not), still shows dimmed scroll bar. how can I remove scroll bar from this  area not to show up. (Shown Below Is Screen of Imoot, where scroll is  required due to nature of the block)


And Attached screenshot below, showing dimmed scroll bar, where its  not required (HTML Block), still it shows up a scroll bar.



Any help would be beneficial.

Cheers!
回复Usman Asar

Re: continuing elegance: 2.7

Richard Oelmann -
Core developers的头像 Plugin developers的头像 Testers的头像

Usman, I don't have the latest versions installed at the moment, but the Elegance version I currently have on my localhost shows the following

Screenshot

so changing that overflow-y: scroll to overflow-y: auto should do the trick (or adding the code below to the customcss block)

#block-region-side-middle .block .content {overflow-y: auto;}
回复Richard Oelmann

Re: continuing elegance: 2.7

Usman Asar -
Plugin developers的头像 Testers的头像

Richard, cant thank you enough for this 微笑 did the trick absolutely well. I am as well using the original version.

回复Danny Wahl

Re: continuing elegance: 2.7

Emma Richardson -
Documentation writers的头像 Particularly helpful Moodlers的头像 Plugin developers的头像

Hi Danny and a huge thanks for taking this on - I am using this theme on three sites right now and would hate to see it fall by the wayside.  

Things I am finding with your version which I just installed on my test site...

Install, had to remove old elegance folder in order to install - would not let me upgrade to your version.  Asides from that, after Bootstrap install, all went well.

The dropdown on the navbar that you click on by your name is very touchy and it takes several clicks for it to actually dropdown.  I think the link area should extend to the whole area instead of just on the tiny arrow.

Course page - assignment icons still overlapping on sections - this was problem in Julian's version too.

My Course page - we lost the cool hover pretty course icon and zoom in the course-name affect - are you going to bring that back?

Messages - awesome that you fixed the message count!!!


回复Emma Richardson

Re: continuing elegance: 2.7

Gareth J Barnard -
Core developers的头像 Particularly helpful Moodlers的头像 Plugin developers的头像

Please can I take credit for the message count code: https://github.com/moodleman/moodle-theme_elegance/pull/72/files

Danny, would you be willing to update the readme file with a 'Contributors' section please, listing who has helped please.  As other themes do.

I've also found that if the drop-down on your name is tetchy then both the YUI and JQuery versions of the Bootstrap JS are running and only one needs to.

回复Gareth J Barnard

Re: continuing elegance: 2.7

Hartmut Scherer -

Hi Gareth,

The corrected code for the message count in core_renderer.php is excellent and works also in the Clean theme. I am excited about your solution.

Many thanks.

With kind regards,

Hartmut

回复Gareth J Barnard

Re: continuing elegance: 2.7

Danny Wahl -

Gareth,

I would absolutely be happy to update the README with a contributors section 大笑

In the interim, I have already properly pulled in your commits so that they are attributed to you:

https://github.com/thedannywahl/moodle-theme_elegance/commits/master?page=2

https://github.com/thedannywahl/moodle-theme_elegance/graphs/contributors

回复Danny Wahl

Re: continuing elegance: 2.7

Danny Wahl -

release 2.7.0.03

  • now in sync with theme_bootstrap requirements, which means this now works with Moodle 2.6 大笑
回复Danny Wahl

Re: continuing elegance: 2.7

Julian Ridden -

I know I'm, like, really late to this discussion. But just wanted to add my 2c worth.

Thanks so much Danny for picking up this project and continuing development. Your coding is so much better than mine and your changes to date are awesome!!!

Would you be interested in OFFICIALLY taking over from me? Be warned, that is a potentially poisoned challice. If you could see what it did to my inbox you would know what I mean.

I am so glad to see some of my projects continuing on after my departure and hope you all the success in the world. Can't wait to see what you and the community do with it!

Julian

回复Julian Ridden

Re: continuing elegance: 2.7

Danny Wahl -
Julian,

I'd be honored 微笑  and I'd like to thank you again for all of your initial work in making this project a reality.  All the best in your new endeavors.
回复Danny Wahl

Re: continuing elegance: 2.7

Dimo Dimov -

Hi Danny!
Thank you for continuing this project! I appreciate your work and I like the theme for our school.  I just want to ask about your plans for the future of the project?

Cheers,

Dimo

回复Dimo Dimov

Re: continuing elegance: 2.7

Danny Wahl -

Dimo,

ATM I want to fix all the regressions caused by updating to 2.7 and converting to a child of theme_bootstrap

In the future I may make some drastic changes, or may create an elegance 2.  I'm doing a lot of research right now into theme capabilities, but there may come a time where elegance is a "plugin set" not just a single theme.  What I'm currently thinking is something like this:

  • theme_bootstrap
  • theme_elegance (core theme, minimal settings)
  •  -- theme_elegance-plugin-usermenu
  •  -- theme_elegance-plugin-analytics
  •  -- theme_elegance-plugin-touchicons, etc...
  •  -- block_elegance-quicknav
  •  -- filter_elegance-fontawesome

If I can engineer a way that "child themes" can be installed and I can get them to register with each other, or with the parent I'd like to do this.  One cool thing with this is that it would allow other themes to leverage these theme extensions and it would allow site admins to add/remove functionality from the theme as they see fit.  But this might be hard if not impossible.

回复Danny Wahl

Re: continuing elegance: 2.7

Gareth J Barnard -
Core developers的头像 Particularly helpful Moodlers的头像 Plugin developers的头像

Dear Danny,

Thinking off the top of my head with theme plugins not being a core functionality and looking at the list....  I think it would be possible to engineer autoloading (as done by other mechanisms) in config.php, settings.php and renderers.php that scan a given folder in the core Elegance that contains the plugins for additional functionality.  The big issue comes with the language file as that's specific to the theme frankenstyle.  Humm.  Perhaps core needs to change to make this work.

G

回复Gareth J Barnard

Re: continuing elegance: 2.7

Danny Wahl -

frankly, I would rather see core change to allow other plugin types than themes modify output renderers, then all this wouldn't be needed.  Like I said, I'm looking into options, but I don't have high hopes.

回复Danny Wahl

Re: continuing elegance: 2.7

Danny Wahl -

I have just pushed a major commit to the official github repo which refactors the category icon settings resolving several people's issues.  I believe that this is the most elegant solution that I could come up with.  I have also changed the way that the category icons are output, now via a renderer instead of a ::before() rule.  So here's the changes:

  • unique setting generated for each category on your site instead of category ID #1-20
  • font-awesome icon now uses the icon instead of html entity ("star" instead of "f0ac") like all other icon setting instances.

here you can see that I have 3 categories on my test site and they all have a setting generated.   If you change the "default category icon" it will change the default for all the others too.  So if I change "Default category icon" to "facebook" then the icon for the category "miscellaneous" will be changed to "facebook" instead of "folder".

Options for defaults and categories only appear AFTER you enable "Enable Category Icons" and push "save changes".


this probably won't land in the Moodle plugins DB for a while- as there are more bugs that need fixing first (related to other things), but I appreciate testers 大笑

回复Danny Wahl

Re: continuing elegance: 2.7

Ricardo Abreu -

Hi Guys and Gals! 微笑

I shouldn't talk about it here but, I have a question and you can make me understand whats happening.

I'm modifing the elegance theme and got stuck with this:

Im not sure if this issue is related to the theme or configuration.  When viewing a course under course menu option and click the circle i icon my description is listed twice.  Does anyone know how to remove the second entry?  

 


I dont want the second summary to appear, just one.

If I can help with something about elegance say a word and I'll be glad to help with I know.


Thanks in advance!