Topic Preview Modal

Yeah, I think that’s because iPad isn’t considered a mobile device in Discourse. I’ve changed the detection to be viewport-based. Can you try it again?

Yeah, tablets are pain in the tender places. But now it doesn’t follow any gestures and X is the only way to close the modal.

Personally… for me it’s good enough too. Plus tablets, specially iPad, cover quite shy share of devices, so I’m not so sure if there is real need to spend too much time to try adjust those — even tablets are de facto mobiles and desktop style devices only by size.

1 Like

Yeah, just to clarify: these dismiss gestures are only enabled for the mobile modal. The desktop modal is not affected at all and still works exactly as before.

So the None/Grip/Gesture options only change the behavior on mobile-sized viewports. Desktop users will still use the normal existing modal behavior (X button or click outside).

Desktop modal (swipe won’t work)

Mobile modal (swipe should work)

Just a little follow-up :blush:

I’d really appreciate a few more people testing it on their phones. Thanks!

1 Like

iPhone 15+, latest iOS, the hub/PWA/Safari:

From left to right it’s quite difficult to find the right place. But I think it comes from the device itself, because it has happened with other apps/sites too everynowandthen. But out there is solutions too where it doesn’t care from where swiping starts.

Discourse itself is easy to swipe back, though.

Thanks @Jagster, just to clarify, when you use the swipe-back gesture while the Topic Preview Modal is open, does it close the modal and keep you on the topic list, or does it navigate back to the previous page?

I can confirm that the back gesture and swipe up/down are working on Android 17 (AOSP) :raised_fist:

A minor detail: the animation is a little sketchy/slow.

1 Like

Thanks for testing! :raising_hands:

When you say the animation is a little sketchy/slow, do you mean the swipe up dismissal animation?

Exactly, the rest are super smooth! It is a pleasure to test your creations, boss.

1 Like

Thank you, I fixed it! Please check it again. :slightly_smiling_face:

1 Like

Cant wait get back test this. Super excited lol

2 Likes

Neat, thanks to you! It improved the swipe down and back gestures; they are super smooth now.

Being honest, the swipe up seems to still be like before. It is minor, but you know, there are different devices, and this is on Android 17 for your record.

1 Like

Ah, thanks! Could you make a quick screen recording of the swipe-up dismiss? I’d like to see exactly where the animation feels off. It’s smooth on my Android 16 device.

2 Likes

When the modal is open, and I do swipe back, it does close the modal indeed. The issue is it success only after fifth or so try. So it does nothing when the modal is open, but when it acts, it does what is expected.

1 Like

The Safari browser experience on iOS 27 is fantastic! Thanks for your hard work! :heart:

1 Like

Now I realize what is the issue with iPhone: swipe back works only if used header area of the topic.

Thanks everyone for testing! :heart:

I’ve merged this: FEATURE: Add configurable mobile modal dismiss gestures - Pull Request #7 - VaperinaDEV/discourse-topic-preview-modal - GitHub


Configurable mobile dismiss gestures

This update adds configurable dismiss options to the Topic Preview Modal:

  • None: no additional dismiss gesture
  • Grip: shows a visual grip in the modal footer
  • Gesture: allows the modal to be dismissed with gestures:
    • swipe up when at the bottom
    • native mobile Back gesture/button

Swipe-down dismissal is available in all modes.


The native Back behavior is especially useful on mobile: instead of navigating away from the underlying topic list, the Back action closes the modal and keeps the user’s position in the list.

The desktop modal is not affected by these options.


If you find this useful, consider supporting its continued development. :heart:
> ./support --coffee

2 Likes

I’ve also added optional haptic feedback for the Topic Preview Modal: FEATURE: Add haptic feedback to modal open and close - Pull Request #8 - VaperinaDEV/discourse-topic-preview-modal - GitHub

When enabled, supported Android devices will provide:

  • a subtle haptic feedback when opening the modal
  • a slightly stronger feedback when closing the modal

The feedback can be enabled or disabled with the new Haptic feedback (modal_haptic_feedback) setting.

The default is enabled.

The haptic durations are intentionally different for opening and closing to make the two interactions feel distinct.

1 Like

Hello :waving_hand:

I’ve added one missing feature: FEATURE: Add topic progress bar (timeline) - Pull Request #9 - VaperinaDEV/discourse-topic-preview-modal - GitHub

Also, added to skeleton loader when jump to post: DEV: Enhance post jump handling with jumpingToPost state · VaperinaDEV/discourse-topic-preview-modal@44f6d3a · GitHub

> ./support --coffee :heart:

1 Like