Wordpress-ios: Deprecate ā€œsimpleā€ previews

Created on 7 May 2018  Ā·  8Comments  Ā·  Source: wordpress-mobile/WordPress-iOS

We have a ā€œsimpleā€ preview mode in the app that we use when we can’t show the actual server preview. It’s not very helpful now that we have a visual editor, and can be confusing for users.

There are a few steps before we can remove simple previews from the app:

  1. [x] [#9285 Stop using simple previews as fallback](https://github.com/wordpress-mobile/WordPress-iOS/issues/9285)
  2. [x] [#9286 Automatically save drafts before preview](https://github.com/wordpress-mobile/WordPress-iOS/issues/9286)
  3. [x] [#9287 Implement autosaves to preview published posts](https://github.com/wordpress-mobile/WordPress-iOS/issues/9287)
  4. [x] #11699 Remove FakePreviewBuilder from the app.

Original issue asking for feedback:

simulator screen shot - iphone 8 - 2018-05-07 at 12 29 35

There are a few cases where this is shown, and I’m not sure how we should address all of them:

  1. When we can show a real preview in theory but it fails (offline, network/server error,…). This one is easier and I’d rather show an error with a retry button than fall back to a simple preview.
  2. When the post is a local draft. To show a preview we would need to save the draft first.
  3. When the post is published on the server, but we have local changes. There’s an autosaves endpoint on WordPress.com that would allow us to save a new revision without publishing, but this won’t work for WordPress.org sites.

There is some upcoming work in autosaves which could help with 2 and 3, and I think we can do 1 easily. But what do we do in the meantime, or for edits to published posts on WordPress.org sites? Do we still want to show this fake preview, or we’d rather not offer a preview and explain why?

PostinEditing [Pri] Medium [Type] Enhancement

All 8 comments

I think it's a good idea.

  1. Yes: let's show a no connection message for this and a button to retry.
  2. Yes: I'm not sure why we wouldn't save the draft on the server however. Why is that? Let's just save it, no?
  3. Is this mostly due to a lack of API, or other reasons?

I had to dig through the archives for my notes on a previous attempt (in 2013!), I had some concerns back then:

I create a new post, preview it, and decide I don’t really want it. Tapping ā€œDiscard draftā€ should remove it from the server.

I don't think that as a problem anymore. You can even save drafts now without leaving the editor, so tapping preview shouldn't be much different.

I edit an existing post, preview uploads my new changes, but eventually I decide I want to discard those edits. The app needs to revert to a previous version

It'd be much better if we had revisions in the app, but I don't think that should be a blocker. Given that preview doesn't close the editor, you'd still be able to undo/redo.

So yes, there's probably no reason why preview shouldn't save drafts.

As for 3, the only limitation is a lack of API. I was reviewing an old conversation about this and maybe saving the post with status=autosave would work, but we'd have to test that.

In any case, even if we can eventually cover all the cases, some of them are a bit challenging technically and might be easier to do after we've implemented autosaves. My main question here was the last one šŸ˜‰ Until we can have real previews for every scenario, do we still want to show this fake preview, or we’d rather not offer a preview and explain why?

I had to dig through the archives for my notes on a previous attempt (in 2013!), I had some concerns back then:

Thanks for this. Using old notes to review decisions is an excellent approach.

My main question here was the last one šŸ˜‰ Until we can have real previews for every scenario, do we still want to show this fake preview, or we’d rather not offer a preview and explain why?

Yep I understood, I just felt it was important to have some ground explanation to answer it.

I'd probably keep it until we can provide a replacement... however I also imagined that since we already have the normal preview, it wasn't too much extra work to add auto-save before previewing in case of 1 and 2?

Edited the description with links to the steps towards deprecating this. I've also cleaned up a bit as we had a number of issues related to previews that would be solved by this approach.

Update: we'll drop the "local preview" feature, but we can keep the "preview button", in this case the following scenario should happen while the app is offline:

  • User edits an existing post, a new post or a draft,
  • User taps ā€œPreviewā€,
  • App auto-saves the post locally,
  • App notifies the user we can’t show a preview while offline.

@yaelirub - This issue is in the "closed" column in the project, but still open. What's the right status?

(PS: if we're keeping this open because there's pending work we can just use new smaller tickets for the remaining work and close this one)

@diegoreymendez, that's an overlook on my end, it should be closed. Apologies.
Closing.

Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rachelmcr picture rachelmcr  Ā·  21Comments

nheagy picture nheagy  Ā·  36Comments

sentry-io[bot] picture sentry-io[bot]  Ā·  19Comments

iamgabrielma picture iamgabrielma  Ā·  90Comments

sendhil picture sendhil  Ā·  29Comments