Such a tiny window to edit here on a cell phone

To answer from the previous topic. Yt.w wanted to disable the toolbar by default on certain conditions because:

I figured out I could try to make some code for that. This is just an immediate band-aid solution.
Actually, in Discourse by default, anything below 370 window width or, if an Android, the toolbar is hidden.

const storedVal = keyValueStore.get("toolbar-enabled");
if (this._toolbarEnabled === undefined && storedVal === undefined) {
  // iPhone 6 is 375, anything narrower and toolbar should
  // be default disabled.
  // That said we should remember the state
  this._toolbarEnabled =
    window.innerWidth > 370 && !this.capabilities.isAndroid;
}

My code would be just an extension to generalize this behavior to any mobile view.

I agree with you; another approach would be to educate the user in some ways that the burger icon toggles the toolbar!

1 Like