Unhide composer fullscreen toggle for tablets

:information_source: Summary Restores the fullscreen toggle button in the composer on touch devices with larger screens (e.g. tablets), where it is hidden by default
:eyeglasses: Preview Theme Creator
:hammer_and_wrench: Repository https://github.com/moin-Jana/unhide-composer-fullscreen-toggle-for-tablets
: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

It’s a very simple component. It only does what its name says. It unhides the composer fullscreen button on touch devices with a wider screen. The only visible change is the tiny button in the top right corner:

The reason is still the same as when I reported that the button was missing:

Especially when using a tablet in landscape orientation, the vertical space is quite limited. In that case, it can be very helpful to be able to hide the fields for the title and category selection when writing a new post. On my tablet the difference is 7 lines of text which I can see additionally when I use the full screen button.

Also, I sometimes find it really hard to use the grip on the top of the composer to resize it. Unfortunately, when I try to reduce the size by swiping down, I often end up refreshing the page and then have to reopen my draft. With the toggle button it’s only one click - and no accidental refresh :tada:

I created the component to make things as easy as possible for admins. That said, the CSS change is so minimal that admins who’d rather not install a component for a single line are equally well served by adding it directly to their theme. And for users whose admin hasn’t installed it, Stylus or similar browser extensions and apps work just as well - which is how I use it here on Meta:

@media (hover: none) and (width >= 40rem) {
  .discourse-touch #reply-control .toggle-fullscreen,
  .mobile-device #reply-control .toggle-fullscreen {
    display: flex;
  }
}
1 Like