Commit Graph

403 Commits

Author SHA1 Message Date
Toby Zerner
67f64b631a Pass action in RenderView event so that handler can access actor 2015-05-04 08:55:44 +09:30
Toby Zerner
850a49285b Add API to define custom model relationships 2015-05-04 08:55:03 +09:30
Toby Zerner
abe7b1fd2e Don't enable pane pinned by default 2015-05-04 08:54:47 +09:30
Toby Zerner
9dd56bf0a4 Prevent error when discussion doesn't have any posts 2015-05-03 12:09:05 +09:30
Toby Zerner
d9d190b772 Gracefully handle non-existent/deleted users during rendering 2015-05-03 12:08:41 +09:30
Toby Zerner
f2e2d59e6f Use new sort criteria format 2015-05-03 12:08:12 +09:30
Toby Zerner
f03f046efe Add event to modify user search 2015-05-03 12:07:15 +09:30
Toby Zerner
d966c9831a Add event for registering user search gambits 2015-05-03 12:06:01 +09:30
Toby Zerner
b38878da80 Add delete avatar action 2015-05-03 12:05:18 +09:30
Toby Zerner
29be20c91a Fix incorrect function call 2015-05-03 12:04:57 +09:30
Toby Zerner
8f29679b46 Convert the rest of the API to new action architecture
Also make some tweaks:
- Merge SerializeAction::$include and
SerializeAction::$includeAvailable into a keyed boolean array
- Set defaults for SerializeAction::$limit and $limitMax
- Rename SerializeAction::$sortAvailable to $sortFields
2015-05-03 12:04:43 +09:30
Toby Zerner
4cb9ed851d Slightly thicken the post highlight border again 2015-05-03 11:53:37 +09:30
Toby Zerner
318e8d2f33 Use new config property name in avatar editor 2015-05-03 11:53:11 +09:30
Toby Zerner
ecdb2becd4 Assign user input to data property on EditDiscussionCommand 2015-05-02 09:01:27 +09:30
Toby Zerner
f67f34e287 Add removed posts as an API attribute 2015-05-02 09:00:22 +09:30
Toby Zerner
8ee9480205 Update discussion/post sort semantics inline with new API actions
Instead of $sort and $order being separate, they are now a single
array, allowing multiple sort criteria: `[‘foo’ => ‘asc', ‘bar’ =>
‘desc’]`
2015-05-02 09:00:07 +09:30
Toby Zerner
22ff8a203d Make sure serializers work with relations implemented with magic (via __call) 2015-05-02 08:58:28 +09:30
Toby Zerner
db31d9f772 Making a note that we should not use Actor as a singleton 2015-05-02 08:57:14 +09:30
Toby Zerner
a426fa6560 Update API action architecture
- An API action handles a Flarum\Api\Request, which is a simple object
containing an array of params, the actor, and optionally an HTTP
request object
- Most API actions use SerializeAction as a base, which parses request
input according to the JSON-API spec (creates a JsonApiRequest object),
runs the child class method to get data, then serializes it and assigns
it to a JsonApiResponse (standard HTTP response with a
Tobscure\JsonApi\Document as content)
- The JSON-API request input parsing is subject to restrictions as
defined by public static properties on the action (i.e. extensible)
- Also the actor is given to the serializer instance now, instead of
being a static property
2015-05-02 08:56:43 +09:30
Toby Zerner
5ea864ba89 Make post highlight more subtle 2015-05-02 08:48:35 +09:30
Toby Zerner
8bc9552e83 Tweak composer styles
- Make minimised content look nicer, non-interactive
- Fix margins on tablet
2015-05-02 08:48:18 +09:30
Toby Zerner
3ff0b806a4 All method should return an array, not an object 2015-05-02 08:47:10 +09:30
Toby Zerner
58833b9fdb Allow list items to specify a wrapper class 2015-05-02 08:46:52 +09:30
Toby Zerner
ea9d49b15e Allow extensions to easily override a function and call super 2015-05-02 08:46:38 +09:30
Toby Zerner
74bd697de9 Cleanup 2015-05-02 08:45:52 +09:30
Toby Zerner
b829edb07c Redraw after hiding modal 2015-05-02 08:45:24 +09:30
Toby Zerner
7d12f7853b Allow components to initialise props 2015-05-02 08:45:11 +09:30
Toby Zerner
3796193291 Only add a post to the post stream once 2015-05-02 08:44:52 +09:30
Toby Zerner
e9f0ef83b0 Remove posts from the post stream by ID 2015-05-02 08:44:42 +09:30
Toby Zerner
5fad4acd76 Use new config keys 2015-05-02 08:44:03 +09:30
Toby Zerner
ffc2863f70 Extensibility: discussion list params
Also give the root controller the name of the current route so they can
easily route back to it
2015-05-02 08:43:38 +09:30
Toby Zerner
288fd694a8 Extensibility: data when starting a new discussion 2015-05-02 08:39:44 +09:30
Toby Zerner
f15e7c6501 Extensibility: posts on user activity stream 2015-05-02 08:38:24 +09:30
Toby Zerner
fe0c2d0632 Extensibility: params for discussion page API request 2015-05-02 08:38:05 +09:30
Toby Zerner
8bc09551bb Extract discussion controls into the model 2015-05-02 08:36:59 +09:30
Toby Zerner
fbdd730ce3 Make discussion hero extensible 2015-05-02 08:36:04 +09:30
Toby Zerner
80e8630c1c Don't let discussion details in list wrap 2015-05-02 08:34:09 +09:30
Toby Zerner
066a379f43 Tweak header/footer control layout 2015-05-02 08:33:05 +09:30
Toby Zerner
4d04d801d1 Unify icon class name, change the way icons are floated in menus 2015-05-02 08:32:45 +09:30
Toby Zerner
ee40acd5c2 Show modal close button above content 2015-05-02 08:30:35 +09:30
Toby Zerner
e4a880c4f4 Skin colour tweaks 2015-05-02 08:29:43 +09:30
Toby Zerner
ec343cb442 Ability to merge list items 2015-05-02 08:28:02 +09:30
Toby Zerner
68c0cdb1a9 Combine route/query params in route construction
One params object is passed, and then route params are extracted into
the route and the rest are appended as query params.
2015-05-02 08:21:40 +09:30
Toby Zerner
72be607a17 Preload session as the last step in initialisation before boot
Can’t remember why…
2015-05-02 08:18:45 +09:30
Toby Zerner
60e69ae7b9 Add an event to register discussion gambits 2015-05-02 08:12:30 +09:30
Toby Zerner
66b374b1c1 Add API to collect posts that were removed during an action
This is useful for both the Sticky and Categories extensions, where if
you sticky a discussion and then immediately unsticky it, or if you
move it to a category and then immediately move it back, the last
“activity” post will be removed.
2015-05-02 08:12:09 +09:30
Toby Zerner
a2fd60ed0c Define assets in a more appropriate spot, make extensible 2015-05-02 08:10:06 +09:30
Toby Zerner
c3aecbceaa Extract config into database 2015-05-02 08:07:51 +09:30
Toby Zerner
a0ade68d65 Fix pin button active state 2015-04-25 23:26:43 +09:30
Toby Zerner
ac269683ed Merge remote-tracking branch 'upstream/master' 2015-04-25 22:45:27 +09:30