Mobile Composer Preview

:information_source: Summary Adds a preview button to the composer on mobiles
:eyeglasses: Preview Theme Creator
:hammer_and_wrench: Repository moin-Jana/mobile-composer-preview · GitHub
:question: Install Guide How to install a theme or theme component
:open_book: New to Discourse Themes? Beginner’s guide to using Discourse Themes

Install this theme component

This component adds a preview button to the composer, similar to the one that was removed recently. Compared to previewing in RTE mode, the preview mode doesn’t trigger the keyboard, for example when checking spoilered text, and it preserves all formatting like open details blocks or HTML anchors without a surrounding div. The preview also hides the title, category, and tag input so you can see more of your draft at once.

17 Likes

thank you for doing this Moin. nice work!

i personally do prefer the actual preview to the RTE view, so it’s great to be able to have it back for mobile. :slight_smile:

6 Likes

That is great, because landscape is just pure pain on iPhone. Thanks.

4 Likes

Thank you. Didn’t notice it was removed. :joy:

1 Like

Hello, does anyone know what I’m doing wrong? I can’t see the preview button at the Theme Creator preview page, with browser extensions disabled.

Edit: The button appeared after creating a topic and waiting a minute, strangely

Did you change the window size after opening theme creator? I see something similar when I open it on my tablet and resize the window to be smaller after opening the link

It now persists, I’ll try to clean cookies of that site first

I can’t reproduce it reliably in a minute, tried posting a topic, toggling browser’s Desktop mode on and off[1], rotating device, reloading page, no effect. Then it worked when I tap the preview link again.


  1. which reloads the page ↩︎

Reloading the page results in a missing button because then you no longer look at the preview.

I figured, I can only see the button by entering the preview link twice. Without doing that, rotating the device, posting, creating a topic, nothing helps.

The preview by link in Theme Creator is sometimes a little flaky. You can try to install the component at Theme Creator (or your forum) and use the preview button at the bottom. That one isn’t sensitive to reloading.

Now I can’t show the button using any method I mentioned before :cry:

Is your testing still only based on the preview link I shared? I’d like to find out if this is a problem with the theme creator preview or the comopnent

I installed the component here

then closed tabs of theme creator, cleared cookies, logged in, and that’s my situation now.

Not using the preview link.

Do you need any more information from me?

There is a preview button at the bottom

Does the preview button work after using that?

I didn’t know that button exists!!! Using it, no bug occurred. :sweat_smile:

1 Like

Great!

That preview button is very helpful. On a production site you can easily test only a specific component without removing all the others from a theme, and on theme creator it is immune to the reload flakes of the preview link.

1 Like

Even my RTE-users (almost everybody else than I) are using now that preview-button. It is the easiest way to see big part of a draft because of hided virtual keyboard.

1 Like

I think the preview button should be hidden when using the RTE. Do your users use the toggle button to switch to Markdown mode, or is something not working as intended?

You can see it disappear here:

Really good question :flushed_face:

I’ve to ask if they are really using RTE or is there somekind confusion about terms.

But they are happy what so ever.

Edit

The first one was using markdown-editor with hided toolbar. She hasn’t any clue what I was explaining when the RTE was introduced — that much docs and screenshots by me has been helped :rofl:

1 Like