Page MenuHomePhabricator

Cite lost styling due to T280766
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Edit a page section of a page which uses named references, and the named reference content isn't in the text, such as Tor (network) 3rd section

What happens?:

  • The notice that indicates the content is elsewhere displays as
    image.png (101×590 px, 10 KB)

What should have happened instead?:

  • These notices should be colored or otherwise indicated as differing, for example:
    image.png (90×535 px, 8 KB)

Other information (browser name/version, screenshots, etc.):
This is a regression, most likely due to T280766: Phase out legacy error, warning and success classes for usage outside the parser. That would make the expected styling color: #ac6600; font-size: larger; as these carry the warning class. I think an appropriate fix for this ticket would remove warning and add styling for the color to the class mw-ext-cite-warning in ext.cite.styles.css (I don't think the size change is desirable in this context, but ymmv). There may be other uses of mw-ext-cite-warning in the extension.

Details

Event Timeline

Izno moved this task from Unsorted backlog to Defect backlog on the Cite board.

This is fallout from T281228: Provide styling for parser-outputted .error class in content-parser-output; kinda. The parser only uses .error, not .warning, so only .error was made available. Depending on how many other uses of parser-outputted warnings there are, it might be a good idea to do the same thing for .warning in content.parser-output.less to allow other extensions to benefit as well.

@Jdlrobson What do you think? Add styling for parser-emitted warning in core's content.parser-output.less or handle this edge case in Cite?

The case was actually caught in the code search in T280766, just only in a test file because Cite is doing something abominable with how it's adding the warning class. :) I think it makes more sense to do it in Cite here given the reason warning wasn't added to content.parser-output.less.

Hmm, warning seems to be used much more than not after a review of Code search. I'll leave some comments on the original task. I still don't think that indicates that we should add it, since in the wild it's not used often and there aren't other extensions that depend on it for core functioning (like ParserFunctions and error).

I would suggest extension-level fixes at this point. Either they should use warningbox or ship their own styles for the given context.

I'll implement this in Cite then. Thanks!

Change 848446 had a related patch set uploaded (by Mainframe98; author: Mainframe98):

[mediawiki/extensions/Cite@master] Restore styling for cite warnings

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

Change 848446 merged by jenkins-bot:

[mediawiki/extensions/Cite@master] Restore styling for cite warnings

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