Page MenuHomePhabricator

Display the preview note as a notice instead of a warning
Closed, ResolvedPublic

Description

While working on implementing T394016: Check edit constraints on page preview, I noticed that presenting the preview note as a yellow warning box is a UX issue.

image.png (176×1 px, 34 KB)

Currently, the warning message for edit constraints that are checked on preview is appended to the preview note:

image.png (399×975 px, 61 KB)

The preview box is already located inside of a warning box since T232414. In my opinion, this was a bad UX decision, since especially experienced editors don't need to be visually notified via a big yellow warning box that they're previewing a page..

In the context of T394016: Check edit constraints on page preview, the main issue with this is that additional "real" warnings produced by edit constraints are no longer as visually apparent as they are when the user is e.g. trying to save an edit, which is an action that usually does not result in a warning box, unless there is a real problem. In my patch for T394016, I did not consider errors yet, since those are not produced by the RedirectConstraint, but it definitely doesn't make sense to integrate errors into a warning box.

The better solution would be to add an additional warning/error box to the page if a constraint fails on preview, which would be more consistent. However, I feel like two separate warning boxes with a heading in between could cause unnecessary confusion as well:

image.png (399×975 px, 61 KB)

This was the reason why I initially chose to integrate the warning into the existing box instead, but after thinking about this again, I feel like that's a bad idea.

I think that the preview note should use a notice box instead:

image.png (235×963 px, 21 KB)

Event Timeline

SomeRandomDeveloper renamed this task from Display preview note as a notice instead of a warning to Display the preview note as a notice instead of a warning.Jan 15 2026, 9:52 PM
SomeRandomDeveloper updated the task description. (Show Details)

Change #1227448 had a related patch set uploaded (by SomeRandomDeveloper; author: SomeRandomDeveloper):

[mediawiki/core@master] Display the preview note as a notice instead of a warning

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

Change #1227965 had a related patch set uploaded (by SomeRandomDeveloper; author: SomeRandomDeveloper):

[mediawiki/extensions/TemplateSandbox@master] Update preview note formatting to be consistent with EditPage

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

Change #1227448 merged by jenkins-bot:

[mediawiki/core@master] editpage: Display the preview note as a notice instead of a warning

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

Change #1227965 merged by jenkins-bot:

[mediawiki/extensions/TemplateSandbox@master] Update preview note formatting to be consistent with EditPage

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

Suggested wording:

The preview note that was previously displayed in a warning box will now use a neutral notice box instead. This makes it easier to distinguish actual warnings (for example, edit conflicts or problematic redirect targets), which are now shown in separate warning or error boxes.

This will be deployed with the train next week.

Suggested wording:

The preview note that was previously displayed in a warning box will now use a neutral notice box instead. This makes it easier to distinguish actual warnings (for example, edit conflicts or problematic redirect targets), which are now shown in separate warning or error boxes.

This will be deployed with the train next week.

Hello @SomeRandomDeveloper, when should this be included to Tech News?

Suggested wording:

The preview note that was previously displayed in a warning box will now use a neutral notice box instead. This makes it easier to distinguish actual warnings (for example, edit conflicts or problematic redirect targets), which are now shown in separate warning or error boxes.

This will be deployed with the train next week.

@SomeRandomDeveloper, Oh, sorry I missed this. Thank you!

Hello @SomeRandomDeveloper , I am taking over from @UOzurumba. To double check, this feature will be available for the week of February 2, right?

Suggested wording:

The preview note that was previously displayed in a warning box will now use a neutral notice box instead. This makes it easier to distinguish actual warnings (for example, edit conflicts or problematic redirect targets), which are now shown in separate warning or error boxes.

This will be deployed with the train next week.

Hello @SomeRandomDeveloper, when should this be included to Tech News?

Hello @SomeRandomDeveloper , I am taking over from @UOzurumba. To double check, this feature will be available for the week of February 2, right?

Hi, it's being deployed through this week's train, which means that it is already available on most wikis right now and will likely be deployed to the remaining wikis (those in group2, e.g. enwiki) later today (assuming there's nothing blocking the train anymore).

@SomeRandomDeveloper is this feature available on Wikipedia only?

@SomeRandomDeveloper is this feature available on Wikipedia only?

No, the change is visible when previewing an edit, which can be done on all wikis.

@SomeRandomDeveloper I've tweaked the Tech News entry to use this wording, which I believe is both clearer and easier to translate. Please edit that onwiki (within the next 24 hours) if further adjustments are needed. Thanks!