Page MenuHomePhabricator

Move submit button label logic from PageEdit and edit constraints back to EditPage
Open, Needs TriagePublic

Description

PageEdit shouldn't be aware of the editing interface, and therefore also of the fact that there is a submit button.

EditPage should instead wrap messages returned by PageEdit where necessary.

Event Timeline

FYI, there are some cases where an extension needs to know the right button label (e.g. VisualEditor) or needs to override the button label (e.g. FlaggedRevs T179326, WikimediaCustomizations T427957). I don't know where the interfaces for doing that should live, but in the long term, it shouldn't be internal to EditPage. (I'm fine with moving them for now.)

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

[mediawiki/core@master] PageEditStatus: Indicate whether the edit can be resubmitted

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

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

[mediawiki/core@master] [WIP] Start removing submit button label logic from PageEdit

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

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

[mediawiki/core@master] EditPage: Use EditStatusFormatter to wrap RedirectConstraing warnings

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