Page MenuHomePhabricator

Create a Preview screen when posting Talk messages.
Closed, ResolvedPublic

Description

At the moment, when you post a new topic on a Talk page (or when replying to an existing topic), we don't show a preview of the resulting text, and instead just post it immediately. This can be a bit jarring and unexpected, especially since we're now expanding the kinds of wikitext markup (templates etc) that can be included in a talk message.

This task is to introduce a Preview screen, identical to the screen we use in the general Editing activity, so that the user gets a chance to see their message as it will be formatted upon posting.

Note that this will be a WebView-based preview (same as in the general editor), so the appearance of the previewed message may be slightly different from how it appears in the native Talk screen.

Event Timeline

It looks and works as expected, thanks @Dbrant 👏

ABorbaWMF subscribed.

Testing on 2.7.50480-beta-2024-03-27 on test.wiki

I found an issue with the reply flow on talk pages when selecting back from the preview page.

Steps:

  1. Navigate to an existing talk page message
  2. Tap reply, and create a reply message
  3. Tap Next to view the reply preview
  4. Tap back

Expected Result:
The reply editing page appears

Actual Result:
The talk page message appears

Expected Result:
The reply editing page appears

Actual Result:
The talk page message appears

fixed!

@Dbrant I saw an issue when creating a talk page thread from scratch:

Steps:

  1. Navigate to an existing talk page
  2. Create a new topic
  3. Tap Next to view the message preview
  4. Tap back

Expected Result:
The talk page message editing page appears (and another "back" from here would ask me for confirmation if I'm sure I want to exit and lose my draft).

Actual Result:
Dialog box asks you "Are you sure you want to exit?" The subject and content will not be saved
Choosing Yes brings you back to the talk page

Good catch @HNordeenWMF , can you break this off as a separate task. This shouldn't be a blocker for release. The behavior for the steps Haley mentioned should be the same as what happens when you click reply to an existing thread, start typing, go to next, and then hit back. It should retain what the user had and that dialog about losing information should show up if they hit back from the edit state (as mentioned above)

Separate task here: T361655!
It's not quite the exact same as replying to an existing thread, because when replying to a message you don't ever see the dialog about losing your draft, your text is retained in the edit state for you to come back to.