Page MenuHomePhabricator

Clearer naming conventions for Non-JS CSS files like `mediawiki.action.history.styles.css`
Open, LowPublic

Description

Currently we implement modules with two CSS/Less files named

  • mediawiki.action.history.css
  • mediawiki.action.history.styles.css

One for styling elements in the main rendering, and the other for elements specific to the JS enhanced experience.

Let's find a less confusing and redundant naming pattern.
Are all the occasions of *.styles.css only including “basic” styles for non-JS support like the above as this task is a follow-up to https://gerrit.wikimedia.org/r/#/c/294701
Others in core are:

  • mediawiki.action.edit.styles.css
  • mediawiki.special.preferences.styles.css
  • mediawiki.special.search.styles.css
  • mediawiki.special.upload.styles.css

Event Timeline

Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptJun 16 2016, 10:37 PM
Krinkle updated the task description. (Show Details)Jun 16 2016, 11:40 PM

Echo uses in its modules folder two sub-foldersnojs and styles – side-by-side.
I like the idea of a nojs folder, but would rather like to see it as child of the corresponding folder like

  • mv resources/src/mediawiki.action/mediawiki.action.history.css resources/src/mediawiki.action/nojs/mediawiki.action.history.css

Can ResourceLoader handle two files with the same name in two folders?

Volker_E triaged this task as Low priority.Jul 13 2016, 4:56 PM
Volker_E moved this task from Inbox to Accepted on the Front-end-Standards-Group board.
Volker_E added a comment.EditedJul 15 2016, 1:58 PM

After a short conversation at the Front-end-Standards-Group meeting @Krinkle ensured, that RL would be able to handle two files like laid out above easily, but there has been a tendency lately (?), to change file names towards file paths reflecting module hierarchy.
The proposals that have been brought up:

  • resources/src/mediawiki.action/history.css
  • resources/src/mediawiki.action/nojs/history.css
  • resources/src/mediawiki.action/history/styles.css
  • resources/src/mediawiki.action/history/noscript.css
  • resources/src/mediawiki.action/history/basic.css or main.css
  • resources/src/mediawiki.action/history/dynamic.css or interactive.css

There has been a related patch on bringing more sanity to print-only CSS files https://gerrit.wikimedia.org/r/#/c/308193/ by @Fomafix