Page MenuHomePhabricator

Mobile reply tool doesn't expand the relevant section when recovering autosaved changes
Closed, ResolvedPublic

Description

Mobile reply tool doesn't expand the relevant section when recovering autosaved changes. You can't expand it manually either, so that makes the reply almost completely inaccessible.

This seems to be the result of T320753 + T322628. We didn't consider how these changes would work together.

Event Timeline

I think this only happens if you recover in a new tab. We "upgraded" to localStorage, whereas MobileFrontend still uses sessionStorage for remembering which sections are expanded.

Ordinarily it does, but we disable this behavior in DiscussionTools. I can reproduce the problem by just refreshing the page after typing a comment.

Ordinarily it does, but we disable this behavior in DiscussionTools. I can reproduce the problem by just refreshing the page after typing a comment.

We don't disable it, but it doesn't work when the page is wide (which it will be if you are testing on desktop).

It appears when the page is narrow we just add the disabling class too early.

Change 911318 had a related patch set uploaded (by Esanders; author: Esanders):

[mediawiki/extensions/MobileFrontend@master] Ignore collapsible-heading-disabled when restoring from saved state

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

^ The above patch fixes narrow mobile. We have a slightly broader problem on wide mobile, as the MF code assumes that sections are never auto-collapsed, so doesn't try to restore expanded selections.

Change 911318 merged by jenkins-bot:

[mediawiki/extensions/MobileFrontend@master] Toggler: Ignore collapsible-heading-disabled when restoring from saved state

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

We have a slightly broader problem on wide mobile, as the MF code assumes that sections are never auto-collapsed, so doesn't try to restore expanded selections.

Is this fixed by https://gerrit.wikimedia.org/r/c/mediawiki/extensions/MobileFrontend/+/911324?

We have a slightly broader problem on wide mobile, as the MF code assumes that sections are never auto-collapsed, so doesn't try to restore expanded selections.

Is this fixed by https://gerrit.wikimedia.org/r/c/mediawiki/extensions/MobileFrontend/+/911324?

Yes

matmarex assigned this task to Esanders.
matmarex added a subscriber: Escargot_rouge.

Either we missed something, or this broke again. I can reproduce the bug in the duplicate report.

I think the original bug here was that it was never working. The new bug is about the localStorage vs sessionStorage issue.