1
0
mirror of https://github.com/flarum/core.git synced 2025-08-23 16:43:21 +02:00
Commit Graph

8723 Commits

Author SHA1 Message Date
Franz Liedke
6c91ade4c6 Add a helper class for managing low-level config 2020-09-25 10:58:52 +02:00
flarum-bot
c40a0e38d9 Bundled output for commit 8832ea0666 [skip ci] 2020-09-25 02:32:11 +00:00
Alexander Skvortsov
8832ea0666 Add in BC layer for props, initProps, m.withAttr, and m.prop (#2310) 2020-09-24 22:30:55 -04:00
Daniël Klabbers
6fda1e02db Changes methods and properties from private to protected (#2308)
The goal of this PR is to offer increased flexibility for integrators and
custom solutions in skeleton modifications.
2020-09-24 14:30:16 -04:00
flarum-bot
48afda2422 Bundled output for commit 75db6b4878 [skip ci] 2020-09-24 15:31:05 +00:00
Alexander Skvortsov
d1cf97df76 Replace $app->url() with url-generated link to index (#2302) 2020-09-24 11:30:57 -04:00
Alexander Skvortsov
3a02edb15f Revert https://github.com/flarum/core/pull/1536 (#2305) 2020-09-24 11:30:27 -04:00
Wadim Kalmykov
75db6b4878 Remove call to undefined method handleErrors (#94) 2020-09-24 11:30:10 -04:00
flarum-bot
abcf55152f Bundled output for commit 077c28dc64 [skip ci] 2020-09-24 04:09:18 +00:00
Matteo Contrini
077c28dc64 Fix comment for the time gap feature in PostStream (#2294)
The time interval for the time gap feature is 4 days and not 4 hours.
2020-09-24 00:08:12 -04:00
flarum-bot
3012ec8da1 Bundled output for commit 1d7002a63f [skip ci] 2020-09-24 03:13:43 +00:00
Alexander Skvortsov
1d7002a63f Fix opening modals from other modals. (#2263)
While seemingly correct, an onremove method in Modal that triggers animateHide is problematic, because if one modal is opened from another, the one currently open will be removed from the DOM, triggering animateHide, and closing the new modal.

To compensate, an onupdate method now closes a modal if one is open but shouldn't be; this supports the functionality of the old method when the modal is closed not from the modal instance itself (e.g. app.modal.close())

This is not ideal, but necessary. We should consider eventually expanding the modal system to support showing multiple modals at the same time (stacked over each other). Then, we can move this back to individual modals.
2020-09-23 23:12:22 -04:00
Alexander Skvortsov
d57a9f100a Only call updateScrubberValues onupdate when necessary
When the page is scrolled, goToIndex is called, or the page is loaded,
various listeners result in the scrubber being updated with a new
position and values. However, if goToNumber is called, the scrubber
will not be updated. Accordingly, we add logic to the scrubber's
onupdate to update itself, but only when needed, as indicated by this

This saves us a LOT of unnecessary calls, and makes scrubber movement smoother.
2020-09-23 23:06:25 -04:00
Alexander Skvortsov
8640ce83b5 Execute oncreate scrubber update after loadPromise has completed
This way, we ensure that the initial position (and data) of the scrubber is correct. Otherwise, we get blank dates / incorrect location.
2020-09-23 23:06:20 -04:00
Alexander Skvortsov
a17f1247a8 Fix $(...).offset() is undefined on some scrolls. 2020-09-23 23:06:14 -04:00
flarum-bot
75d80b1c8a Bundled output for commit 8d21f6f074 [skip ci] 2020-09-24 03:06:06 +00:00
Alexander Skvortsov
8d21f6f074 Fix double fadein for post stream (#2300) 2020-09-23 23:04:56 -04:00
flarum-bot
6b83c71e33 Bundled output for commit f61b5201d1 [skip ci] 2020-09-24 03:01:22 +00:00
Alexander Skvortsov
f61b5201d1 Mithril 2 Update (#93)
Update for Mithril 2

- TagLinkButtons now have children passed in, even though those children are not directly shown. This is because those children are used if that TagLinkButton is the active element in a dropdown.
- Since `m.redraw.strategy('all')` is no longer an option, we use keys to force a full-page rerender after rearranging tag order in the admin dashboard
2020-09-23 23:00:15 -04:00
flarum-bot
9ed0083c12 Bundled output for commit b26a9af51f [skip ci] 2020-09-24 02:57:51 +00:00
flarum-bot
eebefa196e Bundled output for commit 6bdbee70db [skip ci] 2020-09-24 02:57:42 +00:00
flarum-bot
fe02967de0 Bundled output for commit 418e656c9e [skip ci] 2020-09-24 02:57:17 +00:00
Alexander Skvortsov
b26a9af51f Mithril 2 Update (#27)
Update for Mithril 2
2020-09-23 22:57:08 -04:00
Alexander Skvortsov
6bdbee70db Mithril 2 Update (#32)
Update for Mithril 2
2020-09-23 22:56:47 -04:00
flarum-bot
1f44b5a4c8 Bundled output for commit a2049ebbb8 [skip ci] 2020-09-24 02:56:26 +00:00
Alexander Skvortsov
418e656c9e Mithril 2 Update (#19)
Update for Mithril 2
2020-09-23 22:56:13 -04:00
Alexander Skvortsov
a2049ebbb8 Mithril 2 Update (#12)
Update for Mithril 2
2020-09-23 22:55:38 -04:00
flarum-bot
2df478224c Bundled output for commit 9307cf17b3 [skip ci] 2020-09-24 02:55:35 +00:00
flarum-bot
51134ff625 Bundled output for commit ea56f39a53 [skip ci] 2020-09-24 02:54:49 +00:00
Alexander Skvortsov
9307cf17b3 Mithril 2 Update (#23)
Update for Mithril 2
2020-09-23 22:54:48 -04:00
Alexander Skvortsov
ea56f39a53 Mithril 2 Update (#52)
Update for Mithril 2

- Please note that PostQuoteButton and AutocompleteDropdown are not Fragments, not Components. Accordingly, they have been moved to the components folder.

Co-authored-by: Matthew Kilgore <tankerkiller125@gmail.com>
Co-authored-by: Franz Liedke <franz@develophp.org>
2020-09-23 22:53:46 -04:00
flarum-bot
6ff20798c3 Bundled output for commit ab63a55d60 [skip ci] 2020-09-24 02:52:46 +00:00
Alexander Skvortsov
ab63a55d60 Mithril 2 Update (#19)
Update for Mithril 2
2020-09-23 22:51:50 -04:00
flarum-bot
bf7e002442 Bundled output for commit 63198e67c6 [skip ci] 2020-09-24 02:50:35 +00:00
flarum-bot
679075407f Bundled output for commit 080f553a08 [skip ci] 2020-09-24 02:49:58 +00:00
Alexander Skvortsov
63198e67c6 Mithril 2 Update (#23)
Update for Mithril 2
2020-09-23 22:49:53 -04:00
flarum-bot
ccf9fae68c Bundled output for commit df74cc4a96 [skip ci] 2020-09-24 02:49:19 +00:00
Alexander Skvortsov
080f553a08 Mithril 2 Update (#22)
Update for Mithril 2
2020-09-23 22:49:05 -04:00
Alexander Skvortsov
df74cc4a96 Mithril 2 Update (#29)
Update for Mithril 2
2020-09-23 22:48:20 -04:00
flarum-bot
b90d637731 Bundled output for commit 77d5e2cd83 [skip ci] 2020-09-24 02:47:59 +00:00
Alexander Skvortsov
77d5e2cd83 Mithril 2 Update (#29)
Update for Mithril 2

- Please note that AutocompleteDropdown is now a Fragment, not a Component. Accordingly, it's location has been changed.
2020-09-23 22:46:54 -04:00
flarum-bot
a3119e151e Bundled output for commit f23a3833fa [skip ci] 2020-09-24 02:46:21 +00:00
Alexander Skvortsov
f23a3833fa Mithril 2 Update (#10)
Update for Mithril 2
2020-09-23 22:45:14 -04:00
flarum-bot
527f43273c Bundled output for commit 389ac5a9b7 [skip ci] 2020-09-24 02:45:06 +00:00
flarum-bot
3c6edc1802 Bundled output for commit 8b4380254e [skip ci] 2020-09-24 02:44:30 +00:00
Alexander Skvortsov
389ac5a9b7 Mithril 2 Update (#21)
Update for Mithril 2
2020-09-23 22:44:15 -04:00
Alexander Skvortsov
8b4380254e Mithril 2 Update (#15)
Update for Mithril 2
2020-09-23 22:43:34 -04:00
flarum-bot
83cfb331c2 Bundled output for commit 30cdf0acc0 [skip ci] 2020-09-24 02:41:41 +00:00
David Sevilla Martín
30cdf0acc0 Mithril 2 update (#2255)
* Update frontend to Mithril 2

- Update Mithril version to v2.0.4
- Add Typescript typings for Mithril
- Rename "props" to "attrs"; "initProps" to "initAttrs"; "m.prop" to "m.stream"; "m.withAttr" to "utils/withAttr".
- Use Mithril 2's new lifecycle hooks
- SubtreeRetainer has been rewritten to be more useful for the new system
- Utils for forcing page re-initializations have been added (force attr in links, setRouteWithForcedRefresh util)
- Other mechanical changes, following the upgrade guide
- Remove some of the custom stuff in our Component base class
- Introduce "fragments" for non-components that control their own DOM
- Remove Mithril patches, introduce a few new ones (route attrs in <a>; 
- Redesign AlertManagerState `show` with 3 overloads: `show(children)`, `show(attrs, children)`, `show(componentClass, attrs, children)`
- The `affixedSidebar` util has been replaced with an `AffixedSidebar` component

Challenges:
- `children` and `tag` are now reserved, and can not be used as attr names
- Behavior of links to current page changed in Mithril. If moving to a page that is handled by the same component, the page component WILL NOT be re-initialized by default. Additional code to keep track of the current url is needed (See IndexPage, DiscussionPage, and UserPage for examples)
- Native Promise rejections are shown on console when not handled
- Instances of components can no longer be stored. The state pattern should be used instead.

Refs #1821.

Co-authored-by: Alexander Skvortsov <sasha.skvortsov109@gmail.com>
Co-authored-by: Matthew Kilgore <tankerkiller125@gmail.com>
Co-authored-by: Franz Liedke <franz@develophp.org>
2020-09-23 22:40:37 -04:00
Alexander Skvortsov
ea7d31e15e Revert "Use lifecycle interface for frontend extender (#2211)" (#2301)
This reverts commit 368a9836bd.
2020-09-23 00:21:45 -04:00