Page MenuHomePhabricator

Follow up on postEditMobile removal in GrowthExperiments
Open, MediumPublic4 Estimated Story Points

Description

postEditMobile is being replaced by postEdit in https://gerrit.wikimedia.org/r/c/mediawiki/extensions/MobileFrontend/+/915840. The two hooks behave somewhat differently so we need to make sure our hook handlers don't break.

  • StructuredTaskSaveDialog: I think we just need to drop the OO.ui.isMobile() branch. Probably needs to happen on the same train as the MobileFrontend patch, I don't see an easy way to make it work with both versions.
  • SuggestedEditSession: nothing to do here, I think. The data.newRevId === null branch will be handled by StructuredTaskSaveDialog instead. newRevId will be loaded on demand via API since the postEdit hook doesn't provide it. The nextRequest isn't needed since postEdit runs reliably after the reload (?).
  • I don't think MidEditSignup is affected.

Event Timeline

Change 949081 had a related patch set uploaded (by Sergio Gimeno; author: Sergio Gimeno):

[mediawiki/extensions/GrowthExperiments@master] [WIP] Post edit: remove postEditMobile hook handlers

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

It seems that we missed that train long ago :/ I did a quick e2e test of the affected code paths (and non-affected, please comment if there are missing cases). See also T343904. cc @Tgr @Etonkovidova:

PlatformTaskEditorShows toast notificationShows post edit panelNotes
DesktopUnstructuredSourceYesYes
DesktopUnstructuredVEYesYes
MobileUnstructuredSource editingYesYes
MobileUnstructuredVisual editingYesYes
DesktopStructured (AddLink)VEYesYes
MobileStructured (AddLink)VEYes, wrong messagingYesYields console errors, same as T342465#9081167. The messaging is wrong when all recommendations have been rejected (You've published an edit as opposite of Thanks for reviewing suggestions. Keep going!)

I'm investigating forward the wrong messaging issue.

  • StructuredTaskSaveDialog: I think we just need to drop the OO.ui.isMobile() branch. Probably needs to happen on the same train as the MobileFrontend patch, I don't see an easy way to make it work with both versions.

I tried to check the StructuredTaskSaveDialog OO.ui.isMobile() branch and what I am observing is that getTeardownProcess method is not reached due to the consistent window reload (?). I guess we need to move the instrumentation call somewhere else. What I don't get is how the instrumentation was done before in the reload path. cc @Tgr

  • SuggestedEditSession: nothing to do here, I think. The data.newRevId === null branch will be handled by StructuredTaskSaveDialog instead. newRevId will be loaded on demand via API since the postEdit hook doesn't provide it. The nextRequest isn't needed since postEdit runs reliably after the reload (?).

I agree, removing the handler in https://gerrit.wikimedia.org/r/949081

  • I don't think MidEditSignup is affected.

Maybe just tackling the TODO @matmarex left

Sgs set the point value for this task to 4.Oct 31 2023, 5:11 PM
Sgs moved this task from Incoming to Ready on the Growth-Team (Sprint 2 (Growth Team)) board.
Sgs removed Sgs as the assignee of this task.Nov 7 2023, 4:47 PM

Unassigning since I'm not actively working on this although it might relate (or not) to T348362.

KStoller-WMF raised the priority of this task from Low to Medium.Nov 28 2023, 5:32 PM