⚓ T374499 Final update: Support for styling message boxes using old markup is being removed
Page Menu
Phabricator
Create Task
Maniphest
T374499
Final update: Support for styling message boxes using old markup is being removed
Closed, Resolved
Public
Actions
Edit Task
Edit Related Tasks...
Create Subtask
Edit Parent Tasks
Edit Subtasks
Merge Duplicates In
Close As Duplicate
Edit Related Objects...
Edit Commits
Edit Mocks
Mute Notifications
Protect as security issue
Assigned To
Jdlrobson
Authored By
Jdlrobson
Sep 10 2024, 10:31 PM
2024-09-10 22:31:56 (UTC+0)
Tags
User-notice-archive
(Backlog)
Referenced Files
F57522922: image.png
Sep 19 2024, 4:40 AM
2024-09-19 04:40:32 (UTC+0)
F57515375: Screenshot 2024-09-16 at 9.12.53 AM.png
Sep 16 2024, 4:17 PM
2024-09-16 16:17:52 (UTC+0)
F57515372: Screenshot 2024-09-16 at 9.12.12 AM.png
Sep 16 2024, 4:17 PM
2024-09-16 16:17:52 (UTC+0)
Subscribers
Aklapper
Izno
Jdlrobson
MBH
Nikerabbit
Novem_Linguae
putnik
View All 10 Subscribers
Description
The following wiki pages use markup for message boxes that has not been supported for some time now (see 2022 update in
T300314
for previous recommendation to move away from these styles):
Vector 2022 has been detecting and styling these but will cease to do so within the next 30 days (
T360668
).
To avoid losing CSS styling of message Please see
for the updated HTML markup you should be using.
Related Objects
Search...
Task Graph
Mentions
Status
Subtype
Assigned
Task
Resolved
None
T360668
Drop support for non-Codex message boxes (mw-message-box)
Resolved
Jdlrobson
T374499
Final update: Support for styling message boxes using old markup is being removed
Mentioned Here
T375246: Edit page should include Codex styles for message box
T363607: [EPIC] Improve the user experience of using Codex in wikitext
T375127: Support legacy message box markup inside user generated content and deprecate ResourceLoader SkinModule message-box style pack
T373602: FlaggedRevs: Codex styles display unstyled in some conditions
T300306: [subtask] successbox, errorbox and warningbox classes will no longer function in 1.39 release
T300314: [breaking, April 2022] Plan for eventual removal of styles for messagebox, successbox, errorbox and warningbox classes in mediawiki core
T360668: Drop support for non-Codex message boxes (mw-message-box)
Event Timeline
Jdlrobson
created this task.
Sep 10 2024, 10:31 PM
2024-09-10 22:31:56 (UTC+0)
Restricted Application
added a subscriber:
Aklapper
View Herald Transcript
Sep 10 2024, 10:31 PM
2024-09-10 22:31:57 (UTC+0)
Jdlrobson
updated the task description.
(Show Details)
Sep 10 2024, 10:32 PM
2024-09-10 22:32:09 (UTC+0)
Quiddity
moved this task from
To Triage
to
Announce in next Tech/News
on the
User-notice
board.
Sep 13 2024, 12:31 AM
2024-09-13 00:31:44 (UTC+0)
Jdlrobson
updated the task description.
(Show Details)
Sep 13 2024, 9:15 PM
2024-09-13 21:15:37 (UTC+0)
Quiddity
moved this task from
Announce in next Tech/News
to
In current Tech/News draft
on the
User-notice
board.
Sep 13 2024, 11:35 PM
2024-09-13 23:35:03 (UTC+0)
Tacsipacsi
subscribed.
Sep 14 2024, 9:17 PM
2024-09-14 21:17:34 (UTC+0)
Comment Actions
To avoid losing CSS styling of message Please see
for the updated HTML markup you should be using.
This is a great way to ensure that styling
is lost
on any skin other than Vector 2022 and Minerva, immediately rather than within 30 days. Compare
the original version
with the
“fixed”, i.e. broken one
on Vector 2010. Could you please,
please
not break wikis without a suitable replacement being provided?
Jdlrobson
added a comment.
Edited
Sep 16 2024, 4:17 PM
2024-09-16 16:17:44 (UTC+0)
Comment Actions
In
T374499#10146580
@Tacsipacsi
wrote:
To avoid losing CSS styling of message Please see
for the updated HTML markup you should be using.
This is a great way to ensure that styling
is lost
on any skin other than Vector 2022 and Minerva, immediately rather than within 30 days. Compare
the original version
with the
“fixed”, i.e. broken one
on Vector 2010. Could you please,
please
not break wikis without a suitable replacement being provided?
You shouldn't be using system message boxes for non-system messages as it is important these are distinguishable from messages in content - we don't want vandals using them for phishing attacks for example. These are not currently marked as a stable interface. As noted in
T300314
a lot of usages relate to the historic confusion of messagebox's introduction (context:
T300306#7699797
) the correct fix here is to
move away from that markup to a local template
- in this case
looks appropriate.
This was already "broken" in Minerva skin and for Vector 2022 with JS disabled, and there have been messages in the JS console about this for some time:
Tacsipacsi
added a comment.
Sep 16 2024, 10:18 PM
2024-09-16 22:18:01 (UTC+0)
Comment Actions
In
T374499#10149891
@Jdlrobson
wrote:
These are not currently marked as a stable interface.
Which doesn’t mean you
have
to break them. And definitely doesn’t mean you should propose a replacement that silently fails on some skins.
the correct fix here is to
move away from that markup to a local template
- in this case
looks appropriate.
Local templates are a huge tech debt. They have to be kept up to date on each wiki one by one (wastes a lot of human time) yet are bound to be different across wikis and out of date. Your proposed template
doesn’t have any interwikis, i.e. it’s so different across wikis that it doesn’t exist on any other wikis at all (or at least it’s not discoverable);
doesn’t work as expected on narrow screens (the horizontal margins and the icon on the left remain no matter how narrow the screen is, leaving too little space for the text);
doesn’t work as expected in night mode (remains dark-on-light).
Yes, it’s probably possible to fix these on Meta. And on mediawiki.org if a similar template is created there. And on Commons. And on English Wikipedia. And on French Wikipedia. One by one. I won’t, I have no time for that.
Izno
subscribed.
Sep 17 2024, 12:25 AM
2024-09-17 00:25:27 (UTC+0)
This comment was removed by
Izno
Novem_Linguae
subscribed.
Sep 17 2024, 12:56 AM
2024-09-17 00:56:05 (UTC+0)
putnik
subscribed.
Sep 17 2024, 4:26 PM
2024-09-17 16:26:39 (UTC+0)
putnik
added a comment.
Sep 17 2024, 4:36 PM
2024-09-17 16:36:39 (UTC+0)
Comment Actions
You shouldn't be using system message boxes for non-system messages as it is important these are distinguishable from messages in content - we don't want vandals using them for phishing attacks for example.
After deleting the styles, the only thing that will happen is that almost every project's Common.css will have its own (with varying degrees of obsolescence) copy of these styles. It will not appear in some, and the messages will look bad.
These styles have been used for many years, and it is strange to expect that communities will suddenly decide to come up with their own set of styles for notifications.
And the argument about vandals is quite strange. You can make the same design simply using inline styles. And this does not limit vandals in any way, so only honest editors suffer in this situation.
stjn
subscribed.
Sep 17 2024, 5:01 PM
2024-09-17 17:01:38 (UTC+0)
Comment Actions
The phishing attacks are not made more possible by the existence of
.mw-message-box
class. That argument is just false. By that point you might as well prohibit using TemplateStyles or inline styles as well, since they can replicate even Codex-looking boxes without much work (and currently anyone, including IP editors, can create TS pages on most projects, phishing galore). This change only makes it harder for legitimate users to have warnings/errors/etc. without reimplementing the same markup for the 1000th time. To this end, it should be reversed and completely abandoned as a plan, as the previously planned deprecation of
.error
class was.
Jdlrobson
updated the task description.
(Show Details)
Sep 17 2024, 7:30 PM
2024-09-17 19:30:42 (UTC+0)
MBH
subscribed.
Sep 17 2024, 11:27 PM
2024-09-17 23:27:36 (UTC+0)
Wellverywell
subscribed.
Sep 18 2024, 1:43 AM
2024-09-18 01:43:53 (UTC+0)
Sunpriat2
awarded a token.
Sep 18 2024, 7:05 AM
2024-09-18 07:05:50 (UTC+0)
stjn
added a comment.
Sep 18 2024, 10:30 AM
2024-09-18 10:30:06 (UTC+0)
Comment Actions
There is also an additional problem where Codex styles do not always get loaded reliably for every user group, see task and comment in
T373602: FlaggedRevs: Codex styles display unstyled in some conditions
Quiddity
moved this task from
In current Tech/News draft
to
Already announced/Archive
on the
User-notice
board.
Sep 18 2024, 6:37 PM
2024-09-18 18:37:40 (UTC+0)
Nikerabbit
subscribed.
Sep 18 2024, 6:46 PM
2024-09-18 18:46:32 (UTC+0)
Novem_Linguae
added a comment.
Edited
Sep 19 2024, 4:40 AM
2024-09-19 04:40:32 (UTC+0)
Comment Actions
While updating Twinkle, putting the following in a sandbox resulted in the second and third divs being unstyled.
I guess I'll import and hard code the old CSS.
Jdlrobson
added a comment.
Sep 19 2024, 3:23 PM
2024-09-19 15:23:49 (UTC+0)
Comment Actions
Thank you for the feedback here. I talked with the
Design-System-Team
about this and we agreed to continue loading support for the legacy markup on pages which use it as an interim step until there is a better way to generate interface messages in article content. This will be similar to how
mw-ui-button
styles are currently handled and will not require updating any pages while also resolving the current situation of broken styles in Minerva. More information in
T375127
Generally, we still recommend using Codex markup where you can. For example, messages in the MediaWiki namespace would typically be better served as Codex messages since they are used in a way that’s more similar to system interface messages.
provides guidance on how.
In the future we hope to offer better tools for using Codex components in wikitext so that community members don’t have to rely on markup which is not guaranteed to be stable. That work is currently tracked in
T363607
and we welcome discussion there or on related subtasks.
I hope this addresses the concerns raised on this ticket.
If things are not working as described, please consider it a bug and file a ticket and I'll make sure it gets looked into.
Novem_Linguae
added a comment.
Sep 19 2024, 8:36 PM
2024-09-19 20:36:29 (UTC+0)
Comment Actions
we agreed to continue loading support for the legacy markup on pages
Thanks. Just to clarify, does this mean that we no longer need to migrate our mw-message-box code by the mentioned deadline of next week? This will continue to work for the foreseeable future?
Also, I feel like the tickets
T374499: Final update: Support for styling message boxes using old markup is being removed
T300314: [breaking, April 2022] Plan for eventual removal of styles for messagebox, successbox, errorbox and warningbox classes in mediawiki core
T360668: Drop support for non-Codex message boxes (mw-message-box)
are all related and should probably be linked together as parent/child, but I wasn't sure which one to pick as the parent. Are messagebox and mw-message-box the same thing? If so maybe
T300314
should be the parent ticket of the other two.
Jdlrobson
added a parent task:
T360668: Drop support for non-Codex message boxes (mw-message-box)
Sep 19 2024, 9:45 PM
2024-09-19 21:45:13 (UTC+0)
Jdlrobson
added a comment.
Edited
Sep 19 2024, 9:51 PM
2024-09-19 21:51:55 (UTC+0)
Comment Actions
Thanks. Just to clarify, does this mean that we no longer need to migrate our mw-message-box code by the mentioned deadline of next week? This will continue to work for the foreseeable future?
For markup inside content that's correct but for the
21 impacted. gadgets
you'll need to either load mediawiki.legacy.messageBox or mediawiki.htmlform.codex.styles to make sure these get reliably styled per
stjn
added a comment.
Sep 19 2024, 10:38 PM
2024-09-19 22:38:11 (UTC+0)
Comment Actions
Fixed the Russian Wikipedia gadget but someone really needs to look into why Codex styling does not get fully loaded for IP users at
for example (with default skin).
@Jdlrobson
would appreciate if you could take a look at it if possible.
Novem_Linguae
added a comment.
Sep 22 2024, 6:25 PM
2024-09-22 18:25:29 (UTC+0)
Comment Actions
In
T374499#10162992
@stjn
wrote:
Fixed the Russian Wikipedia gadget but someone really needs to look into why Codex styling does not get fully loaded for IP users at
for example (with default skin).
@Jdlrobson
would appreciate if you could take a look at it if possible.
Unable to reproduce so far. Is the problem in desktop or mobile? Wikitext editor or visual editor? What should I look for?
Jdlrobson
added a comment.
Sep 23 2024, 5:42 PM
2024-09-23 17:42:11 (UTC+0)
Comment Actions
In
T374499#10162992
@stjn
wrote:
Fixed the Russian Wikipedia gadget but someone really needs to look into why Codex styling does not get fully loaded for IP users at
for example (with default skin).
@Jdlrobson
would appreciate if you could take a look at it if possible.
Assuming this is the non-JS editor. This is fixed on current master - so patches will ride the train this week. A long term fix is being tracked in
T375246
(basically the edit page and various other pages are using Codex but not adding Codex styles! Doh!).
Tacsipacsi
added a comment.
Sep 25 2024, 7:29 PM
2024-09-25 19:29:30 (UTC+0)
Comment Actions
I haven’t got around replying here. Thanks
@Jdlrobson
for reversing the decision on the style removal (at least for now)!
Jdlrobson
added a comment.
Sep 25 2024, 11:29 PM
2024-09-25 23:29:10 (UTC+0)
Comment Actions
No problem. Thanks for the feedback. Sorry for creating any unnecessary stress, I think we all share the same end-goal here of easier to maintain code!
Tacsipacsi
added a comment.
Sep 26 2024, 5:03 PM
2024-09-26 17:03:06 (UTC+0)
Comment Actions
In
T374499#10178045
@Jdlrobson
wrote:
I think we all share the same end-goal here of easier to maintain code!
Yes, absolutely. And the current situation is not really easy to maintain (nor easy to reason about nor error-free – for example, a live preview may miss the necessary styles), so I hope we can reach a solution that’s easier to maintain for MediaWiki developers
and
on-wiki template maintainers, and doesn’t have its edge cases.
Jdlrobson
closed this task as
Resolved
Oct 3 2024, 4:51 PM
2024-10-03 16:51:42 (UTC+0)
Jdlrobson
claimed this task.
Maintenance_bot
edited projects, added
User-notice-archive
; removed
User-notice
Oct 13 2024, 5:30 PM
2024-10-13 17:30:23 (UTC+0)
Log In to Comment
Content licensed under Creative Commons Attribution-ShareAlike (CC BY-SA) 4.0 unless otherwise noted; code licensed under GNU General Public License (GPL) 2.0 or later and other open source licenses. By using this site, you agree to the Terms of Use, Privacy Policy, and Code of Conduct.
Wikimedia Foundation
Code of Conduct
Disclaimer
CC-BY-SA
GPL
Credits