Skip to content

Conversation

Kenny2github
Copy link
Member

@Kenny2github Kenny2github commented Oct 19, 2021

Here's some doctored screenshots:
enwiki homepage, transplanted to my local instance (hence the missing images):
enwiki homepage in new design
My sandbox, with the pencil menu now just a button:
my sandbox without pencil menu
My sandbox, with the pencil menu shown:
my sandbox with pencil menu

ScratchWikiSkinTemplate.php:
* Note that pencil menu may be removed
+ Include content actions in an explore-tabs div
  * Divide left and right between discussion and edit

main.css:
* Refactor a bunch of selectors to not depend on .dropdown-toggle
  (since it's now possible that that class will be removed from the
  pencil menu altogether)
* Also, what was that idiocy I saw with individually specifying
  .create, .explore, etc.
* Note what to do if pencil menu is removed
+ New styling for explore-style tabs
  * Mostly copied from Scratch source
  * Some explore-specific rules omitted
  * Some colors no longer specified using transparency
  * Since MW so conveniently provides a "selected" class in its
    content-actions, make full use of it instead of Scratch's "active"
Scratch has <a><li> while we have <li><a>
Without this change, only the actual text counted as the link
Now the whole button properly counts
@Kenny2github Kenny2github added design Related to the skin design needs-discussion This issue or pull request needs further discussion before proceeding prio-low This issue is of low priority. labels Oct 19, 2021
@Kenny2github Kenny2github self-assigned this Oct 19, 2021
@Kenny2github
Copy link
Member Author

In German (and therefore presumably other languages) the buttons have long enough text to wrap. This is the best I can do unless others have suggestions:
bad german layout

@Ascor8522
Copy link
Contributor

How about using icons instead of wrapping text?
Everybody would be able to understand them, and they don't take as much place as text.

Here is a screenshot of what it would look like.
I made it in like 2 mins, so they icons don't really match and I guess the spacing could be adjusted, but anyway.
image

You could even hide all the icons on the left under some kind of dropdown.
image

@Kenny2github
Copy link
Member Author

Kenny2github commented Oct 22, 2021

@Ascor8522 Once you figure out how to make MediaWiki's content_actions data member produce icons, I will go right ahead.
Dropdown is out though, because we are still keeping the pencil menu.

@Ascor8522
Copy link
Contributor

Ascor8522 commented Oct 22, 2021

@Ascor8522 Once you figure out how to make MediaWiki's content_actions data member produce icons, I will go right ahead. Dropdown is out though, because we are still keeping the pencil menu.

It's fairly easy with a bit of css.

For example, I changed the dropdown menu only with css, so it must be possible to do the same for other parts of the skin.

For the dropdown:
All the links have a different id, all starting with ca-, we can use this at our advantage.

ul.dropdown > li[id^=ca-] > a {
	content-visibility: hidden; /* hide the previous text, if any */
	width: 25px; /* width of the icon */
	height: 25px; /* height of the icon */
	margin: 5px; /* margin for men */
	padding: 0; /* remove the padding of the icons */
	background-size: cover; /* make the icon take the whole width and height */
        background-position: center; /* center the icon */
}

ul.dropdown {
    min-width: unset; /* make the dropdown resize to the fitting width */
}

and for every single element of the dropdown

ul.dropdown > li[id=ca-nstab-main] > a { /* here, it is the first entry of the dropdown, aka. "Main Page" */
    background-image: url(); /* enter the url of the icon here */
}

image

And here is your css dropdown.
Now replace the random images with actual icons...

@Kenny2github
Copy link
Member Author

@Ascor8522 Good one! It might also be a good idea to have the icon expand into the text when hovered over (not just hover text). I'll see what I can do with that in the coming days.

ScratchWikiSkinTemplate.php:
- Decided not to remove the pencil menu
* Use a hack to add a span inside the <a> for styling purposes

resources/css/main.css:
* Even padding in icon mode
* Default background image is dropdown arrow, to be overridden
* Show text on hover, focus, or selected
- Decided not to remove the pencil menu
@Kenny2github
Copy link
Member Author

@Ascor8522 I've added the framework - do you mind either finding or making icons (that we're allowed to use, and credit if necessary) to put into the tabs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design Related to the skin design needs-discussion This issue or pull request needs further discussion before proceeding prio-low This issue is of low priority.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants