Page MenuHomePhabricator

Deprecate the EditPageBeforeEditToolbar hook
Closed, ResolvedPublic

Description

This hook, documented as Use this hook to add an edit toolbar above the textarea in the edit form., basically serves no purpose anymore.

It allows extensions to add a custom edit toolbar, which will be wrapped in a div with the id toolbar, one of the legacy styling to be removed (T89981). This legacy styling also limits the bar to 22px, causing a FOUC when not exactly 22px high.

In its current usage it is only ever used to disable itself, which is pointless - when no hook modifies the toolbar, it is not shown (T30856).

Extensions that want to change the edit area use different hooks, given that none of the popular editor extensions (VisualEditor, CodeEditor, WikiEditor etc) are listed.

Event Timeline

Change 675167 had a related patch set uploaded (by Mainframe98; author: Mainframe98):
[mediawiki/core@master] Deprecate the EditPageBeforeEditToolbar hook

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

Change 675167 merged by jenkins-bot:
[mediawiki/core@master] Deprecate the EditPageBeforeEditToolbar hook

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

Change 675866 had a related patch set uploaded (by DannyS712; author: DannyS712):

[mediawiki/core@master] EditPageBeforeEditToolbarHook no longer stable to implement

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

Change 675866 merged by jenkins-bot:

[mediawiki/core@master] EditPageBeforeEditToolbarHook no longer stable to implement

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

Jdlrobson claimed this task.

@Jdlrobson shouldn't this task remain until the hook is actually removed?

@Jdlrobson shouldn't this task remain until the hook is actually removed?

It's my preference to separate deprecation and removal into separate tasks since it's going to be at least 1.37 but more likely 1.38 when we actually remove this. I tend to do a review of candidates just before a release for possible candidates

e.g. like this query.
https://codesearch.wmcloud.org/search/?q=%40deprecated%20(1.34%7C1.35)&i=nope&files=&excludeFiles=&repos=

DannyS712 renamed this task from Deprecate and remove the EditPageBeforeEditToolbar hook to Deprecate the EditPageBeforeEditToolbar hook.Mar 30 2021, 10:39 PM

@Jdlrobson shouldn't this task remain until the hook is actually removed?

It's my preference to separate deprecation and removal into separate tasks...

Mine too, just was confused because the task title included removing it - updated