Page MenuHomePhabricator

Reply Tool (mobile) remains visible when section is collapsed
Closed, ResolvedPublic

Description

Behavior

  1. Using the mobile skin, visit a talk page where the Reply Tool is enabled. E.g. https://fr.m.wikipedia.org/wiki/Discussion:Citron .
  2. Tap a section heading to open it. E.g. Perte de vitamine...
  3. Tap on a [ reply} affordance to open the Reply Tool
  4. Decide you want to view a difference section, so you tap the

Actual

  1. ❗️Notice the section you opened in "2." is collapsed, but the Reply Tool you opened in "3." opened remains open outside of the section:

Screen Shot 2022-10-02 at 5.12.35 PM.png (710×816 px, 89 KB)

Expected

  1. ✅ Notice the section you opened in "2." is collapsed and the Reply Tool you opened in "3." opened is not visible
NOTE: if you entered text into the Reply Tool you opened in "3." you should be asked if you want to disregard the comment you started drafting when you attempt to collapse the section. I wonder if we can remove this prompt when T218663 is resolved and instead introduce some kind of visual cue that enables people to see which section they started drafting a comment within. (To be discussed on T320753)

Done

  • Expected behavior is implemented

Event Timeline

I would expect the reply tool to remain open in the collapsed section, i.e. if I reopen the section, it will be there, containing my draft comment. (Ideally even if there’s no draft comment yet, so that I don’t have to find the comment I’m replying to yet again.) For example, if I just want to quickly look up something in another section that I need in my reply, it may make sense to collapse the section I’m replying in so that I can more quickly find that other section.

This seems to only happen when there is exactly one comment in the section, otherwise the reply tool gets collapsed with the section as expected. This is a side-effect of how we insert it. (Kind of like T303396.)

Regarding the note, and what else should happen when you collapse a section with a reply tool opened – I agree with @Tacsipacsi that basically nothing should happen. However right now it's pretty difficult to find the section again, and if you collapsed it by accident, you might also be very confused why the other reply buttons don't work. The "Return to reply" buttons would IMO be enough to solve that problem, but apparently they get hidden together with the reply tool they belong to. We should probably fix that (and make sure the buttons are able to expand the collapsed section too), and leave the rest of the behavior unchanged.

(We should probably have a separate task about it.)

Change 840674 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/DiscussionTools@master] Don't insert reply tool outside <section> on mobile

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

I think we should disable collapsing any section which has an open reply tool in it. We already have the "Return to reply" floating button to ensure you don't lose an open draft.

I don’t follow you. If there’s already the Return to reply button that ensures that one doesn’t loose an open draft, why should collapsing its section be prevented?

@matmarex, would it be accurate for me to think that 840674 makes it so that the following happens?

  1. When people collapse a section that A) contains exactly one comment and B) has a Reply Tool open within it (regardless of whether there is content in said Reply Tool or not), the section will be collapsed and the Reply Tool will no longer be visible on the page remain open and
  2. If/when someone re-expands the section they collapsed, they will see the Reply Tool opened with any content they previously input preserved

@Esanders, would it be accurate for me to think you're proposing that we, "... disable collapsing any section which has an open reply tool in it." as means to address the issues I've listed here and Bartosz named in T319148#8303273?

  1. Minimize the likelihood that people have difficulty relocating a comment they've started drafting [i]
  2. Make it a bit more clear to people why Reply buttons are disabled elsewhere on the page

Related to the above, @Tacsipacsi: do you have a sense for how many times in the past couple of weeks that you found yourself looking, "...up something in another section that I need in my reply..."?

I ask the above in an effort to get a sense for whether the "prevent section collapsing" approach would be more disruptive than it is helpful.


i. Here, I'm considering someone opening the Reply Tool as them beginning the process of drafting a comment)

@matmarex, would it be accurate for me to think that 840674 makes it so that the following happens?

  1. When people collapse a section that A) contains exactly one comment and B) has a Reply Tool open within it (regardless of whether there is content in said Reply Tool or not), the section will be collapsed and the Reply Tool will no longer be visible on the page remain open and
  2. If/when someone re-expands the section they collapsed, they will see the Reply Tool opened with any content they previously input preserved

Yes

UPDATE
Per today's team meeting, we're going to:

  1. Move forward with deploying 840674 as it resolves an issue that causes the Reply Tool to become "disassociated" from sections that contain 1 comment
  2. Use the recently-filed T320753 to address the issues @matmarex named in T319148#8303273

...if I just want to quickly look up something in another section that I need in my reply, it may make sense to collapse the section I’m replying in so that I can more quickly find that other section.

@Tacsipacsi great spot and I agree with you in thinking that in the mobile talk pages' current state, it can require too much effort/scrolling to return to the top of a section you opened up to get a sense for what was being discussed so that you can collapse it again

Here is a ticket where we can consider solutions to address this issue: T320754.

Change 845069 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/DiscussionTools@master] Add test case for <section> wrappers on mobile

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

Change 845069 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@master] Add test case for <section> wrappers on mobile

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

Change 840674 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@master] Don't insert reply tool outside <section> on mobile

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

Testing on https://simple.m.wikipedia.beta.wmflabs.org/wiki/Talk:Cats
See https://photos.app.goo.gl/cbYnTA2gdYZUQABdA
The section opened in "2." isn't collapsed and the Reply Tool opened in "3." opened is visible but without focus.

@Esanders , is this the expected result?

The tool appears to have focus, then lose it in your video. For me it keeps the focus, and the other behaviour looks correct.

The tool appears to have focus, then lose it in your video. For me it keeps the focus, and the other behaviour looks correct.

To be clear, is the tool expected to retain focus?
I just checked https://fr.m.wikipedia.org/wiki/Discussion:Citron and I get https://photos.app.goo.gl/DJmXLss4Eu9NfJC27.

The tool appears to have focus, then lose it in your video. For me it keeps the focus, and the other behaviour looks correct.

To be clear, is the tool expected to retain focus?
I just checked https://fr.m.wikipedia.org/wiki/Discussion:Citron and I get https://photos.app.goo.gl/DJmXLss4Eu9NfJC27.

It looks like it loses focus when you tap a section title to collapse it. I think this is the expected behavior when you interact with another element of the page.