framework/less/common
Alexander Skvortsov 5e465f6051
Extract Composer state (#2161)
Like previous "state PRs", this moves app-wide logic relating to
our "composer" widget to its own "state" class, which can be
referenced and called from all parts of the app. This lets us
avoid storing component instances, which we cannot do any longer
once we update to Mithril v2.

This was not as trivial as some of the other state changes, as we
tried to separate DOM effects (e.g. animations) from actual state
changes (e.g. minimizing or opening the composer).

New features:

- A new `app.screen()` method returns the current responsive screen
  mode. This lets us check what breakpoint we're on in JS land  
  without hardcoding / duplicating the actual breakpoints from CSS.
- A new `SuperTextarea` util exposes useful methods for directly
  interacting with and manipulating the text contents of e.g. our
  post editor.
- A new `ConfirmDocumentUnload` wrapper component encapsulates the
  logic for asking the user for confirmation when trying to close
  the browser window or navigating to another page. This is used in
  the composer to prevent accidentally losing unsaved post content.

There is still potential for future cleanups, but we finally want   
to unblock the Mithril update, so these will have to wait:

- Composer height change logic is very DOM-based, so should maybe
  not sit in the state.
- I would love to experiment with using composition rather than
  inheritance for the `ComposerBody` subclasses.
2020-07-25 00:17:25 +02:00
..
mixins Webpack (#1367) 2018-06-20 13:20:31 +09:30
Alert.less Webpack (#1367) 2018-06-20 13:20:31 +09:30
AlertManager.less Webpack (#1367) 2018-06-20 13:20:31 +09:30
App.less Fix header contents moving when opening modal (#2131) 2020-05-23 14:41:54 -04:00
Avatar.less Revert Chrome image rendering tweak 2018-07-20 12:03:49 +09:30
Badge.less Webpack (#1367) 2018-06-20 13:20:31 +09:30
Button.less Webpack (#1367) 2018-06-20 13:20:31 +09:30
Checkbox.less Improved UI of Switch with loading indicator (#2039) 2020-04-10 22:51:58 +02:00
common.less Style validation errors 2020-01-24 15:41:26 +01:00
Dropdown.less Webpack (#1367) 2018-06-20 13:20:31 +09:30
Form.less Webpack (#1367) 2018-06-20 13:20:31 +09:30
FormControl.less Webpack (#1367) 2018-06-20 13:20:31 +09:30
LoadingIndicator.less Webpack (#1367) 2018-06-20 13:20:31 +09:30
mixins.less Webpack (#1367) 2018-06-20 13:20:31 +09:30
Modal.less Update Modal.less 2020-03-30 21:18:48 +02:00
Navigation.less Fix mobile notification bubble on colored header (#2109) 2020-04-10 12:50:36 +02:00
normalize.less Webpack (#1367) 2018-06-20 13:20:31 +09:30
Placeholder.less Webpack (#1367) 2018-06-20 13:20:31 +09:30
print.less Webpack (#1367) 2018-06-20 13:20:31 +09:30
scaffolding.less Extract Composer state (#2161) 2020-07-25 00:17:25 +02:00
Search.less Align search icon on search bar (#1599) 2018-10-16 20:40:39 +02:00
Select.less Webpack (#1367) 2018-06-20 13:20:31 +09:30
sideNav.less Prevent long words/content from stretching the discussion list width 2018-10-21 14:47:41 +10:30
Tooltip.less Webpack (#1367) 2018-06-20 13:20:31 +09:30
ValidationError.less Style validation errors 2020-01-24 15:41:26 +01:00
variables.less Style validation errors 2020-01-24 15:41:26 +01:00