1
0
mirror of https://github.com/flarum/core.git synced 2025-07-19 15:51:16 +02:00
Commit Graph

26 Commits

Author SHA1 Message Date
一枚小猿
776af72c22 Fix less build error. (#2252) 2020-08-15 20:21:06 -04:00
Alexander Skvortsov
ba0e2db8a7 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
w-4
c6fc8a8cd6 Fix header contents moving when opening modal (#2131)
* add navbar-fixed-top css class

* App-header position:fixed
2020-05-23 14:41:54 -04:00
Alexander Skvortsov
83e69dc61d Improved UI of Switch with loading indicator (#2039)
* Moved loading indicator outside of checkboxes to improve ui
* Made loading indicator more visible, fade label when switch is loading
2020-04-10 22:51:58 +02:00
Hasan Özbey
762c021f86 Fix mobile notification bubble on colored header (#2109) 2020-04-10 12:50:36 +02:00
Hasan Özbey
90c2e7602b Update Modal.less 2020-03-30 21:18:48 +02:00
Hasan Özbey
192b003173 fix modals 2020-03-30 21:18:48 +02:00
Franz Liedke
e70444d934 Style validation errors 2020-01-24 15:41:26 +01:00
David Sevilla Martin
898ab9000e Fix Modal width on <768px screens not occupying the whole page 2019-11-06 17:48:00 -05:00
Annim Banerjee
4c731ac621 Updated names to match components in fontawsome (#1791)
fa-* named components are not present, hence updated to matching names.
2019-06-11 20:17:59 +02:00
Toby Zerner
d4cebc5901 Include LESS mixins and variables in all frontend compilers 2018-11-22 12:09:50 +10:30
Toby Zerner
3394abde2b Fix positioning of hamburger menu unread indicator 2018-11-22 07:24:01 +10:30
Toby Zerner
a6a4cf3fbc Improve appearance of text editor buttons
- Change preview icon to Font Awesome Regular instead of Solid
- Give the preview button a tooltip
- Change submit button icon to paper plane (shown on mobile)
- Tweak mobile header button touch target
- Scroll overflowing text editor controls horizontally
2018-11-12 17:19:37 +10:30
Toby Zerner
52d7cd0461 Prevent long words/content from stretching the discussion list width 2018-10-21 14:47:41 +10:30
Tristian Kelly
805f0b9a47 Broader system font stack (#1600) 2018-10-17 23:55:41 +02:00
David Sevilla Martín
58980e323b Align search icon on search bar (#1599) 2018-10-16 20:40:39 +02:00
David Sevilla Martín
def0023382 Align icons & text in SideNav and Dropdown (#1544) 2018-09-22 21:35:45 +09:30
Toby Zerner
3a7f88b74c Use default system font instead of Open Sans 2018-09-21 11:20:17 +09:30
Toby Zerner
72778ddb8c Use flexbox for sideNav. fixes #1408 2018-07-20 12:34:43 +09:30
Toby Zerner
fbfe0c1e6f Revert Chrome image rendering tweak
The Chrome bug appears to have been fixed:
https://bugs.chromium.org/p/chromium/issues/detail?id=562162

This CSS rule makes images look very ugly in Safari, so removing it.

ref #1259
2018-07-20 12:03:49 +09:30
Toby Zerner
858fdf71cb Dissociate .sideNav--horizontal from @expand-side-nav 2018-07-20 11:38:42 +09:30
Toby Zerner
c6ebef3631 Webpack (#1367)
* Replace gulp with webpack and npm scripts for JS compilation
* Set up Travis CI to commit compiled JS
* Restructure `js` directory; only one instance of npm, forum/admin are "submodules"
* Refactor JS initializers into Application subclasses
* Maintain partial compatibility API (importing from absolute paths) for extensions
* Remove minification responsibility from PHP asset compiler
* Restructure `less` directory
2018-06-20 13:20:31 +09:30
Toby Zerner
cddd23bb33 Clean up LESS files 2015-04-25 22:31:30 +09:30
Toby Zerner
a238c32429 Make badge icons not blurry by making sure they can centre accurately 2015-04-03 16:59:50 +10:30
Toby Zerner
4678603f55 Extract .side-nav into a common file 2015-03-30 12:45:48 +10:30
Toby Zerner
de10e4457f Big front-end asset/filestructure refactor
- Extract shared Ember components into a “flarum-common” ember-cli
addon. This can be used by both the forum + admin Ember apps, keeping
things DRY
- Move LESS styles into their own top-level directory and do a similar
thing (extract common styles)
- Add LESS/JS compilation and versioning to PHP (AssetManager)
- Set up admin entry point

(Theoretical) upgrade instructions:
- Delete everything in [app_root]/public
- Set up tooling in forum/admin Ember apps (npm install/update, bower
install/update) and then build them (ember build)
- php artisan vendor:publish
- Upgrade flarum/flarum repo (slight change in a config file)
- If you need to trigger a LESS/JS recompile, delete the .css/.js files
in [app_root]/public/flarum. I set up LiveReload to do this for me when
I change files in less/ or ember/

Todo:
- Start writing admin app!
- Remove bootstrap/font-awesome from repo and instead depend on their
composer packages? Maybe? (Bower is not an option here)
2015-03-29 22:13:26 +10:30