1
0
mirror of https://github.com/flarum/core.git synced 2025-07-18 23:31:17 +02:00
Commit Graph

28 Commits

Author SHA1 Message Date
Sajjad Hashemian
e42b74a0bc Remove extension generator 2016-10-04 23:26:03 +03:30
Toby Zerner
d2bce5d756 Refactor the web app bootstrapping code
- All custom JS variables are now preloaded into the `app.data` object, rather than directly on the `app` object. This means that admin settings are available in `app.data.settings` rather than `app.settings`, etc.
- Cleaner route handler generation
- Renamed ConfigureClientView to ConfigureWebApp, though the former still exists and is deprecated
- Partial fix for #881 (strips ?nojs=1 from URL if possible, so that refreshing will attempt to load JS version again)
2016-05-26 19:04:24 +09:30
Franz Liedke
0411cc5137 Update generate:migration command to deal with new migration structure 2016-02-24 23:20:33 +09:00
Franz Liedke
c9bf15abd2 Update extension skeleton
Closes #743.
2016-01-20 22:14:08 +01:00
dcsjapan
1238c95118 Update locale file template
Adjusts comments to match current english locale files.
2015-11-28 15:55:21 +09:00
dcsjapan
1e6ddae556 Add locale file template
- Adds a more detailed template for the en.yml file provided with the extension skeleton.
- I've left the sample keys uncommented, but added a comment advising that they be removed.
2015-11-05 08:11:59 +09:00
Toby Zerner
b482fb93c5 Clean up some old code 2015-10-22 12:25:22 +10:30
Toby Zerner
6443f5d95c Clean up 2015-10-14 11:14:36 +10:30
Toby Zerner
6bf93ae9f7 Major refactor and improvements
- Reorganised all namespaces and class names for consistency and structure. Following PSR bylaws (Abstract prefix, Interface/Trait suffix).
  - Move models into root of Core, because writing `use Flarum\Core\Discussion` is nice. Namespace the rest by type. (Namespacing by entity was too arbitrary.)
  - Moved some non-domain stuff out of Core: Database, Formatter, Settings.
  - Renamed config table and all references to "settings" for consistency.
  - Remove Core class and add url()/isInstalled()/inDebugMode() as instance methods of Foundation\Application.
  - Cleanup, docblocking, etc.

- Improvements to HTTP architecture
  - API and forum/admin Actions are now actually all the same thing (simple PSR-7 Request handlers), renamed to Controllers.
  - Upgrade to tobscure/json-api 0.2 branch.
  - Where possible, moved generic functionality to tobscure/json-api (e.g. pagination links). I'm quite happy with the backend balance now re: #262

- Improvements to other architecture
  - Use Illuminate's Auth\Access\Gate interface/implementation instead of our old Locked trait. We still use events to actually determine the permissions though. Our Policy classes are actually glorified event subscribers.
  - Extract model validation into Core\Validator classes.
  - Make post visibility permission stuff much more efficient and DRY.

- Renamed Flarum\Event classes for consistency. ref #246
  - `Configure` prefix for events dedicated to configuring an object.
  - `Get` prefix for events whose listeners should return something.
  - `Prepare` prefix when a variable is passed by reference so it can be modified.
  - `Scope` prefix when a query builder is passed.

- Miscellaneous improvements/bug-fixes. I'm easily distracted!
  - Increase default height of post composer.
  - Improve post stream redraw flickering in Safari by keying loading post placeholders with their IDs. ref #451
  - Use a PHP JavaScript minification library for minifying TextFormatter's JavaScript, instead of ClosureCompilerService (can't rely on external service!)
  - Use UrlGenerator properly in various places. closes #123
  - Make Api\Client return Response object. closes #128
  - Allow extensions to specify custom icon images.
  - Allow external API/admin URLs to be optionally specified in config.php. If the value or "url" is an array, we look for the corresponding path inside. Otherwise, we append the path to the base URL, using the corresponding value in "paths" if present. closes #244
2015-10-08 14:28:02 +10:30
Toby Zerner
5cc745f610 Add migration generator 2015-09-17 12:16:38 +09:30
Michael Williams
b2510d2481 Add a default build script for extensions 2015-09-06 09:21:04 -07:00
Toby Zerner
7a81d941fa Clean up editorconfig, eslint, npm dependencies 2015-09-04 12:11:34 +09:30
Toby Zerner
246b2ca8ff Tweak eslint rules 2015-08-17 14:10:55 +09:30
Toby Zerner
0a19ca5e19 New listen API
Event subscriptions now take place before *any* boot method is called.
This ensures that all event listeners are registered before things
happen – e.g. locales are registered before the translator is
instantiated in the Tags extension's boot method.
2015-08-13 12:55:48 +09:30
Toby Zerner
f8a02082ec Add admin client JS/LESS to extension stub 2015-08-04 17:18:45 +09:30
Toby Zerner
5b894dfade Clean up 2015-07-31 20:17:17 +09:30
Toby Zerner
798bcaa5f4 PERF: avoid reinstantiation of event subscribers 2015-07-27 11:53:47 +09:30
Toby Zerner
ed5733ed41 Various fixes to extension generator/stub 2015-07-23 20:24:28 +09:30
Toby Zerner
11ef5f94ca Make extension stub use initializer 2015-07-23 14:34:49 +09:30
Toby Zerner
526b2c48df Group assets by client in extension stub 2015-07-22 10:12:11 +09:30
Toby Zerner
a10da1f92a Update extension generator 2015-07-20 18:08:50 +09:30
Toby Zerner
09540295ad Rework extension bootstrapping
System JS modules don't execute when they're registered, so we need to
import them explicitly. While we're at it, we may as well make the
locale bootstrapper a module too.
2015-07-20 18:08:28 +09:30
Toby Zerner
13c30c040b Add gitignore to extension stub 2015-06-23 10:37:07 +09:30
Toby Zerner
7a05f71987 Update extension stub with new APIs 2015-06-23 10:37:01 +09:30
Toby Zerner
65df4c3a33 Add English locale template to extension stub 2015-06-11 18:45:31 +09:30
Toby Zerner
0ca7003a35 Add missing import in extension stub JS 2015-06-11 18:45:17 +09:30
Toby Zerner
1826d15970 Clean up extension stub. 2015-06-08 15:05:35 +09:30
Toby Zerner
a41d02f030 Add extension generator command. 2015-06-08 14:56:19 +09:30