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.
Currently, the warning message for edit constraints that are checked on preview is appended to the preview note:
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:
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:



