Commit Graph

4327 Commits

Author SHA1 Message Date
2e0d494bec Bundled output for commit 6d9bb709c7322fa5871ff17c895fa26430a7e9d3 [skip ci] 2021-05-09 21:35:04 +00:00
6d9bb709c7 Fix typo in LoadingIndicator docblock 2021-05-09 22:33:33 +01:00
915351baec Bundled output for commit 707889abc8b505c2cee709d7a39252c125f447d9 [skip ci] 2021-05-09 21:23:38 +00:00
707889abc8 Fix required selector argument to Component.$() (#2844) 2021-05-09 17:22:22 -04:00
2cd1c2964a Bundled output for commit 8a451e0bfc061f64a74926b33374b0558ea16dff [skip ci] 2021-05-07 16:31:01 +00:00
8a451e0bfc Fix exception in bootExtensions
Frontend extenders exist in a weird state of limbo, where they are technically defined, but aren't used or tested at all. In da5db714c2ba49f789bea68971a2b46c29ff6b0a, we shifted from passing `extension.extend` to `flattenDeep` to calling `flat` on `extension.extend`. If an extension doesn't define extenders (as is the case for most extensions), the change breaks the forum. All we do here is add a null check.
2021-05-07 12:29:10 -04:00
0b9ad5425c Bundled output for commit da5db714c2ba49f789bea68971a2b46c29ff6b0a [skip ci] 2021-05-05 23:29:41 +00:00
da5db714c2 Remove lodash from core (#2827)
* Remove `lodash-es` dependency

* Replace `escapeRegExp` with home-made util

* Replace `throttle` with `throttle-debounce` library

* Use native browser methods for `deepFlatten`

We need a polyfill for iOS 11 and below. I think using a native method with this polyfill is better than having our own function instead, even if the bundle size is ~150B more.

* Save a few bytes in `escapeRegExp`

* Fix typo in comment

* Undo import re-organisation

* Use spread instead of slice

* Use smaller Array.flat polyfill from MDN

* Export new utils in `compat.js`
2021-05-06 00:28:22 +01:00
d4a2357a32 Bundled output for commit 588a9f952f18b7a830891ed04b351167b9ced9a1 [skip ci] 2021-05-05 14:47:48 +00:00
588a9f952f Remove unneeded delete (#2835) 2021-05-05 15:46:23 +01:00
66233ce818 Remove unused variable 2021-05-04 18:15:05 -04:00
7d4bd8a845 Centralize permission caching (#2832) 2021-05-04 13:56:14 -04:00
3a6b8847f1 Mark JS dist folder as generated code (#2828)
This excludes it from the repo's language stats and are suppressed in Linguist diffs.

See: https://github.com/github/linguist/blob/master/docs/overrides.md#generated-code
2021-05-04 18:13:42 +01:00
2ffec2ee71 Update validation.yml. (#2829)
source: https://github.com/laravel/laravel/blob/v8.5.16/resources/lang/en/validation.php
2021-05-03 19:47:18 -04:00
7eea2476ca Harden Headers (#2721)
* Basic security headers

* Remove XSS Header (not relevent)

* Fix config name

* Use Arr::get()

* Add tests

* Re-fix the StoreConfig step for fresh installs

Co-authored-by: luceos <luceos@users.noreply.github.com>
Co-authored-by: Alexander Skvortsov <askvortsov1@users.noreply.github.com>
2021-05-03 12:42:06 -04:00
9711af42ae Apply fixes from StyleCI
[ci skip] [skip ci]
2021-05-03 05:36:06 +00:00
d12d52918b Use latest version of settings package
This allows us to get rid of hacks for configuring settings and config
2021-05-03 01:35:46 -04:00
ad92d11cf9 Bundled output for commit 3ca035f9aad71101ffc80b9cd8ff9d3ad2368e68 [skip ci] 2021-05-02 16:14:09 +00:00
3ca035f9aa Revamp notifications stylesheet (grid and flex) (#2822) 2021-05-02 17:13:04 +01:00
bbff3a2748 Bundled output for commit f5cd5f202ff1de84a4b5bd9504a586e1b43ddd74 [skip ci] 2021-05-02 10:38:26 +00:00
f5cd5f202f Allow multiple methods to be provided to extend and override 2021-05-02 11:37:19 +01:00
a78cbf644c Bundled output for commit 2de47a865660366bf938ea3d48b9aac153e50179 [skip ci] 2021-04-30 17:00:49 +00:00
2de47a8656 Fix package-lock
b45519974a accidentially commited a package-lock with symlinks, breaking the JS build process
2021-04-30 12:59:33 -04:00
b45519974a Switch to ICU MessageFormat (#2759) 2021-04-30 12:44:39 -04:00
edaf45d133 Remove unnecessary laravel config (#2796) 2021-04-30 00:31:19 +02:00
6b9e991082 Move Powered By Header to headers config (#2777)
* Move Powered By Header to headers config
* Use Arr::get()
2021-04-30 00:30:01 +02:00
8a431dc3cc [A11Y] Add focus ring mixin to restore ring to elements which no longer have it (#2814)
* Add focus ring mixin

These mixins allow us to restore default browser focus rings on elements which no longer have them.

* Add info about custom outline styles; use `#private` namespace and fix mixin name

I just learned that Less has namespaces! https://lesscss.org/features/#mixins-feature-namespaces
2021-04-29 22:10:17 +01:00
91b1d9029e LESS should be capitalised as Less
See http://lesscss.org/
2021-04-29 22:07:46 +01:00
e337c10bb8 Revision compiler revised (#2805)
- revisions now use <asset>.<type>?v=<revision> instead of <asset>-<revision>.<type>- remove deprecated filename for revision method
- reconsider use of cache differentiator and implement something that
prevents recompiling css every single time
- allow force recompilation
2021-04-29 16:49:36 -04:00
e0258d2708 error handling when extending flarum from extensions fails (#2740) 2021-04-29 16:17:41 -04:00
fcb5778705 fixed container bindings use of container (#2807) 2021-04-29 15:33:51 -04:00
40b47de9e1 Remove ExtensionPage CSS over-specification (#2792) 2021-04-29 16:31:37 +01:00
deadd67691 clarify callable arguments for password checker (#2812) 2021-04-29 10:19:06 -04:00
c119731e65 Bundled output for commit 2b7e7f3ff4ac02e050afe0be337cb4eade1a1e46 [skip ci] 2021-04-26 16:15:37 +00:00
2b7e7f3ff4 Fix class naming (#2811) 2021-04-26 17:14:22 +01:00
f4acb2c5db Bundled output for commit f9779284e4b9754855f8d5d238125df474faec8e [skip ci] 2021-04-22 22:37:03 +00:00
f9779284e4 Add users list to admin dashboard (#2626)
* Commit initial WIP code

* Fix squashed grid on mobile

* Add pagination support; rename to userList

* Improve grid sizing

* Improve grid row shading

* Move EditUserModal to common

* Add link to profile page in grid

* Use Less styling vars

* Move EditUserModal translations to lib

* Add edit user button to grid

* Fix incorrect profile link priority

* Update profile link translation key

* Add priorities to other columns

* Add group badges to grid

* Add username to profile link tooltip

* Organise imports

* Use variable for header border bottom color

* Fix broken export

* Add total user count to API payload's metadata

* Add new metadata to ApiPayload type

* Implement correct page number

* Remove debug code

* Use function to get the total pages

This allows us to use the raw count elsewhere in the component (pssst... check the next commit!)

* Center profile link in column

* Add profile link header

* Show total users above table

* Use ItemList's itemName property for column data attributes

* Add user email column, hidden by default

This column is hidden by default using a placeholder email and blur filter. These are then removed when the visibility toggle is pressed.

This prevents any over-the-shoulder accidental data leakage, as emails are classed as PII under GDPR.

* Fix incorrect tooltip translation keys

* Add extra padding between email and visibility toggle button

* Prevent selection of blurred email

* Fix incorrect icon state for email toggle

* Update API response type to include metadata (for now)

* Increase number of users per page to 50

* Update compat files with new locations

* Format

* Add @deprecated notices for forum compat export

* Use AdminPayload for user count instead of supplying as REST API metadata

* Make nav look less squashed using bottom margin

* Suppress TS warning

* StyleCI fixes

* Fix TS error

* Update based on review comments

* Rename user list -> users

* Rename internal instances of user_list to users

* Fix formatting

* Use CSS custom properties for the table column count

* Use .Button--icon instead of custom style

* Make fake email more realistic length

* Add a11y attributes

* Use padding bottom instead of margin bottom for page spacing

* Make compatible with new CSS LoadingIndicator

I won't let it break here! :P

* Integrate profile link into username column

* Don't force columns to be 300px

This made the grid look very bloated and intimidating -- lets instead increase the padding between items and make it only the width it needs to be.

* Center edit user button in column

* Increase spacing between email and visibility toggle button

* Rename `statistics` to `modelStatistics` in Admin payload

This prevents any possible conflicts with core and `flarum/statistics`. We might want to consider migrating the stats extension to extend this object in the future.

* Update comments, fix TS error

* Various translation key changes

* Change gmail.com -> example.com

* Stretch 'edit user' button to entire cell size

* Update translations

* Is the YAML formatted right this time? 🙈

* Remove email placeholder

Fixes an issue where the table would jump if an email was unhidden that was longer than the placeholder.

* Re-order lib translations

* Clicking blurred email now unblurs

* Correct header class

* Improve edit user button centring

* Improve vertical row item centering

* Fix incorrect column length in aria attribute

* Use .Button--text!
2021-04-22 23:35:42 +01:00
43d6b3104d Bundled output for commit 33bd99d376ac1d49123414c02e1d8778b9fba898 [skip ci] 2021-04-21 11:27:23 +00:00
33bd99d376 Fix uses of loading spinner (#2797)
* Update Loading Indicator

- Fix mistake in LoadingIndicator Less
- Middle align the loading indicator when inline
- Fix Loading Indicator not correctly accepting container class names
- Add inline and block attributes

* Fix loading indicator in composer

* Fix loading indicator on notification list

* Fix loading indicator on discussion page

* Fix loading indicator on button

* Update more uses of loading indicator

* Fix loading indicator in Search box

* Fix AvatarEditor loading spinner

* Set default spinner props

* Replace "tiny" with "small" in Less

* Improve spinner vertical centring in buttons

* Reduce size specificity

* Use single attribute for block/inline

* Use new display attribute

* Use classes for different sizes

* Use `display=block` by default
2021-04-21 12:26:09 +01:00
eb4b18a979 Combine search tests
#b62debf031f1d3aec9cb5e92d9df54cb8ab3a3b1 and #b6f0b01307884b11388eff1ae2d814b7f57715aa
 both added/improved searching tests, but did so in separate files. As a result, the tests did not consider each other, and when both were merged, started failing. This commit combines the tests into one file that tests both order and search in titles.
2021-04-20 19:16:59 -04:00
b62debf031 Add user id slug driver (#2787) 2021-04-20 23:52:53 +01:00
1f2411e15e Fix searching titles in discussions (#2698)
* Fix searching titles in discussions

* Apply fixes from StyleCI

* Fix tests

* Distinct by discussion ID

* Replace distinct with groupBy

Co-authored-by: Alexander Skvortsov <askvortsov1@users.noreply.github.com>
2021-04-20 18:52:14 -04:00
d99df936b1 Bundled output for commit 9716a15c317a291dd4a9dfb4c4a5ec8895b8dd95 [skip ci] 2021-04-20 16:26:39 +00:00
9716a15c31 Add accessibility attributes to loading spinner (#2799) 2021-04-20 17:25:23 +01:00
5e2340bf10 Fix registering custom searchers, allow searchers without fulltext (#2755) 2021-04-19 16:59:53 -04:00
c84939b19c Filesystem Extender and Tests (#2732) 2021-04-19 16:25:08 -04:00
4974c91481 Asset Publish Command (#2731) 2021-04-19 15:51:28 -04:00
f67149bb06 Use Laravel filesystem interface for assets and avatars (#2729)
* WIP: Use Laravel filesystem interface where possible
* Drop vendorFilesystem
* Support getting URL of cloud-based logo and favicon
* FilesystemAdapter should always be cloud
* Get base avatar URL from filesystem adapter
* Restore deleted getAsset method

Co-authored-by: Alexander Skvortsov <askvortsov1@users.noreply.github.com>
2021-04-19 21:11:03 +02:00
a2d77d7b81 Rename relevant migration so it runs again (#2793) 2021-04-19 14:14:07 -04:00
da4264c8a3 Bundled output for commit 0f9526ba9f11c9950b459f85e62a37c96dc6701a [skip ci] 2021-04-19 14:37:25 +00:00