openSUSE / wiki

openSUSE Wiki
http://en.opensuse.org
25 stars 17 forks source link

New UI theme for wiki #9

Closed guoyunhe closed 7 years ago

guoyunhe commented 7 years ago

This theme/skin is based on Bootstrap 4, applied with openSUSE brand guidelines.

Screenshots:

2017-07-08 15 30 09-fullpage

2017-07-08 15 52 33

2017-07-08 15 49 02

guoyunhe commented 7 years ago

2017-07-08 19 58 28

guoyunhe commented 7 years ago

Now support Gravatar, like what is used in build service and news sites. The user menu is now in a dropdown menu.

2017-07-08 21 41 58

sysrich commented 7 years ago

Another beautiful piece of work :) pinging @cboltz - what do you think, oh great wiki overlord?

cboltz commented 7 years ago

I was a busy with other stuff (for example updating the english wiki) in the last week, sorry for the delay!

This looks great! :-)

However, on the technical side, it looks like you created and tested this skin with MediaWiki 1.22. When trying on 1.27 (with wfLoadSkin('chameleon');), I get an error Uncaught Exception: /home/www/oswiki.tux/httpdocs/wiki/skins/chameleon/skin.json does not exist!

I know I mentioned the "Chameleon" skin to you as an example a while ago - and as I just found out, it shares exactly this problem :-( Looking through the list of bootstrap-based MediaWiki extensions, I noticed that most of them were not updated for MediaWiki 1.27. The only bootstrap-based skin that works with 1.27 is https://www.mediawiki.org/wiki/Skin:Tweeki (see http://tweeki.thai-land.at for details). This theme seems to allow quite some customization, but I don't know if it's enough for us. Also note that Tweeki is based on bootstrap 3.3.7, not 4.0. (Note: I didn't test Tweeki, but based on its filelist etc., I expect it to work ;-)

Now the question is: do we want to use Tweeki as a base, or do we want to maintain the complete theme on our own?

If you prefer to maintain the complete theme, have a look at the git history of https://github.com/cboltz/wiki - the changes I had to do to the Bento theme (the 4 commits starting at "b55eb59 - move skin files and add skin.json") should help to understand the needed changes. The Bento theme is probably not a perfect example about how a theme for MediaWiki 1.27 should be made, but it works ;-)

If you need help with adjusting the theme for MediaWiki 1.27, tell me. I might not have time in the next days (my priority is to get all wikis updated and moved to Nuremberg), but when this is done, I'll happily help ;-)

(CC @ccboltz to get this comment as a mail ;-)

guoyunhe commented 7 years ago

@cboltz I feel it is better to have our own skin. It is not a big work when using Bootstrap.

I will try to test this on MediaWiki 1.27. It is better if you could update this git repository if you finished all wiki server upgrade.

cboltz commented 7 years ago

If you prefer to have our own skin - no problem ;-)

FYI: I just merged the changes for 1.27 into this repo.

guoyunhe commented 7 years ago

Now it should work on MediaWiki 1.27. I tested on my local system, which is just a fresh MediaWiki installation and this skin. Could @cboltz test it on https://en-test.opensuse.org/ ?

I guess some wiki templates are using some CSS classes of bento skin. I also need to test and migrate these templates.

cboltz commented 7 years ago

As you can see from the above comments, I didn't find any serious issues. The most serious is the "Undefined index" warning which would flood the error_log ;-) - but even this is quite harmless.

So, even if I found some small issues: the new skin looks very good - both the source code and what you get in the browser :-)

I'll accept this pull request and deploy the new skin on en-test.opensuse.org after the issues I mentioned are fixed. Feel free to keep the sponsor handling unchanged for now - I just wanted to have a note/reminder about it somewhere.

To give you an idea how the new skin looks with "real" openSUSE wiki content, here's a screenshot from my local test instance:

portal-wiki

Note to myself: An interesting question is how we'll handle the res submodule. Since we have RPMs for all the wiki stuff, the best (and easiest) way is probably to create a separate RPM for it.

guoyunhe commented 7 years ago

These problems should have been fixed. Let's see how it works on en-test.opensuse.org .

cboltz commented 7 years ago

I'll keep the sponsor logo handling on my TODO list. Besides that, everything looks good. I'll merge your changes and update the RPMs we use on the wiki VM.

The review of the RPMs and the needed config changes might need a few days - I'll write a mail to the heroes mailinglist when en-test.o.o has the new skin.