Commit Graph

12576 Commits

Author SHA1 Message Date
Jarek Radosz
7a8442435c
REFACTOR: LockOn class (#10428)
Mostly de-jQuery-ification. This refactor tries to closely preserve the original behavior.

Changes:
* Store the interval inside the class (allows using `clearLock()` on `LockOn` objects)
* Extract the interval function to a separate method
* Math.max result is never undefined (per MDN: "[Return value] The largest of the given numbers. If at least one of the arguments cannot be converted to a number, NaN is returned.")
* Replace jQuery's `offset()`
* Private methods be private
* Native `scrollTop` (jQuery's just a wrapper for this)
* `addEventListener`/`removeEventListener`
2020-08-13 16:43:05 +02:00
Mark VanLandingham
2008ecd68e
DEV: Remove incorrect comment in tag/show controller (#10423) 2020-08-13 09:19:09 -05:00
Martin Brennan
ef461ffd60
FIX: Make sure user preference to open external links in new tab works for bookmark list excerpts (#10409)
Meta post: https://meta.discourse.org/t/bookmark-page-does-not-respect-open-all-external-links-in-new-tab-user-preference/160118
2020-08-13 14:56:13 +10:00
Kris
9bc992dce4 follow-ups to 1972364: increase notification limit, make show-all a link 2020-08-12 17:14:48 -04:00
Vinoth Kannan
6a8562894a FIX: change the controller method name to match its new name.
The controller method `_changeFilters` is now changed to `changeFilters` in the commit 1fc58b5a4e. But it was not modified in the `admin-tools` service script.
2020-08-13 00:58:35 +05:30
Jeff Wong
70d4420c8e DEV: Add profile-hidden selector to user page for styling 2020-08-12 09:48:42 -07:00
Robin Ward
9525d3506b FIX: Heisentest with topic timings
We trigger `/topics/timings` requests without ever caring about the
promise afterwards, so they can bleed from one test to another.

If you're very unlucky, this might happen and then the next test
is testing a subfolder, which means you end up with a path like
`/forum/topics/timings` which is not caught by pretender and causes the
suite to fail.

It's easier (and faster) to never send these requests in test mode
than to track the ajax requests and abort them between runs.
2020-08-12 12:27:17 -04:00
Vinoth Kannan
fc5111508f FIX: allow mods to choose restricted categories as parent category.
Currently moderators can't choose a category with only “See” permission as a parent in `edit-category` modal.
2020-08-12 20:58:52 +05:30
Mark VanLandingham
00a0767c35
DEV: Remove directory-toggle component (#10413) 2020-08-12 08:11:32 -05:00
Guo Xiang Tan
808e84a856
FIX: Expose PG headline highlighting for all search results. 2020-08-12 16:43:47 +08:00
jbrw
6391db5921
FIX: use correct site setting when uploading images 2020-08-11 18:13:55 -04:00
Joe
1c941a19d7 DEV: removes the Vincent theme from the "popular theme" list
This theme is currently not maintained so it shouldn't be on that list
2020-08-12 03:11:05 +08:00
Vinoth Kannan
f3154e783f UX: preload muted categories list to prevent rendering delay. 2020-08-12 00:34:40 +05:30
Kris
1972364d0f
REFACTOR: Update the notification menu to remove scrolling (#10371) 2020-08-10 16:17:15 -04:00
Mark VanLandingham
b7a092bd28
FEATURE: Group category permissions tab (#10388) 2020-08-10 09:49:05 -05:00
Robin Ward
232d277833 REVERT: Resetting the filters is causing double transitions 2020-08-07 16:41:41 -04:00
Penar Musaraj
31e9e0c41b
UX: Update header background color in mobile app webview
Sends the updated value when switching color schemes.
2020-08-07 16:13:22 -04:00
Rafael dos Santos Silva
a97e36cfda
FEATURE: Block vibration in Firefox Android (#10389)
Legacy Firefox Android has some quirks around vibration where it:

- asks for permission
- doesn't persist the permission

This makes the default like vibration popup a permission on Firefox
Android <= 68.

This isn't the case (yet?) on their new Firefox which is rolling out
worldwide right now.

I'd say we merge this now and revert in 3 months or so when
https://arewefenixyet.com/ shows a full rollout.
2020-08-07 15:38:53 -03:00
Régis Hanol
bc63232d2e
FIX: sync reviewable count when opening the hamburger menu (#10368)
When a tab is open but left unattended for a while, the red, green, and blue
pills tend to go out of sync.

So whevener we open the notifications menu, we sync up the notification count
(eg. blue and green pills) with the server.

However, the reviewable count (eg. the red pill) is not a notification and
is located in the hamburger menu. This commit adds a new route on the server
side to retrieve the reviewable count for the current user and a ping
(refreshReviewableCount) from the client side to sync the reviewable count
whenever they open the hamburger menu.

REFACTOR: I also refactored the hamburger-menu widget code to prevent repetitive uses
of "this.".

PERF: I improved the performance of the 'notify_reviewable' job by doing only 1 query
to the database to retrieve all the pending reviewables and then tallying based on the
various rights.
2020-08-07 18:13:02 +02:00
Joffrey JAFFEUX
b86198198f
FIX: removes persistedQueryParams as it should work out of the box (#10394)
This hack is only attempting to hide something which should have been working in core and for which we should provide a fix soon. Also it's not working as it should.
2020-08-07 09:51:37 +02:00
Guo Xiang Tan
cf2797bf58
DEV: Fix lint take 2. 2020-08-07 13:17:51 +08:00
Guo Xiang Tan
e2fc05705f
DEV: Fix lint. 2020-08-07 13:16:17 +08:00
Guo Xiang Tan
e60c74d3c1
FEATURE: Use PG ts_headline for highlighting topic title in search. 2020-08-07 12:43:09 +08:00
Guo Xiang Tan
1d2ba8fd52
DEV: No need to highlight search if PG headline generation is used. 2020-08-07 10:50:30 +08:00
Krzysztof Kotlarek
fb9c2e5f89
FEATURE: notification for vote plugin (#10384)
This must exist in core as we want to see a correct notification after disable of the voting plugin.
2020-08-07 09:51:16 +10:00
Blake Erickson
149801f99a FIX: PM participants list refreshing after inviting
When inviting users to a PM a small post is created showing that you
invited the user, but the actual list of participants never updated
until you refreshed the page or interacted with the private-message-map
widget triggering it to refresh. This change will trigger a refresh on
the private-message-map widget ensuring that the UI is updated with the
current list of participants.
2020-08-06 14:57:55 -06:00
Kris
7a1816ce23
DEV: Set application template plugin outlets to tagName="" (#10382) 2020-08-06 16:01:24 -04:00
Robin Ward
f03f58e52c REFACTOR: Remove Discourse constants from cleanDOM 2020-08-06 15:34:20 -04:00
Robin Ward
db443d2289 REFACTOR: Use the session for the ServiceWorkerURL 2020-08-06 15:24:43 -04:00
Robin Ward
036a79d273 REFACTOR: Use isTesting() instead of Discourse.testing 2020-08-06 15:18:25 -04:00
Robin Ward
a80d749b9d REFACTOR: Remove an unnecessary Discourse.__container__ 2020-08-06 15:14:20 -04:00
Robin Ward
7cd11bad0c REFACTOR: Use the session to track assetVersion/requiresRefresh
This saves us having to put the data on `Discourse`
2020-08-06 15:09:13 -04:00
Penar Musaraj
af63871d4d
FIX: Missing bottom border in select-kit color list settings 2020-08-06 14:52:17 -04:00
Robin Ward
7df57b35da REFACTOR: Remove Discourse.__widget_helpers
It's now a variable in the context where the templates are created.
2020-08-06 14:35:46 -04:00
Robin Ward
792bd3faff Remove getURL and getURLWithCDN deprecations, they have been removed 2020-08-06 14:01:31 -04:00
Neil Lalonde
1ca81fbb95
FEATURE: set notification levels when added to a group (#10378)
* FEATURE: set notification levels when added to a group

This feature allows admins and group owners to define default
category and tag tracking levels that will be applied to user
preferences automatically at the time when users are added to the
group. Users are free to change those preferences afterwards.
When removed from a group, the user's notification preferences aren't
changed.
2020-08-06 12:27:27 -04:00
Jarek Radosz
cd4f251891
FEATURE: Poll breakdown 2.0 (#10345)
The poll breakdown modal replaces the grouped pie charts feature.

Includes:

* MODAL: Untangle `onSelectPanel`
Previously modal-tab component would call on click the onSelectPanel callback with itself (modal-tab) as `this` which severely limited its usefulness. Now showModal binds the callback to its controller.

"The PR includes a fix/change to d-modal (b7f6ec6) that hasn't been extracted to a separate PR because it's not currently possible to test a change like this in abstract, i.e. with dynamically created controllers/components in tests. The percentage/count toggle test for the poll breakdown feature is essentially a test for that d-modal modification."
2020-08-06 17:57:06 +02:00
Penar Musaraj
6fdc711b4a
FEATURE: Allow users to opt out of automatic dark mode (#10377) 2020-08-06 09:45:37 -04:00
Sam Saffron
ba482c251c
FIX: stop sync of tracking state when list is filtered
This stops sync of tracking state when list is filtered, in the past this
would cause the tracking state to go off wack.

Additionally this introduces an alias for "filter=tracking", called "f=tracking"

This was done cause the term "filter" is used internally in 2 different ways
the main way is for /unread /new filtering.

Trying to also call a query param "filter" causes enormous amounts of
internal pain, this circumvents the issue.
2020-08-06 16:34:02 +10:00
Robin Ward
09254410ea FIX: Only raise proper "error" messages
Also support "1" for `QUNIT_FAIL_FAST` to make it consistent with other
arguments.
2020-08-05 16:27:06 -04:00
Robin Ward
f1b6b1bd0e FIX: Pretender errors were being swallowed
Lots of test were broken and needed fixes.
2020-08-05 15:48:57 -04:00
Robin Ward
b0564205d9 FIX: Raise errors for broken pretender responses in test mode 2020-08-05 15:48:56 -04:00
Vinoth Kannan
aa017f276f FIX: replace fullPath while rewriting the /my/ URLs.
And added the tests. Follow-up to cdca5a2ee4
2020-08-05 23:22:15 +05:30
jbrw
67e8bc5342
FEATURE - allow category group moderators to split/merge topics (#10351) 2020-08-05 10:33:25 -04:00
Bianca Nenciu
42f62a9e63
FIX: Shows all_results if current settings category has no results (#10358)
Searching for a specific setting only showed results from the current selected category. Before fixing fd02856, it automatically redirected the user to all_results. This was a problem because the redirect always happened and there was no way to share a link to a specific category.

The fix to this bug is to simply redirect the user to all_results if there are no results to be displayed.
2020-08-05 09:39:54 +02:00
Kane York
8850f51fd0
FIX: Show "group members forbidden" message on mobile (#10370)
This commit fixes an oversight in commit 88359b0f16.
2020-08-04 16:16:52 -07:00
Kris
eb619c8e98 prevent long email addresses from breaking admin table layout 2020-08-04 16:47:50 -04:00
tshenry
0cda5b9d55
FEATURE: New plugin outlet for category-heading (#10363) 2020-08-04 12:52:43 -07:00
Vinoth Kannan
cdca5a2ee4 FIX: rewrite of /my/URL should work on sub directory site too. 2020-08-05 00:59:10 +05:30
Joffrey JAFFEUX
4593bb60c5
FIX: allows to change a user group notification level (#10369)
The current code has an ambiguous name of "user" which is actually not a user model, the real user model is accessible on the model key of user.
2020-08-04 21:23:55 +02:00