Page MenuHomePhabricator

Banners should support extraClassNames parameter
Closed, ResolvedPublic

Description

Create a generic "extraClassNames" parameter to add one or more CSS class names to the banner wrapper.
This for instance allows solving of the problem of dark text on dark banners.
The overall banner theme could be flipped, like replacing dark with white and white with dark.
usage:

{{PAGEBANNER:|extraClass=darkOnWhite otherClassName|}}

Event Timeline

Jdlrobson raised the priority of this task from to Needs Triage.
Jdlrobson updated the task description. (Show Details)
Jdlrobson moved this task to Epics on the Wikidata-Page-Banner board.
Jdlrobson subscribed.
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Jdlrobson added a project: good first task.
Jdlrobson set Security to None.
Jdlrobson lowered the priority of this task from High to Medium.Oct 9 2015, 8:08 PM

I'd be ready to mentor this in GCI 2015.

I am currently working on implementing this feature. The model I have in mind is this one: property name will be extraClasses.

The property will support multiple classes separated by semicolons ; (I believe semicolon will not create any conflict in the syntax).

I am waiting for you feedback. Thank you!

You can let the classes remain separated by space, as in the example.

You can let the classes remain separated by space, as in the example.

I haven't seen the example. Then I'll implement it as it is in the example

Change 259152 had a related patch set uploaded (by Victorbarbu):
Added WikidataPageBanner support for extraClass

https://gerrit.wikimedia.org/r/259152

Adding a php unit test might be advisable before calling this completely done!

My pleasure!

If it is still needed, I could try writing some tests, but I am not sure what could go wrong.

Change 259152 merged by jenkins-bot:
Added WikidataPageBanner support for extraClass

https://gerrit.wikimedia.org/r/259152

@Victorbarbu yeh I think it might be overkill - we are probably good without them!