Commit Graph

3830 Commits

Author SHA1 Message Date
Alexander Skvortsov
42b3a09c26 Eliminate temporary BC layers from rewrite
During the frontend rewrite, we introduced mithril patches for a `route` attr, and for `m.stream`. Later, we decided not to go that route, but not to remove the patches yet to avoid breaking extensions while we were finalizing the replacements. We can now remove these.

Other BC layers are for things from before beta 14, so those remain in place.
2020-10-02 19:05:26 -04:00
flarum-bot
530ab7c715 Bundled output for commit c8cc1ed665 [skip ci] 2020-10-02 22:50:48 +00:00
Alexander Skvortsov
c8cc1ed665 Various TypeScript improvements (#2309)
- Use Mithril.Attributes as base for ComponentAttrs, remove =any from class signature for Component
- Convert Alert to TypeScript, introduce AlertAttrs interface
- Convert AlertManagerState to TypeScript, add overload signatures for `show`, introduce AlertState interface for stored Alerts.
- Set ComponentAttrs as default T for Component
- Make attrs in AlertAttrs optional
- Add AlertIdentifier interface, simplify show type signature
- Remove mithril patch shim, as all patches onto m are now deprecated
- Use Mithril.Static for shim
2020-10-02 18:49:40 -04:00
flarum-bot
d2f55e941b Bundled output for commit 0232ec0edd [skip ci] 2020-10-02 22:05:01 +00:00
Wadim Kalmykov
0232ec0edd Improve DiscussionListState refresh method (#2322)
- Ensure that the discussion list is cleared before it is updated with fetched results
- Rename `clear` to `deferClear`, improve documentation to make its purpose clearer.
2020-10-02 18:03:44 -04:00
flarum-bot
81435a5ca0 Bundled output for commit eb717bb034 [skip ci] 2020-10-02 21:55:59 +00:00
Alexander Skvortsov
eb717bb034 Basic Extension Dependency Support (#2188)
- Don't enable an extension if its dependencies are not enabled
- Don't disable an extension if its dependencies are not disabled
2020-10-02 17:54:28 -04:00
flarum-bot
9251aa925f Bundled output for commit 9e88609a56 [skip ci] 2020-10-02 21:11:38 +00:00
Alexander Skvortsov
9e88609a56 Minor improvements to onNewRoute (#2328)
- Call onNewRoute when page changed with same component in DiscussionPage and UserPage

- Make app.previous and app.current changed in onNewRoute, not in oninit. This way, when the route is changed, but still handled by the same component, a new PageState object will still be created.
2020-10-02 17:10:38 -04:00
flarum-bot
d968f50a64 Bundled output for commit 0aa6eb2b44 [skip ci] 2020-10-02 20:58:06 +00:00
Alexander Skvortsov
0aa6eb2b44 Use Link component for links instead of mithril route patch (#2315)
This new component now also supports external links.
2020-10-02 16:56:40 -04:00
flarum-bot
6f8aa0ed5a Bundled output for commit b69abb87b5 [skip ci] 2020-10-02 15:15:05 +00:00
Alexander Skvortsov
b69abb87b5 Adjust PostStreamScrubber height after scroll (#2333) 2020-10-02 11:13:55 -04:00
Alexander Skvortsov
28056d0c0e Ensure that modal hide animates (#2332)
We want to return a promise in``onbeforeremove` with arbitrary loading time to ensure that the animateHide animation has time to complete.
2020-10-02 11:12:49 -04:00
flarum-bot
07b1ed4d76 Bundled output for commit 2696f02ce1 [skip ci] 2020-10-01 18:52:08 +00:00
Alexander Skvortsov
2696f02ce1 Fix multiple scrolls to same post in PostStream (#2264)
While more pleasant from an FSM standpoint, comparing the current targetPost to the previous one does not work if goToNumber is called twice in a row for the same post. For instance, if a user clicks the mentions link to a post twice, the post stream breaks.
2020-10-01 14:50:54 -04:00
flarum-bot
8e8cfe28ec Bundled output for commit 9b3c94964c [skip ci] 2020-10-01 01:03:05 +00:00
Alexander Skvortsov
9b3c94964c Use custom event on ALL SuperTextEditor actions 2020-09-30 21:01:24 -04:00
Sami Mazouz
bd1babcc05 Right align discussion controls dropdown on slidable item (#2330) 2020-09-30 16:53:50 -04:00
flarum-bot
353207a31f Bundled output for commit 3b81aabe9b [skip ci] 2020-09-30 20:34:47 +00:00
Alexander Skvortsov
3b81aabe9b Improve PostStreamState.viewingEnd()
In some cases, such as if we've stickied a post, an event post
may have been added / removed.This means that `this.visibleEnd`
and`this.count()` will be out of sync by 1 post, but we are still
"viewing the end" of the post stream, so we should still reload
all posts up until the last one.
2020-09-30 16:33:10 -04:00
Daniël Klabbers
f332f5bfe4 Mark keys for Config required only with InstalledSite (#2323)
* use fallback on url to prevent errors in cli during install. The value of the fallback doesn't actually matter, we just need something.
2020-09-30 15:38:19 -04:00
Daniël Klabbers
99c47271be Fix for a bug that would delete the new revision of less/js in case the filenames match. 2020-09-30 09:26:32 +02:00
Daniël Klabbers
656dec65dc Allow easier overriding of js compiler (#2318) 2020-09-29 19:03:51 -04:00
flarum-bot
7629aad6ce Bundled output for commit 4a85cc6813 [skip ci] 2020-09-29 22:42:20 +00:00
Alexander Skvortsov
4a85cc6813 Merge pull request #2314 from flarum/as/modal-fix
Frontend Rewrite Followup Modal Fixes
2020-09-29 18:41:03 -04:00
Alexander Skvortsov
12bfff9b5d Rename onshow and onhide
animateShow and animateHide are more descriptive
2020-09-29 18:37:56 -04:00
Alexander Skvortsov
e798cb104b Return on animateShow if already loaded 2020-09-29 18:37:56 -04:00
Alexander Skvortsov
4c3f36a53b Pass ModalManagerState into Modal instances instead of calling the global. 2020-09-29 18:37:56 -04:00
Alexander Skvortsov
5127e7d063 Ensure that readyCallback is called on modals opened from other modals 2020-09-29 18:37:56 -04:00
Alexander Skvortsov
822ace668a Prevent hide animation when opening modal from other modal 2020-09-29 18:37:56 -04:00
Alexander Skvortsov
b4f563c38f Revert "Fix opening modals from other modals. (#2263)"
This reverts commit 1d7002a63f.
2020-09-29 18:37:56 -04:00
flarum-bot
aa290898a5 Bundled output for commit 36faf92864 [skip ci] 2020-09-29 22:35:50 +00:00
Alexander Skvortsov
36faf92864 Merge pull request #2299 from flarum/as/poststream_improvements
[Frontend Rewrite] PostStream Improvements
2020-09-29 18:34:16 -04:00
Franz Liedke
f39c011e9c README: Update badge to truly show latest release
Refs #2311.
2020-09-29 23:23:37 +02:00
Abolade Eniseyin
f040e2ff95 Update logo and badges in README (#2311)
Fixes #2296.
2020-09-29 23:22:51 +02:00
flarum-bot
9869ee0980 Bundled output for commit fc15249e5c [skip ci] 2020-09-29 20:56:44 +00:00
Wadim Kalmykov
fc15249e5c fix clear search (#2325) 2020-09-29 16:55:26 -04:00
flarum-bot
a8ea8b2931 Bundled output for commit 922cb8bb11 [skip ci] 2020-09-28 23:18:39 +00:00
Sami Mazouz
922cb8bb11 Fix mobile controls gesture on discussion deletion/restoration (#2324)
Because the Slidable class was always added on creation, it was lost every time the class list changed (in this case when the discussion was hidden/unhidden which added/removed DiscussionListItem--hidden class). So by determining the Slidable class's presence in elementAttrs() method, it guarantees it always properly set.
2020-09-28 19:07:05 -04:00
Wadim Kalmykov
948ac359dc Improve developer experience by forcing LF line endings (#2321) 2020-09-28 14:04:08 -04:00
Alexander Skvortsov
3c3576c297 Pass a translator instance to getEmailSubject on MailableInterface (#2244)
* Pass a translator instance to getMailSubject (breaking change)

* Temporarily comment out getEmailSubject to avoid BC breaks
2020-09-28 00:04:28 -04:00
flarum-bot
1dfb01d067 Bundled output for commit 4b679a35e0 [skip ci] 2020-09-28 03:51:00 +00:00
Alexander Skvortsov
4b679a35e0 Put m.stream in flarum/utils/stream (#2316) 2020-09-27 23:49:33 -04:00
Franz Liedke
63745b73aa Use reserved TLD for default dev hostname
See https://jdebp.eu/FGA/dns-use-domain-names-that-you-own.html.
2020-09-27 22:55:46 +02:00
flarum-bot
ce9093ab5d Bundled output for commit bfa62dbe8f [skip ci] 2020-09-27 02:14:07 +00:00
Alexander Skvortsov
bfa62dbe8f Add warnings to Mithril 2 BC layer (#2313) 2020-09-26 22:12:43 -04:00
Alexander Skvortsov
98c684c979 Fixed noAnimation: previously, the opposite of what was requested happened 2020-09-25 16:02:39 -04:00
Alexander Skvortsov
2d7f8130c8 DiscussionPage: only set this.discussion after the initial set of posts has loaded, this results in a slightly smoother initial load. 2020-09-25 15:54:54 -04:00
Alexander Skvortsov
71518112b3 Provide location data to scrubber earlier to avoid unnecessary and confusing scrubber animation on page load. 2020-09-25 15:52:18 -04:00