Commit Graph

27 Commits

Author SHA1 Message Date
Toby Zerner
bb04eada7a Prevent crash if user's groups aren't loaded. closes flarum/core#173 2015-07-28 13:35:07 +09:30
Toby Zerner
a0fe68272c Implement TextFormatter for posts
Get rid of formatting on user bios, we'll do that with JavaScript
2015-07-22 16:03:48 +09:30
Toby Zerner
f93ff7cb3f Make front-end localizable 2015-07-17 17:43:28 +09:30
Toby Zerner
76678f72f2 Case-sensitive filename changes 2015-07-15 15:54:34 +09:30
Toby Zerner
ab6c03c0cc Massive JavaScript cleanup
- Use JSX for templates
- Docblock/comment everything
- Mostly passes ESLint (still some work to do)
- Lots of renaming, refactoring, etc.

CSS hasn't been updated yet.
2015-07-15 14:01:11 +09:30
Toby Zerner
9fa3492c0e Clean up discussion model 2015-07-08 10:51:30 +09:30
Toby Zerner
a74623c718 Make admin open in a new window 2015-07-08 10:51:16 +09:30
Toby Zerner
99876e9e36 Initial refactor of client actions, data preloading, SEO
An initial stab at flarum/core#126. Still WIP. Preliminary
implementation of flarum/core#128 and flarum/core#13.
2015-07-07 15:29:21 +09:30
Toby Zerner
5fe88e448e Improve post stream
- Return all discussion post IDs from API requests which add/remove
posts, so the post stream updates appropriately. Related to #146
- Always unload posts that are two pages away, no matter how fast
you’re scrolling
- Retrieve posts from cache instead of reloading them
- Fix various bugs. Maybe #152, needs confirmation
2015-07-06 16:26:27 +09:30
Toby Zerner
a74b40fe47 Massive refactor
- Use contextual namespaces within Flarum\Core
- Clean up and docblock everything
- Refactor Activity/Notification blueprint stuff
- Refactor Formatter stuff
- Refactor Search stuff
- Upgrade to JSON-API 1.0
- Removed “addedPosts” and “removedPosts” relationships from discussion
API. This was used for adding/removing event posts after renaming a
discussion etc. Instead we should make an additional request to get all
new posts

Todo:
- Fix Extenders and extensions
- Get rid of repository interfaces
- Fix other bugs I’ve inevitably introduced
2015-07-04 12:24:48 +09:30
Toby Zerner
3a7efe202e Gracefully handle discussions with no posts
Although this should never happen
2015-06-23 10:30:06 +09:30
Toby Zerner
32beab9238 Prevent JS error if discussion has been loaded without posts 2015-06-18 17:42:08 +09:30
Toby Zerner
1ff5e06525 Don't add duplicate posts to a discussion 2015-06-15 08:59:57 +09:30
Toby Zerner
42851f425b Rejig formatting API. closes flarum/core#85
It works but it’s not the most pretty thing in the world. @franzliedke
Would be great if you could take a look at the whole formatting API and
work your magic on it sometime… my brain is fried!
2015-06-04 10:48:07 +09:30
Toby Zerner
4edb95e9e2 Sync the discussion model/post stream when posts are added/removed 2015-05-29 18:56:29 +09:30
Toby Zerner
cafa6c7b5d New and improved post stream. 2015-05-29 18:17:50 +09:30
Toby Zerner
3c7078b423 New user activity feed API.
Originally the user activity feed was implemented using UNIONs. I was
looking at make an API to add activity “sources”, or extra UNION
queries (select from posts, mentions, etc.) but quickly realised that
this is too slow and there’s no way to make it scale.

So I’ve implemented an API which is very similar to how notifications
work (see previous commit). The `activity` table is an aggregation of
stuff that happens, and it’s kept in sync by an ActivitySyncer which is
used whenever a post it created/edited/deleted, a user is
mentioned/unmentioned, etc.

Again, the API is very simple (see Core\Activity\PostedActivity +
Core\Handlers\Events\UserActivitySyncer)
2015-05-20 12:30:27 +09:30
Toby Zerner
7f48a98af8 Make discussion edit permission specific to renaming 2015-05-18 12:34:03 +09:30
Toby Zerner
be6b620457 Transform post time into a date 2015-05-14 22:41:06 +09:30
Toby Zerner
781dc2ef0c New component for post excerpts, which will be shown in search results
Perhaps also in user activity stream. They are used in the mentions
extension.

In order to generate the excerpt, each formatter can implement a
“strip” method which basically converts block formatting into inline
formatting.
2015-05-14 22:41:05 +09:30
Toby Zerner
0f3d7ceafe Don't let a discussion have an empty slug as it messes with the router 2015-05-07 16:53:57 +09:30
Toby Zerner
54f731942e Add user group badges 2015-05-06 11:25:19 +09:30
Toby Zerner
762137c6df Move discussion controls out of lib and into forum 2015-05-05 17:06:46 +09:30
Toby Zerner
45ab262547 API for syncing added/removed posts after a discussion is updated 2015-05-04 12:17:26 +09:30
Toby Zerner
ae2930dc35 Show login modal if replying as guest; disable button if no permission
Also hide the first item in dropdown-split menus
2015-05-04 11:08:45 +09:30
Toby Zerner
8bc09551bb Extract discussion controls into the model 2015-05-02 08:36:59 +09:30
Toby Zerner
b68a4711dc Replace Ember app with Mithril app 2015-04-25 22:28:39 +09:30