Alexander Skvortsov
1360723c3f
Separate updateScrubber into separate method from onscroll
2020-07-31 11:17:11 +02:00
Alexander Skvortsov
5cdfeaf9a5
Move scrollPromise log into scrollToItem
2020-07-31 11:17:10 +02:00
Alexander Skvortsov
6e1d385268
Code cleanup, added a bunch of debug console logging
2020-07-31 11:17:10 +02:00
Alexander Skvortsov
193f3b040d
Slightly improve scrubber label accuracy on click
2020-07-31 11:17:10 +02:00
Alexander Skvortsov
74cb4f9007
Get rid of post stream events. Initial load is still buggy
2020-07-31 11:17:09 +02:00
Alexander Skvortsov
eb24e628fa
Get rid of js-PostStream
2020-07-31 11:17:09 +02:00
Alexander Skvortsov
c03feceb9f
Fix goToLast
2020-07-31 11:17:09 +02:00
Alexander Skvortsov
51008bc65d
Use scrollToIndex to contain scrollToLast
2020-07-31 11:17:09 +02:00
Alexander Skvortsov
9a357f5d19
Add scrubber height change transition css, don't apply when dragging
2020-07-31 11:17:08 +02:00
Alexander Skvortsov
9c63c54868
Simplify paused logic
2020-07-31 11:17:08 +02:00
Alexander Skvortsov
5427b35c6d
Large simplifications of PostStreamScrubber
2020-07-31 11:17:08 +02:00
Franz Liedke
2ec49db6df
Pass discussion as prop to stream components
...
- Law of demeter (no need to access discussion through the state)
- Less public API surface of the state object
2020-07-31 11:17:07 +02:00
Franz Liedke
062dc8f57f
Don't call protected method outside of state
...
In addition, this again avoids writing a state property from
outside the state class.
I am not 100% sure whether this extra sanitization is necessary,
but it seems to be the only place where it is not applied when
changing the value of `visibleEnd` (and not safeguarded otherwise),
so I erred on the safe side.
2020-07-31 11:17:07 +02:00
Franz Liedke
8a9e50d192
Encapsulate viewingEnd() in state
...
...instead of calculating this derived value outside the state class.
2020-07-31 11:17:07 +02:00
Franz Liedke
6c087da65f
Remove obsolete event handler
...
The event is not triggered anymore.
This is now handled through the `positionHandler` prop.
2020-07-31 11:17:06 +02:00
Franz Liedke
6bcecd623b
Revert inlining method, rename the method instead
2020-07-31 11:17:06 +02:00
Alexander Skvortsov
614bb0d71e
Moved refresh method of discussionpage into init, as its not used externally (and using it would be bad practice), fixing up PostStream
2020-07-31 11:17:06 +02:00
Alexander Skvortsov
cff9b327a9
Remove event from PostState, pass handler in via props,
2020-07-31 11:17:06 +02:00
Alexander Skvortsov
7af8e35a6e
Extract PostStream state
2020-07-31 11:17:03 +02:00
dependabot[bot]
f9c9b5d5e4
Bump elliptic from 6.5.2 to 6.5.3 in /js ( #2251 )
...
Bumps [elliptic](https://github.com/indutny/elliptic ) from 6.5.2 to 6.5.3.
- [Release notes](https://github.com/indutny/elliptic/releases )
- [Commits](https://github.com/indutny/elliptic/compare/v6.5.2...v6.5.3 )
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-31 01:08:39 +02:00
Alexander Skvortsov
8a73cc522e
Fix optional parameters in url generator ( #2246 )
...
* Fix route collection getting wrong path when optional parameters present, add unit tests
2020-07-28 20:51:14 -04:00
Franz Liedke
db83003eb5
Apply fixes from StyleCI
...
[ci skip] [skip ci]
2020-07-27 19:42:23 +00:00
Franz Liedke
4dc4dc624e
Merge pull request #2243 from flarum/fl/2055-l6-translator
...
Upgrade to Laravel 6, finally!
2020-07-27 21:42:01 +02:00
flarum-bot
ad42058a8a
Bundled output for commit 5e465f6051
[skip ci]
2020-07-24 22:18:35 +00:00
Alexander Skvortsov
5e465f6051
Extract Composer state ( #2161 )
...
Like previous "state PRs", this moves app-wide logic relating to
our "composer" widget to its own "state" class, which can be
referenced and called from all parts of the app. This lets us
avoid storing component instances, which we cannot do any longer
once we update to Mithril v2.
This was not as trivial as some of the other state changes, as we
tried to separate DOM effects (e.g. animations) from actual state
changes (e.g. minimizing or opening the composer).
New features:
- A new `app.screen()` method returns the current responsive screen
mode. This lets us check what breakpoint we're on in JS land
without hardcoding / duplicating the actual breakpoints from CSS.
- A new `SuperTextarea` util exposes useful methods for directly
interacting with and manipulating the text contents of e.g. our
post editor.
- A new `ConfirmDocumentUnload` wrapper component encapsulates the
logic for asking the user for confirmation when trying to close
the browser window or navigating to another page. This is used in
the composer to prevent accidentally losing unsaved post content.
There is still potential for future cleanups, but we finally want
to unblock the Mithril update, so these will have to wait:
- Composer height change logic is very DOM-based, so should maybe
not sit in the state.
- I would love to experiment with using composition rather than
inheritance for the `ComposerBody` subclasses.
2020-07-25 00:17:25 +02:00
flarum-bot
62a2e8463d
Bundled output for commit 0098c64ebf
[skip ci]
2020-07-24 21:53:31 +00:00
Franz Liedke
0098c64ebf
Fix an irrelevant export name :P
2020-07-24 23:51:44 +02:00
Franz Liedke
2b5939d538
Simplify a few unnecessary Arr::get() calls
2020-07-24 22:56:31 +02:00
Alexander Skvortsov
2431df5602
Revert "Fixes wrong IP address when using a reverse proxy ( #2236 )" ( #2242 )
...
This reverts commit 451a557532
pending further discussion of https://github.com/flarum/core/pull/2236#issuecomment-663645583
2020-07-24 14:19:10 -04:00
flarum-bot
264ff67304
Bundled output for commit c08a56e9d8
[skip ci]
2020-07-24 17:03:04 +00:00
Alexander Skvortsov
c08a56e9d8
Notifications Dropdown: Remove init method that doesn't do anything (cleanup)
2020-07-24 13:01:45 -04:00
Alexander Skvortsov
4ee6d6fd88
Revert "Inject Url Generator and Translator Interface into notification mailer ( #2169 )"
...
This was actually already present and functional, so adding additional code for it
is unnecessary.
This reverts commit e627616750
.
2020-07-24 12:44:59 -04:00
Franz Liedke
9c09fe8465
Update to Laravel 6, finally!
...
Fixes #2055 .
2020-07-24 17:34:40 +02:00
Franz Liedke
b46d5e67a3
Make Translator compatible with Laravel 6
...
It's contract will change in Laravel 6. We extend from Symfony's
translator, but need to be compatible with that from Laravel in
order to use its validation package.
References:
- https://laravel.com/docs/6.x/upgrade#trans-and-trans-choice
- 8557dc56b1 (diff-88bc04a1548d09aa6250d902d1ac2b4c)
2020-07-24 17:32:50 +02:00
Franz Liedke
7fd23ff950
Inject Symfony translator contract, not Laravel's
...
The Laravel changes with v6, and our translator is primarily an
implementation of the Symfony contract.
2020-07-24 17:31:46 +02:00
Franz Liedke
e4077ab4ad
Replace a few forgotten obsolete helpers
...
- Apparently, I forgot that `array_flatten` comes from Laravel. :)
- When I did this previously, I did not search the views directory.
2020-07-24 17:28:56 +02:00
Franz Liedke
3b39c212e0
Explicitly bundle Carbon library
...
We have used this transitive dependency (via illuminate/support)
for a while, so let's make this explicit.
Incidentally, we now also explicitly require version 2.x - the
previous 1.x branch will no longer be supported after the
upcoming upgrade to Laravel 6.
Refs #2055 .
2020-07-24 16:46:33 +02:00
Franz Liedke
bca833d3f1
Remove Mandrill mail driver
...
This is in preparation for the upcoming upgrade to Laravel 6,
which dropped this driver.
Refs #2055 .
2020-07-24 16:39:28 +02:00
Jake Esser
451a557532
Fixes wrong IP address when using a reverse proxy ( #2236 )
...
Added reverse proxy support to preserve forwarded IPs
2020-07-22 08:55:44 -04:00
Alexander Skvortsov
eaac78650f
Deprecate AssertPermissionTrait ( #2044 )
2020-07-17 15:16:15 +02:00
Franz Liedke
2b3dec2be1
Fix deprecation and removal date
2020-07-17 12:19:48 +02:00
Alexander Skvortsov
37ebeb5705
User Extender (prepareGroups functionality) ( #2110 )
2020-07-17 12:18:35 +02:00
Franz Liedke
71abac0323
Rename view extender
...
As discussed in my initial review, it seems unlikely that we need
the ability to remove (or otherwise modify) namespaces again.
Therefore, it seems more consistent with other extenders to go
for a "View" extender with a "namespace" method.
Sorry for the back and forth. ;)
Refs #1891 , #2134 .
2020-07-17 12:05:49 +02:00
Franz Liedke
7e3d71a0a0
View extender: Do not resolve factory
...
Not all requests need this factory, so there is no need to
instantiate one and load the required files.
Refs #1891 , #2134 .
2020-07-17 12:05:38 +02:00
Alexander Skvortsov
b5e891df30
View Extender (add namespace) ( #2134 )
2020-07-17 11:59:00 +02:00
Alexander Skvortsov
3117d2ad7a
Use lifecycle interface for frontend extender ( #2211 )
2020-07-17 11:49:52 +02:00
dependabot[bot]
1ce0b926b6
Bump lodash from 4.17.15 to 4.17.19 in /js ( #2235 )
...
Bumps [lodash](https://github.com/lodash/lodash ) from 4.17.15 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases )
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19 )
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-17 10:47:28 +02:00
flarum-bot
24b16f9d7c
Bundled output for commit bd40353bcc
[skip ci]
2020-07-10 13:42:33 +00:00
Franz Liedke
bd40353bcc
Merge pull request #2207 from flarum/ds/typescript-conversion
...
Convert several files in `common/utils` to TypeScript
2020-07-10 15:41:14 +02:00
David Sevilla Martin
455327cca1
convert: common/utils/stringToColor
2020-07-10 14:13:33 +02:00