Page MenuHomePhabricator

Message box appears unstyled in Flagged revisions edit
Closed, ResolvedPublic1 Estimated Story PointsFeature

Description

Thanks @Izno for the report

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

What happens?:
Unstyled message box

image.png (310×1 px, 47 KB)

What should have happened instead?:

Styled.
Relates to this code:
https://gerrit.wikimedia.org/g/mediawiki/extensions/FlaggedRevs/+/e090bb478989e1955d0730dfb374c89ef34fd3e3/includes/frontend/FlaggablePageView.php#943

There are various instances of code adding message boxes without the appropriate style pack

Adding $out->AddModuleStyles( 'mediawiki.codex.messagebox.styles' ); where these methods are used will fix the issue.

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

Event Timeline

Novem_Linguae set the point value for this task to 1.Mar 18 2025, 9:19 PM

Change #1130208 had a related patch set uploaded (by Novem Linguae; author: Novem Linguae):

[mediawiki/extensions/FlaggedRevs@master] FlaggablePageView: add module styles for Codex message box

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

Looking at this again, I think this is a misunderstanding. The message is being styled as an inline warning
So if that's correct, this should be declined.
If not, this task should be repurposed as a feature request that it should be a block message not inline.

https://doc.wikimedia.org/codex/latest/components/demos/message.html#message-layout

Izno changed the subtype of this task from "Bug Report" to "Feature Request".Mar 24 2025, 7:13 PM

Didn't realize inline has no styling (which is fine), so yes this is not a bug. (It did seem weird that it was live on en but the patch cutting styles wasn't yet.)

I think it makes sense to style this as block. Probably notify (like in your screenshot) or yellow level (not red).

Change #1130208 abandoned by Novem Linguae:

[mediawiki/extensions/FlaggedRevs@master] FlaggablePageView: add module styles for Codex message box

Reason:

ticket requirements changed

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

Change #1130784 had a related patch set uploaded (by Novem Linguae; author: Novem Linguae):

[mediawiki/extensions/FlaggedRevs@master] FlaggablePageView: style protection warning as block instead of inline

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

On a page with pending changes on huwiki, your change would look like:

Screenshot 2025-03-25 at 11-06-45 Editing Kovács Győző (sportoló) - Wikipédia.png (327×958 px, 70 KB)

What about combining all of FlaggedRevs’ notices in one box?

Screenshot 2025-03-25 at 11-07-51 Editing Kovács Győző (sportoló) - Wikipédia.png (282×974 px, 68 KB)

I've updated the patch. How's this look?

image.png (788×2 px, 200 KB)

I don’t think you should combine inline and block message boxes: this is no longer Codex. FlaggedRevs already has some almost-but-not-quite-Codex layout, we shouldn’t increase the number of them. Your first attempt with the separate message boxes is more acceptable to me, as it’s real Codex, even if a bit larger than what I’d wish.

By the way, in the pre-Codex version, simply the <p>s were concatenated in a common box (which is also what I proposed), without any icons or extra bolding. A screenshot from a dev wiki I haven’t updated for a while:

Screenshot 2025-03-26 at 09-29-44 Editing Sablon Extension.png (213×1 px, 58 KB)

Before I make a 4th attempt, would you please tell me exactly how you would like this coded to get a +1 from you please?

I’ve made a suggestion on Gerrit.

Change #1130784 merged by jenkins-bot:

[mediawiki/extensions/FlaggedRevs@master] FlaggablePageView: style protection warning as block instead of inline

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