moodle-an-hochschulen / moodle-theme_boost_union

Theme Boost Union is an enhanced child theme of Boost which is intended, on the one hand, to make Boost simply more configurable and, on the other hand, to provide helpful additional features for the daily Moodle operation of admins, teachers and students.
GNU General Public License v3.0
55 stars 49 forks source link

Upgrade: Boost Union settings were moved to an admin settings category of its own to support the new theme chooser on Moodle 4.4, resolves #482. #609

Closed abias closed 3 months ago

abias commented 3 months ago

This PR ships with a commended Behat test in tests/behat/theme_boost_union_general.feature which cannot be uncommented before Moodle 4.4

I will create a follow-up issue to uncomment it on 4.4.

abias commented 3 months ago

I merge this myself without peer review as it's a no-brainer and tests have passed

lucaboesch commented 3 months ago

I think I still see

image

on a Moodle main branch with Boost Union.

lucaboesch commented 3 months ago

Please ignore. All good.

I've not been to a fully updated master branch of Boost Union.

lucaboesch commented 3 months ago

The only thing I see, though, is that Boost Union now has an entry both in the Theme selector page (admin/themeselector.php) and as well creates admin subcategories under "Appearence" (admin/search.php#linkappearance).

image

I think the latter (creating admin subcategories under "Appearence") could/should be suppressed for 4.4 onwards. That could maybe be accomplished by a version comparison switch or similar.

monnardj commented 3 months ago

Also, if you edit boost_union theme settings through the cog icon (via "Appearance/Themes"), they all appear on a single page, without tabs, whereas Boost has two tabs (as in previous Moodle versions). Note also that both settings pages have a different title : "Boost" vs "Category:Boost Union".

Edit : now I see that if you click on a category title, e.g. "Look", you can get to the corresponding subpage with tabs. But if you remove the subcategories under "Apperance" (per Luca's suggestion), then arriving at the right setting becomes quite tedious.

boost_union boost
abias commented 3 months ago

Thank you both for your comments, @lucaboesch and @monnardj ,

your findings are both right.

  1. On the Moodle 4.4 theme selector admin/themeselector.php, Boost Union is listed. This is necessary as it's the way how the admin sets the active theme. This is more or less the same way as it has always worked in Moodle, the selector UI has just been modified.

  2. The theme selector links to each theme's settings page. This is a hardcoded behaviour in Moodle core in 4.4 and I haven't found a way to change this (except the ugly approach to hide Boost Union's cog icon on this page with CSS). However, Boost Union does not only have one settings page (like Boost Core or Classic), it has 6 settings pages and there may be more in the future. The theme selector is not able to support that. So the only solution which I could think of was to link from the theme selector page to the Boost Union settings category which shows all of Boost Unions settings. This settings category page is also a standard feature of Moodle - it is just not pretty.

  3. Against this background, it is necessary from my point of view to keep the Boost Union setting admin categories on the "Appearance" page.

If you have any ideas how we can do better, don't hesitate to submit an issue or a PR.

Cheers, Alex

abias commented 3 months ago

Ah, I see what you mean now! The behaviour which I described above is the behaviour on Moodle 4.4dev. But the behaviour on 4.3 is now inferior than before. I will try to improve this and submit a new PR.

abias commented 3 months ago

@lucaboesch @monnardj - please see my follow-up PR on #612