1
0
mirror of https://github.com/flarum/core.git synced 2025-07-21 08:41:17 +02:00
Commit Graph

100 Commits

Author SHA1 Message Date
Toby Zerner
16840fb3ec Appearance tweaks 2015-07-23 16:39:20 +09:30
Toby Zerner
f9ef9d791b 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
77dbbae170 Update modal responsive control classes 2015-07-22 09:56:01 +09:30
Toby Zerner
c60e37d88c Use stable sort for item lists 2015-07-22 09:55:36 +09:30
Toby Zerner
3e4b30695e Fix PostStream endless loading due to broken scroll anchor 2015-07-22 09:55:20 +09:30
Toby Zerner
f59e14db3e Preload data just before boot, not when the store is initialised 2015-07-22 09:54:49 +09:30
Toby Zerner
8455aa7907 Persist modal across routes
Don't hide it unless it's already been shown, otherwise bootstrap JS
won't be initialized correctly
2015-07-22 09:54:00 +09:30
Toby Zerner
2f3569bed5 Don't override username if already set 2015-07-20 18:13:56 +09:30
Toby Zerner
ebf7c78969 Update event post API
- Use more appropriate component class name
- Allow username to be moved in translation
2015-07-20 18:12:08 +09:30
Toby Zerner
93c6bf026e Get rid of extension convenience method
We might reintroduce this later, but for now I want to keep the
extensions API as light as possible and get input before we add stuff
2015-07-20 18:09:37 +09:30
Toby Zerner
6a532c29fe Add some comments 2015-07-18 10:56:01 +09:30
Toby Zerner
0a1191d56c Make front-end localizable 2015-07-17 17:43:28 +09:30
Toby Zerner
2aa9c2e746 Major CSS revamp
- Get rid of Bootstrap (except we still rely on some JS)
- Use BEM class names
- Rework variables/theme config
- Fix various bugs, including some on mobile

The CSS is still not ideal – it needs to be cleaned up some more. But
that can be a focus for after beta.
2015-07-17 14:47:49 +09:30
Toby Zerner
0b685b1036 Case-sensitive filename changes 2015-07-15 15:54:34 +09:30
Toby Zerner
1c7653e79e 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
5aca956af7 Clean up discussion model 2015-07-08 10:51:30 +09:30
Toby Zerner
5cfb870202 Make admin open in a new window 2015-07-08 10:51:16 +09:30
Toby Zerner
5e982a39c5 Improve fulltext search API and interface 2015-07-07 20:35:18 +09:30
Toby Zerner
e62093f4dd Fix discussion search result suggestion excerpts
So that they show the relevant part of the post
2015-07-07 16:16:20 +09:30
Toby Zerner
23eec806e6 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
eee5133d6e 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
41c5ed0acb 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
260f4c85bf Refactor component API a bit 2015-06-26 19:09:43 +09:30
Toby Zerner
020e671c74 Tweak user bio editing UI 2015-06-26 13:57:21 +09:30
Toby Zerner
c81cb5dcc8 Flattening items breaks things; recurse to get the first element instead 2015-06-26 13:52:54 +09:30
Toby Zerner
d2c1e3a3d7 Tweak how discussion sidebar displays on mobile
Give all items in an item list a class on their <li>. Super helpful for
styling
2015-06-25 15:38:29 +09:30
Toby Zerner
0d5927d812 Prevent incorrect badge redraw diffing 2015-06-25 15:35:11 +09:30
Toby Zerner
8328906fe5 Give all components config on the root element
So that extensions can work on it no matter what
2015-06-25 15:33:29 +09:30
Toby Zerner
be9dea172d Split discussion controls into three groups:
- user (reply, subscription)
- moderation (rename, sticky, tags)
- destructive (delete)

Will keep extension-added items organised nicely
2015-06-25 15:31:15 +09:30
Toby Zerner
972bd24c7a Discussion list refactor, gestures
Also make base Component class automatically assign this.element :)
2015-06-24 17:56:39 +09:30
Toby Zerner
fcd1b081d9 Significantly improve mobile UX
Most of #137 done.

- Use FastClick to make everything feel more responsive
- Use transforms for animations to make them silky smooth
- Style the drawer the same as the header to keep things simple
- Revert to fixed composer, but allow it to be minimised
- Add a separate notifications page for mobile so it’s easy to go back
- Add indicator to the menu button when there are unread notifications
- Close the drawer when navigating away
- Make dropdowns/modals scrollable
- Many other mobile tweaks and bug fixes

Didn’t take much care to keep CSS clean, due to #103
2015-06-24 11:44:53 +09:30
Toby Zerner
951db23ffd Revert from a while ago: always append if reference item not found
API still needs some work though
2015-06-23 11:12:37 +09:30
Toby Zerner
dfe1a9bae5 Gracefully handle discussions with no posts
Although this should never happen
2015-06-23 10:30:06 +09:30
Toby Zerner
a45729805d Implement time gap indicators
Get rid of short human times (1m, 1h, 1d) for now
2015-06-19 10:00:19 +09:30
Toby Zerner
592e0ae1c8 Prevent JS error if discussion has been loaded without posts 2015-06-18 17:42:08 +09:30
Toby Zerner
ccd5fedd25 Extract into truncate helper 2015-06-17 18:22:14 +09:30
Toby Zerner
cf7b6974bc Don't add duplicate posts to a discussion 2015-06-15 08:59:57 +09:30
Toby Zerner
9ef431a542 Fix saving of to-many relationships 2015-06-12 16:41:13 +09:30
Toby Zerner
f667313cc2 Improve ordering of list items when specified key doesn't exist 2015-06-11 18:41:13 +09:30
Toby Zerner
f82aaa82a5 Lay the groundwork for translation & refactor asset compilation
Ditched the idea of having language packs as extensions. Reasoning:

1. Because we use machine keys for translations (rather than English
keys), extensions need to be able to define default translations. If
English translations are to be included in extensions and not in a
language pack extension, then it doesn’t make sense to have other
languages as language pack extensions. Inconsistency → complexity.

2. Translations should maintain version parity with their respective
extensions. There’s no way to do this if extension translations are
external to the extension.

Instead, localisation will be a core effort, as well as a per-extension
effort. Translators will be encouraged to send PRs to core + extensions.

In core, each locale has a directory containing three files:
- translations.yml
- config.js: contains pluralisation logic for the JS app, as well as
moment.js localisation if necessary
- config.php: contains pluralisation logic for the PHP app

Extensions can use the Flarum\Extend\Locale extender to add/override
translations/config to a locale.

Asset compilation has been completely refactored with a better
architecture. Translations + config.js are compiled and cached for the
currently active locale.
2015-06-10 14:23:56 +09:30
Toby Zerner
944e5c649c 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
920ad4f04f Implement search on front end 2015-06-03 18:10:56 +09:30
Toby Zerner
71a5b1f49c Fix/simplify timestamp live updating. closes flarum/core#101 2015-06-01 11:10:15 +09:30
Toby Zerner
605eaa6ffc Add text-editor API to get selection range 2015-06-01 08:49:46 +09:30
Toby Zerner
a3b029accc Prevent error when trying to get relationship and no links have been loaded 2015-05-30 13:58:21 +09:30
Toby Zerner
8859e49241 Add helper to format number with commas 2015-05-30 08:40:29 +09:30
Toby Zerner
2dbd73c11e Implement abbreviate-number helper. closes flarum/core#96 2015-05-30 08:08:57 +09:30
Toby Zerner
2ef2457c57 Sync the discussion model/post stream when posts are added/removed 2015-05-29 18:56:29 +09:30
Toby Zerner
1bb5ef2d72 New and improved post stream. 2015-05-29 18:17:50 +09:30
Toby Zerner
87f84f0614 Improvements to change/forgot password 2015-05-27 16:25:44 +09:30