archwiki icon indicating copy to clipboard operation
archwiki copied to clipboard

Add support for Timeless skin in the ArchLinux extension

Open progandy opened this issue 3 years ago • 9 comments

The switch to the new Vector skin caused some controversy among desktop wiki users. The Timeless skin is a more polished alternative responsive skin. These changes should implement support for the Timeless skin in the ArchLinux extension.

Here are some images of what it should approximately look like: https://abload.de/gallery.php?key=kSKQLkmd Bild skintimelessmediawikinmjww.png auf abload.de Bild skintimelessmediawikiayjd0.png auf abload.de Bild skintimelessmediawiki33js1.png auf abload.de Bild skintimelessmediawikigdkuq.png auf abload.de Bild skintimelessmediawikixtjfj.png auf abload.de Bild skintimelessmediawikin7j54.png auf abload.de

It was not tested in an archwiki installation, but with this userscript on mediawiki.org: https://gist.github.com/progandy/c3459f7e49c295e70563a44e0a27ba73

progandy avatar Dec 25 '21 22:12 progandy

Is the "MediaWiki" (probably $wgSitename) at the top left corner a feature of the skin? Can it be suppressed?

lahwaacz avatar Dec 26 '21 06:12 lahwaacz

Is the "MediaWiki" (probably $wgSitename) at the top left corner a feature of the skin? Can it be suppressed?

It uses the timeless-sitetitle message which defaults to {{int:Sitetitle}}.

nl6720 avatar Dec 26 '21 07:12 nl6720

Text in code blocks looks smaller because Timeless doesn't use the font-family: monospace,monospace; workaround (Vector added it a few releases back).

Since we're setting font-family in arch_common.less, it can be fixed for all skins there:

diff --git a/extensions/ArchLinux/modules/arch_common.less b/extensions/ArchLinux/modules/arch_common.less
index 2a6bebaa9..73121c5a6 100644
--- a/extensions/ArchLinux/modules/arch_common.less
+++ b/extensions/ArchLinux/modules/arch_common.less
@@ -49,7 +49,7 @@ body {
     code,
     tt {
         background-color: @code-background-color;
-        font-family: monospace;
+        font-family: monospace, monospace;
     }
 
     code,

nl6720 avatar Dec 26 '21 08:12 nl6720

All changes done, I can squash them later.

Is the "MediaWiki" (probably $wgSitename) at the top left corner a feature of the skin? Can it be suppressed?

What do you propose as a change? Leave it as an empty space or extend the search bar to the left? Personally I like the wiki name (ArchWiki) being there, but if you two prefer it without I can hide it.

progandy avatar Dec 26 '21 10:12 progandy

IMHO leave it as it is. We'll just edit MediaWiki:timeless-sitetitle to remove the title.

nl6720 avatar Dec 26 '21 10:12 nl6720

I am a little worried about maintenance when we add more and more custom CSS. We already support two Vector versions and Monobook. This makes upstream updates harder as there is no easy way to detected breaking changes.

In general I'd prefer to reduce our customization to a minimal set of patches to the new Vector theme.

pierres avatar Dec 29 '21 11:12 pierres

@progandy, could you split off 37e8fef0cf424652b27adae18f4a2618479fd1c8 and 8446d46782c3b94bf3db89adb74b4c433a4eb3c3 into a separate PR so that they do not get held up by this PR?

nl6720 avatar Jan 03 '22 18:01 nl6720

@progandy, could you split off 37e8fef and 8446d46 into a separate PR so that they do not get held up by this PR?

Done. If you prefer not to merge the timeless skin, feel free to close this PR.

progandy avatar Jan 03 '22 20:01 progandy

The split-off PR was merged. @progandy could you rebase?

nl6720 avatar Mar 29 '22 14:03 nl6720

I noticed that Timeless renders page categories in the sidebar (just below language links), which feels awkward but there is probably no way to change that.

lahwaacz avatar Dec 31 '22 09:12 lahwaacz

I noticed that Timeless renders page categories in the sidebar (just below language links), which feels awkward but there is probably no way to change that.

Edit: For screen sizes larger than 1340 pixels, there is a sidebar on the right with language and category links. That does not seem awkward to me.

For screen sizes <1100px The categories appear below the content. To make that permanent, the following css would work. You could also limit the change to the range of 1339 to 1100 pixels which has only a left sidebar.

#catlinks {
  display: block;
  padding: 1em;
}

#catlinks-sidebar {
  display: none;
}

progandy avatar Dec 31 '22 09:12 progandy

The category links in the (left or right) sidebar are probably fine. Currently we have an override in MediaWiki/Common.css to place #catlinks at the top, but since the links are duplicated in the DOM and can be styled separately with #catlinks and #catlinks-sidebar, it would be possible to adjust it later.

lahwaacz avatar Dec 31 '22 13:12 lahwaacz

The responsive design is still quite inconsistent, because the Arch navbar changes at 845px, whereas Timeless changes to the most narrow style at 850px. But I guess there is no way to easily change the thresholds?

It would be easier and maybe even a better idea to change the threshold for the arch navbar. I already increased it from 830px to 845px to prevent problems with the scrollbar: https://github.com/archlinux/archwiki/commit/ad9454a582af7ec636af2376d7aa460b4b669d3e This change would probably be useful for all other components of the arch site using the navbar like the fourm. image By the way, the homepage behaves differently from forum or wiki.

progandy avatar Dec 31 '22 17:12 progandy

By the way, the homepage behaves differently from forum or wiki.

Oh yes, we should find a way to integrate archlinux-common-style in the wiki... Its responsive design is still in a merge request, though.

lahwaacz avatar Dec 31 '22 18:12 lahwaacz

https://gitlab.archlinux.org/archlinux/archwiki/-/merge_requests/50

christian-heusel avatar Mar 07 '24 14:03 christian-heusel