Page MenuHomePhabricator

Page preview does not reflect published state
Open, Needs TriagePublic

Description

This task involves the work with ensuring the version of talk pages people see when they preview the changes they've made with non-DiscussionTools interfaces to talk pages matches the talk page they see when publishing the changes they've made.

Behavior

  1. On desktop or mobile, visit a talk page on a wiki where Topic Containers are enabled. E.g. https://patchdemo.wmflabs.org/wikis/916be355b2/w/index.php?title=Talk:Frances_Perkins4 .
  2. Open the source editor
  3. Make some changes
  4. Preview the changes you made in "Step 3."

Actual

  1. ❗️The preview appears as it does were Topic Containers NOT enabled (note the section headings and lack of metadata):
Desktop previewMobile preview
Screen Shot 2022-05-27 at 5.24.15 PM.png (1×1 px, 242 KB)
IMG_DD8AE19D7499-1.jpeg (2×1 px, 696 KB)

Expected

  1. ✅ The preview appears as it does were Topic Containers enabled. More details in ===Requirements below.

Requirements

  • Editing Interface(s) (platforms): 2010 wikitext editor and 2017 wikitext editor (mobile & desktop)
  • Preview method(s): existing "asynchronous" preview, real-time preview, live preview
    • Preview Contents
      • Show: Topic Container section title styling as it will appear on published page, discussion metadata (number of comments, number of people in discussion, time of last comment [1])
      • Do NOT show: interactive page components (read: Subscribe buttons/links, Reply buttons/links, section [ edit ] links (already done))
  • Editing Interface(s) (platforms): New Topic Tool (mobile & desktop)
    • Preview Contents
      • Show: Topic Container discussion title styled as it will appear on published page, discussion "body" / "subject" styled as it will appear on published page
      • Do NOT show: interactive discussion components (read: Subscribe buttons/links, Reply buttons/links, section [ edit ] links (already done)), discussion metadata (number of comments, number of people in discussion, time of last comment

1. Metadata shown in the preview should reflect the state of the discussion at the moment people click the necessary button to show the preview.

Open questions

  • How – if at all – should metadata be presented within the preview?
    • Per today's team discussion, and the newly-created ===Requirements section above, metadata will be presented within the preview

Done

  • Answers to all ===Open questions are documented
  • Expected behavior is implemented

Event Timeline

matmarex moved this task from Incoming to Doing on the Editing-team (FY2021-22 Kanban Board) board.
matmarex added a subscriber: matmarex.

Seems straightforward

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

[mediawiki/extensions/DiscussionTools@master] Enable transformations in preview mode

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

Some more work is needed to make this work with visual enhancements. Demo here: https://patchdemo.wmflabs.org/wikis/1e0bfedadd/wiki/Talk:Main_Page

  • Doesn't work in normal wikitext preview, needs to be allowed in HookUtils::isFeatureEnabledForOutput
  • Possibly unexpected in new topic preview?

image.png (2×3 px, 226 KB)

image.png (2×3 px, 224 KB)

  • Possibly unexpected in new topic preview?

Good catch, @matmarex. Yes, metadata appearing within the preview that appears beneath the New Topic Tool's source mode is unexpected to me.

You surfacing this was the reminder I needed to account for the New Topic Tool in the task description's newly-created ===Requirements section. Do you see anything unexpected about what I'm proposing?

  • Preview method(s): existing "asynchronous" preview + soon-to-be introduced real-time preview

I don’t know whether you intentionally left it out, but I want to make sure that you’re aware of a third preview method: the so-called “live preview” (tracking task: T41272), which takes over the traditional (full-page-reload, “asynchronous”) preview. It doesn’t update automatically (unlike the soon-to-be-introduced real-time preview), but it’s almost as fast as it. Actually, as far as I see, the “real-time preview” uses the “live preview” under the hood, so if the topic containers appear in the “real-time preview”, they’ll probably appear in “live preview” as well, but it may be worth being QAd separately, just to make sure.

Indeed, they use the same "backend" and should work the same. I noted it for QA.

Esanders added a subscriber: Esanders.

Looks like there are some open design/UX questions.

Looks like there are some open design/UX questions.

@Esanders what open questions are you seeing?

...I'm not seeing any open questions in Gerrit or the task description, tho I could be missing something.