Commit Graph

12712 Commits

Author SHA1 Message Date
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
Robin Ward
92b26ecbfb REFACTOR: Move Page title / focus / counts logic to service
We had a handful of methods attached to the root `Discourse` object
related to focus and notification counts.

This patch pulls them out into a service called `document-title` for
updating the title, and a component called `d-document` to attach
and listen for browser events related to focus.

It also removes some computed properties and observers in favor of plain
old Javascript objects.
2020-08-04 12:02:25 -04:00
Mark VanLandingham
b76731d722
FEATURE: Invite emails to groups from add member modal (#10308) 2020-08-04 10:02:01 -05:00
Sam Saffron
eb18f91cf7
DEV: new api to iterate through tracked topics
`topicTrackingState.forEachTracked(topic,isNew,isUnread)` can be used to
iterate through tracking state efficiently.

This is handy for extension looking at subsets of tags and categories.
2020-08-04 10:40:03 +10:00
Penar Musaraj
52b864facf
FIX: bug with sharing when used outside a topic
Followup to ac76bfb, fixes share buttons in topic lists (only used in themes or plugins)
2020-08-03 16:27:11 -04:00
Penar Musaraj
e6349685d3
UX: Uniform focus styles for composer inputs/textarea (#10296)
Uses a thin border as indicator that element is in focus for all editable items in the composer (inputs, select kit, textarea).

 Disables a default iOS style that has a blinking background color on inputs/textareas
2020-08-03 10:01:04 -04:00
Joffrey JAFFEUX
eb61916e23
UX: allows to navigate widget dropdown with tab and enter (#10356) 2020-08-03 10:37:30 +02:00
Bianca Nenciu
12913a46e4
FIX: Reset max_posts query parameter (#10334) 2020-08-03 11:19:36 +03:00
Penar Musaraj
ac76bfb400
Disable social media sharing on private categories, unlisted topics (#10349)
* Do not show social media sharing on private categories, unlisted topics

* Disable quote sharing entirely in private categories and unlisted topics
2020-08-03 17:06:09 +10:00
Joffrey JAFFEUX
8a9e4504fe
DEV: allows to decouple csv-uploader texts from bulk invite (#10344) 2020-08-01 10:29:09 +02:00
Robin Ward
0b3f963804 FIX: Removes an error in the console in test mode 2020-07-31 14:06:52 -04:00
Vinoth Kannan
6a1746a0c5
FEATURE: add expandable muted categories ui to /categories page. (#10303)
Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2020-07-30 23:32:51 +05:30
Sam Saffron
dc14d156b6
FEATURE: g,j and g,k to navigate to next and prev topic
After visiting a topic list (by tag / category / top level) we track the list

Once a list is tracked the combo `g` `j` can be used to go to the next topic
in the list and `g` `k` to go to previous topic.

This allows you to quickly work through subsets of topics without having
to navigate back to the top level lists

The shortcut does not work in PM lists yet, or search results, both are
under consideration.
2020-07-30 17:54:47 +10:00
Bianca Nenciu
27d853e2ea
FIX: Reset 'filter' query parameter when clicking on a nav-item (#10299)
Usually, this would have been implemented using resetController, but
because we do not use link-to component for linking, that method is not
called.
2020-07-29 15:38:15 +03:00
Bianca Nenciu
fd02856f80
FIX: Keep category name in URL when filtering (#10317) 2020-07-29 14:57:05 +03:00
Sam Saffron
04a3b949a4
FIX: add protection when removing auto delete on post bookmarks
If you reply to a topic and are looking at an admin page (like site settings)
,you have no postStream or posts.
2020-07-29 16:42:39 +10:00
Penar Musaraj
c2d31f5336
DEV: Remove effectively unused disable-no-hover class 2020-07-28 21:44:16 -04:00
Rafael dos Santos Silva
2ea17c06dd
FEATURE: Allow picture HTML element in posts 2020-07-28 20:26:32 -03:00
Rafael dos Santos Silva
c65c3407f8
FIX: Allow playsinline for videos in posts
This is used in webkit browsers mostly.
2020-07-28 19:03:54 -03:00
jbrw
74ab4f3bff
FEATURE - group modetators visual indicator (#10310) 2020-07-28 17:15:04 -04:00
Joffrey JAFFEUX
11faec71ae
FIX: prevents group show serializer to override basic group serializer (#10326) 2020-07-28 18:11:15 +02:00
Robin Ward
4e317e7aca FIX: Computed property deprecation
This `description` field on a theme is returned from the server side and
needn't be calculated in the front end. I tested in the UX and seems to
work well.
2020-07-28 11:55:47 -04:00
Robin Ward
fc63f0d316 FIX: page:changed was sometimes reporting the wrong URL
(This change could be considered a little risky so we should keep an eye
on it.)

The core issue here is that sometimes as far as the router was concerned
we had transitioned to a route even if a Topic model was still in the
process of loading. In this case the callback could not retrieve the
correct title yet because it had not loaded.

This fix returns a promise from `setupController` when visiting a topic,
which will have the router block until the topic is loaded. This means
that the transition never triggers until the topic title is present.

Note: adding a test for this is basically impossible - it was super hard
to reproduce even in a browser.
2020-07-28 11:48:40 -04:00
Robin Ward
c9485692ed FIX: Add back group redirects 2020-07-28 10:59:42 -04:00
Joffrey JAFFEUX
0c7eaa57b2
FEATURE: allows to display charts by day/week/month (#10325) 2020-07-28 16:14:41 +02:00
Kris
7508c55a7b Remove extra whitespace between d-button icon and text 2020-07-27 18:49:57 -04:00
Blake Erickson
070a1d6e1e DEV: Remove duplicate allowedPmUsernames property
This property is already declared in the same file, so this removes the
one that isn't needed.
2020-07-27 16:10:00 -06:00
Jarek Radosz
223b6d17bf DEV: Fix a function name typo 2020-07-27 11:22:57 +02:00
Sam Saffron
de5ef5d895
DEV: add CSS class for composer action
This CSS class can be used to style specific composer actions
2020-07-27 16:51:01 +10:00
Sam Saffron
179335b5e3
DEV: correct performance hack
This code was intended to bypass iterating through tags in absence of a new
or unread topic.

Instead it always fired cause it was checking for function existence which
was clearly always true.
2020-07-27 16:51:01 +10:00
Krzysztof Kotlarek
f2342c2d32
FIX: reserve id for reaction notifications (#10315)
Use id 25 for reaction notifications
2020-07-27 11:39:50 +10:00
Krzysztof Kotlarek
e0d9232259
FIX: use allowlist and blocklist terminology (#10209)
This is a PR of the renaming whitelist to allowlist and blacklist to the blocklist.
2020-07-27 10:23:54 +10:00
Robin Ward
5077cf52fd REFACTOR: Remove Discourse.SiteSettings from upload.js 2020-07-24 13:39:16 -04:00
Robin Ward
bb2460fe66 FIX: Uploads was not testing properly 2020-07-24 09:45:55 -04:00
Robin Ward
808b5aa5ba FIX: Pass siteSettings through in more places 2020-07-24 09:45:55 -04:00
Robin Ward
f8aa304c7d REFACTOR: Remove Discourse.SiteSettings from uploads.js
This involves passing the siteSettings around, which is somewhat error
prone so I tried to be careful.
2020-07-24 09:45:55 -04:00
Robin Ward
8456252c21 Add deprecation for Discourse.SiteSettings in a helper 2020-07-24 09:45:55 -04:00
Robin Ward
c4d5c0c91b REFACTOR: Remove Discourse.SiteSettings from utilities
This involves a little refactoring of how our `defaultHomepage()` works.
It previously would check the meta tag / site settings each time it was
called but now it only checks once on application boot.
2020-07-24 09:45:55 -04:00
Robin Ward
4def5a8339 Remove old redirect rules 2020-07-24 09:45:55 -04:00
Robin Ward
06a3fd0566 This initializer is not used anymore 2020-07-24 09:45:55 -04:00
Robin Ward
bad083b3a3 REFACTOR: Remove Discourse.SiteSettings from clipboardData
Also rename method to `clipboardHelpers` to make searching easier since
`clipboardData` refers to browser functionality.
2020-07-24 09:45:55 -04:00
Robin Ward
0213211068 REFACTOR: Remove Discourse.SiteSettings from text helpers 2020-07-24 09:45:55 -04:00
Robin Ward
98fee7aa50 REFACTOR: Remove Discourse.SiteSettings from highlightSyntax 2020-07-24 09:45:55 -04:00
Robin Ward
656abe22c7 REFACTOR: Remove Discourse.SiteSettings from more lib-like helpers 2020-07-24 09:45:55 -04:00
Martin Brennan
1dd3af20c6
FIX: Do not show Email tab for group settings unless IMAP + SMTP enabled (#10301)
Also hide all the SMTP/IMAP related settings to avoid confusion, as this feature is still not 100% ready to go.
2020-07-24 12:00:36 +10:00
David Taylor
61d3640643
DEV: Improve HTML structure for group-reports-nav-item outlet 2020-07-23 12:44:11 +01:00
Martin Brennan
e027acd367
FIX: Move consts and translations for bookmark auto delete prefs (#10295) 2020-07-23 13:12:28 +10:00
Robin Ward
c1bcb78441 REFACTOR: Allow helpers to access site settings
Since `Discourse.SiteSettings` is removed, helpers can now include and
call `helperContext().siteSettings` to get access to the settings
without using a global variable.
2020-07-22 14:14:38 -04:00
Robin Ward
939fae3500 REFACTOR: Remove Discourse.SiteSettimgs from @setting decorator 2020-07-22 13:27:57 -04:00
Robin Ward
4ecb4439b9 REFACTOR: Remove Discourse.SiteSettings from lightbox.js 2020-07-22 13:27:57 -04:00
Robin Ward
94419d0176 REFACTOR: Remove Discourse.SiteSettings from static route builder 2020-07-22 13:27:57 -04:00
Robin Ward
0bf28e418f REFACTOR: Remove Discourse.SiteSettings from lib:search 2020-07-22 13:27:57 -04:00
Robin Ward
aa2eea7729 REFACTOR: Remove Discourse.SiteSettings from click tracking 2020-07-22 13:27:57 -04:00
Robin Ward
bc7dac852f REFACTOR: Remove Discourse.SiteSettings from Category model 2020-07-22 13:27:57 -04:00
Robin Ward
217b970e16 REFACTOR: Remove Discourse.SiteSettings from desktop notifications 2020-07-22 13:27:57 -04:00
Robin Ward
37f2611d9c REFACTOR: Remove Discourse.SiteSettings from topic bulk actions 2020-07-22 13:27:57 -04:00
David Taylor
5b7c016ebc
FIX: Restore navigation-bar on tag topic list
This was accidentally removed in ac0d5b1d
2020-07-22 18:26:37 +01:00
tshenry
723d7e3a61
FEATURE: Submit post from mobile composer preview (#10286) 2020-07-22 09:17:51 -07:00
Bianca Nenciu
1fc58b5a4e
FEATURE: Add query params to staff action logs (#10279) 2020-07-22 18:25:58 +03:00
Penar Musaraj
09eb087f84
FIX: Remove iOS trick to prevent scrolling when focusing on input
No longer needed, removing it also fixes blinking when tapping the composer textarea
2020-07-22 11:18:01 -04:00
Penar Musaraj
45ae24a1e9
FIX: Apply video preview trick for Safari to stream only 2020-07-22 10:31:08 -04:00
Vinoth Kannan
0884d570b1
FEATURE: add support for top filter in tag page. (#10281)
Currently, tag pages only have the `latest` filter.
2020-07-22 19:26:36 +05:30
Penar Musaraj
6d39452317
UX: Shrink composer consistently when pressing Done in iOS 2020-07-21 23:54:43 -04:00
Martin Brennan
62f2e1f971
FIX: Stop double prepending of window.location.origin on media URLs (#10275)
This fixes an issue where sometimes when composing a post and uploading a video/audio file, _loadCachedShortUrls/the uploads controller would return a full URL with origin, instead of just the URL with the host e.g. http://localhost:3000/some/video.mp4 instead of just //localhost:3000/some/video.mp4. We were prepending window.location.origin onto the URL no matter what, and since http://localhost:3000/some/video.mp4 does not match the host URL regex, we were ending up with something like http://localhost:3000http://localhost:3000/some/video.mp4 which broke composer previews. This was only noticed with a video upload in a secure upload environment.
2020-07-22 09:23:55 +10:00
jbrw
0ed784b4fc
FEATURE: Create logs for Group Moderator changes (#10271) 2020-07-21 14:29:02 -04:00
Robin Ward
fa74f28a51 REFACTOR: Remove Discourse.SiteSettings from initializers 2020-07-21 13:51:28 -04:00
Robin Ward
f5adf6d183 REFACTOR: Remove Discourse.SiteSettings from reply adapter 2020-07-21 13:51:28 -04:00
Robin Ward
9aab81f304 REFACTOR: Remove Discourse.SiteSettings from components 2020-07-21 13:51:28 -04:00
Robin Ward
f83c383177 REFACTOR: Remove Discourse.SiteSettings from some controllers 2020-07-21 13:51:28 -04:00
Robin Ward
17bccbb52f REFACTOR: Remove Discourse.SiteSettings from search-result widget 2020-07-21 13:51:28 -04:00
Robin Ward
ac0d5b1d3f REFACTOR: Remove Discourse.SiteSettings from nav-item 2020-07-21 13:51:28 -04:00
Robin Ward
9dd6367d81 REFACTOR: Remove Discourse.SiteSettings from PostCooked widget 2020-07-21 13:51:28 -04:00
Robin Ward
531793e98f REFACTOR: Remove Discourse.SiteSettings from topic tracking state 2020-07-21 13:51:28 -04:00
Robin Ward
f6c40075e5 REFACTOR: Remove Discourse.SiteSettings from post model 2020-07-21 13:51:28 -04:00
Robin Ward
21ea4d1238 REFACTOR: Remove Discourse.SiteSettings from application controller 2020-07-21 13:51:28 -04:00
Robin Ward
ccb36f81c4 REFACTOR: Remove Discourse.SiteSettings from topic model 2020-07-21 13:51:28 -04:00
Joffrey JAFFEUX
de5245631b
FIX: gives emojis a width/height to prevent lazy loading warning (#10277) 2020-07-21 08:50:56 +02:00
Kris
aa00a6f077 UX: Improve alignment and consistency on full page search 2020-07-21 00:04:07 -04:00
Martin Brennan
41b43a2a25
FEATURE: Add "delete on owner reply" bookmark functionality (#10231)
This adds an option to "delete on owner reply" to bookmarks. If you select this option in the modal, then reply to the topic the bookmark is in, the bookmark will be deleted on reply.

This PR also changes the checkboxes for these additional bookmark options to an Integer column in the DB with a combobox to select the option you want.

The use cases are:

* Sometimes I will bookmark the topics to read it later. In this case we definitely don’t need to keep the bookmark after I replied to it.
* Sometimes I will read the topic in mobile and I will prefer to reply in PC later. Or I may have to do some research before reply. So I will bookmark it for reply later.
2020-07-21 10:00:39 +10:00
Blake Erickson
949c8923a4 DEV: Clean up some extra wording
Remove "Allowed" label because it isn't needed now that we have
relocated the checkbox.

Follow up to: 30af3f24ef
2020-07-20 16:53:10 -06:00
Blake Erickson
30af3f24ef DEV: Relocate enable allowed PMs checkbox
To avoid confusion move the enable allowed PMs checkbox to the same page
that you add your allowed users.

Follow up to: 690f17bcbe
2020-07-20 16:23:42 -06:00
Blake Erickson
690f17bcbe
FEATURE: Allow List for PMs (#10270)
* FEATURE: Allow List for PMs

This feature adds a new user setting that is disabled by default that
allows them to specify a list of users that are allowed to send them
private messages. This way they don't have to maintain a large list of
users they don't want to here from and instead just list the people they
know they do want. Staff will still always be able to send messages to
the user.

* Update PR based on feedback
2020-07-20 15:23:49 -06:00
jbrw
7ab5658462
FEATURE: Allow group moderators to add/remove staff notes (#10252)
* FEATURE: Allow group moderators to add/remove staff notes
2020-07-20 15:53:47 -04:00
Krzysztof Kotlarek
edc6c09500
FIX: correct stream counter when load more posts (#10264)
Small bug in that fix in which we started loading posts in partial:
https://github.com/discourse/discourse/pull/10240

We should add only displayed partial to stream counter to have a correct total number.
2020-07-20 09:52:06 +10:00
Jarek Radosz
de79f19947
Revert "UX: Style video elements, show descriptions (#10040)" (#10258)
This reverts commit 7d289a4f3e.

Now that 36bad0c31f is in and we have video previews on all platforms, the commit that's being reverted is no longer needed. In the worst case scenario, the video description is clipped under the video poster if the video aspect ratio is other than 16:9. This commit removes descriptions and the custom style for the video elements.

# Conflicts:
#	app/assets/javascripts/pretty-text/addon/engines/discourse-markdown-it.js
#	test/javascripts/lib/pretty-text-test.js
2020-07-17 23:31:01 +02:00
Robin Ward
683a1210e3 FIX: Don't use prototype extensions like .observes 2020-07-17 15:23:26 -04:00
Robin Ward
394b5db848 FIX: Tests involving dates were logging warnings 2020-07-17 15:20:45 -04:00
Penar Musaraj
bf22f7080d
FEATURE: optional quote sharing buttons (#10254) 2020-07-17 14:44:31 -04:00
Robin Ward
6e94f28cf0 FIX: Error in test mode with missing topic 2020-07-17 14:37:08 -04:00
Robin Ward
0ecca3a2d2 FIX: tooltip is no longer used
It has been deprecated and now it's time to remove it.
2020-07-17 14:08:45 -04:00
Penar Musaraj
db9162610a
FIX: missing title when inserting hyperlinks 2020-07-17 10:41:58 -04:00
David Taylor
85d1677b26
DEV: Drop unsupported-browser plugin (#10261)
Discourse 2.6 will not have support for older browsers (e.g. IE11)
2020-07-17 15:04:06 +01:00
Martin Brennan
716ccf7fe4
FIX: Bookmark search fixes (#10239)
* Remove unneeded bookmark name index.
* Change bookmark search query to use post_search_data. This allows searching on topic title and post content
* Tweak the style/layout of the bookmark list so the search looks better and the whole page fits better on mobile.
2020-07-17 15:55:07 +10:00
Kris
39fef99c37 FIX: add topic title back to choose-topic 2020-07-16 20:19:33 -04:00
tshenry
15c4f6e4cf
FIX: update meh-o icon to far-meh (#10256) 2020-07-16 16:26:17 -07:00
Robin Ward
b7fe5f04ba FIX: Deprecation usernames is now recipients 2020-07-16 16:11:52 -04:00
Robin Ward
6ba1c64130 FIX: deprecation - usernames is now recipients 2020-07-16 15:42:51 -04:00
Roman Rizzi
f13ec11c64
FEATURE: Add scopes to API keys (#9844)
* Added scopes UI

* Create scopes when creating a new API key

* Show scopes on the API key show route

* Apply scopes on API requests

* Extend scopes from plugins

* Add missing scopes. A mapping can be associated with multiple controller actions

* Only send scopes if the use global key option is disabled. Use the discourse plugin registry to add new scopes

* Add not null validations and index for api_key_id

* Annotate model

* DEV: Move default mappings to ApiKeyScope

* Remove unused attribute and improve UI for existing keys

* Support multiple parameters separated by a comma
2020-07-16 15:51:24 -03:00
Robin Ward
766cb24989 FIX: Overwriting more computed properties 2020-07-16 13:22:13 -04:00
Robin Ward
46e5372c06 FIX: Setting computed properties in tests 2020-07-16 11:57:50 -04:00
Robin Ward
70771e02bb FIX: Removal of i18nPrefix deprecations 2020-07-16 10:41:11 -04:00
Krzysztof Kotlarek
d9475b70c7
FIX: count new and unread respects muted categories (#10131)
* FIX: count new and unread respects muted categories

countCategoryByState function should take categories muted by the user into consideration
2020-07-16 12:24:51 +10:00
Penar Musaraj
a04573c28e
FIX: apply video preview workaround to iOS
Followup to 9e160f5
2020-07-15 19:29:43 -04:00
Krzysztof Kotlarek
9052dfe356
FEATURE: load hidden posts in segments (#10240)
* FEATURE: load hidden posts in segments

Currently, when "View hidden replies" button is clicked, all replies are loaded like there is no tomorrow. When there is plenty of hidden replies, it may cause a timeout.

Therefore, we should load them in pages and display the view link as long as we have more hidden replies.
2020-07-16 09:05:11 +10:00
Penar Musaraj
34bbd51350
FIX: regression in secure URL generation, followup to 36bad0c 2020-07-15 18:52:59 -04:00
Penar Musaraj
36bad0c31f
FIX: Preload metadata for audio/video when secure media enabled
Fixes an issue with missing video previews. Should have no side effects now that presigned URLs expire after 5 minutes.
2020-07-15 18:36:51 -04:00
Penar Musaraj
9e160f58ab
FIX: Trick Safari into loading video previews (#10244) 2020-07-15 18:14:14 -04:00
Robin Ward
24b3996f45 FIX: Don't overwrite maxlength computed property
We can use a `text-field` instead.
2020-07-15 16:05:37 -04:00
Robin Ward
6fac4a36b4 FIX: loaded is a CP and can't be overwritten 2020-07-15 15:53:59 -04:00
Robin Ward
04881b10db FIX: Error with currentCategory 2020-07-15 13:34:09 -04:00
Robin Ward
72c5a389eb FIX: filterPlaceholder is a computed property
These cannot be overridden.
2020-07-15 13:32:27 -04:00
Robin Ward
16766a5d62 FIX: topic.details is not a plain JS Object 2020-07-15 13:10:05 -04:00
Robin Ward
a37a19b55c REFACTOR: Remove less effective method of injecting siteSettings 2020-07-15 11:48:55 -04:00
Robin Ward
ca13160435 REFACTOR: Remove Discourse.SiteSettings from user/admin-user 2020-07-15 11:48:55 -04:00
Mark VanLandingham
a1507b2316
REFACTOR: Invite modal panels init, actions, and styling (#10242)
* Import @action rather than using actions: {}
* Set default values in functions outside of init, so the functions can be modified by modifyClass (plugin api).
* Move padding from .choices div to the input in group selector.
2020-07-15 09:18:31 -05:00
David Taylor
7d300006a1
Revert "PERF: Move highlightjs to a background worker, and add result cache (#10191)"
This caused a CORS error when used with S3 asset storage

This reverts commit d09f283e91.
2020-07-15 13:52:35 +01:00
David Taylor
c802c7367a
FIX: Allow highlightjs-worker to be compiled successfully 2020-07-15 13:17:52 +01:00
David Taylor
d09f283e91
PERF: Move highlightjs to a background worker, and add result cache (#10191)
Syntax highlighting is a CPU-intensive process which we run a lot while rendering posts and while using the composer preview. Moving it to a background worker releases the main thread to the browser, which makes the UX much smoother.
2020-07-15 12:48:07 +01:00
Vinoth Kannan
0058a15266 FIX: prevent redirect when image scale btn is inside a link.
Currently in composer preview, if the image scale buttons are inside a `<a>` link then it redirects to the `href` location after the image scaling task.
2020-07-15 09:34:54 +05:30
Sam Saffron
97f581e1df
FIX: add protection just in case topic is not set
Under some conditions we may be loading the composer with no topic set.
This code could fail leading to a broken composer.
2020-07-15 11:38:46 +10:00
Martin Brennan
af7ce5d6eb
Revert "DEV: Add debug hint in discourse-markdown-it"
This reverts commit 5a4855b992.
2020-07-15 11:23:28 +10:00
Martin Brennan
5a4855b992
DEV: Add debug hint in discourse-markdown-it
This console.debug message ONLY shows if isDevelopment() is
true for the environment
2020-07-15 11:18:41 +10:00
Mark VanLandingham
332cb5cdb1
DEV: 2 plugin outlets for group views (#10233) 2020-07-14 15:32:07 -05:00
Rafael dos Santos Silva
72534223f3 FEATURE: Allow video tag attributes for video gifs 2020-07-14 13:46:45 -03:00
jbrw
06073fe8c6
FEATURE: Allow group moderators to close/archive topics
* FEATURE: Allow group moderators to close/archive topics
2020-07-14 12:36:19 -04:00
Faizaan Gagan
9917b9cb21
added 'addFeaturedLinkMetaDecorator' method to the plugin api (#10232)
* added 'addFeaturedLinkMetaDecorator' method to the plugin api

* fixed formatting

* Fixed quotes around import
2020-07-14 10:40:40 -04:00
Martin Brennan
bcc80e0ea8
FEATURE: Add search to user bookmark list (#10230)
User bookmarks can now be searched by name or post raw content. The q querystring param is hooked up from the Ember router as well.
2020-07-14 14:43:41 +10:00
Martin Brennan
f4f3e8c401
FIX: Various improvements to bookmark modal UI (#10225)
* Do not autofocus name input on mobile
* Improve code for formatted reminder type times to not be computed, so the modal times update correctly
* Change wording of "Next Monday" to "Monday" for all days except when today is Monday
2020-07-14 14:02:13 +10:00
Guo Xiang Tan
ce39733b1a
FIX: Incorrect search blurb when advanced search filters are used take2
Also remove include_blurbs attribute which isn't used.
2020-07-14 11:50:40 +08:00
Penar Musaraj
c02e358146
FIX: Remove social sharing icons from private contexts (#10213) 2020-07-13 14:35:39 -04:00
Dan Ungureanu
cf02c518b9
DEV: Merge category and tag hashtags code paths (#10216)
Category and tag hashtags used to be handled differently even though
most of the code was very similar. This design was the root cause of
multiple issues related to hashtags.

This commit reduces the number of requests (just one and debounced
better), removes the use of CSS classes which marked resolved hashtags,
simplifies a lot of the code as there is a single source of truth and
previous race condition fixes are now useless.

It also includes a very minor security fix which let unauthorized users
to guess hidden tags.
2020-07-13 19:13:17 +03:00
Bianca Nenciu
6c6c56613d FIX: Check if last poster exists before using it
There was a problem when admins viewed topics where the last poster was
deleted.
2020-07-13 18:55:14 +03:00
Arpit Jalan
7532f24668 UX: better error message if moderator is not allowed to invite to group
UX: do not show invite to group option if mod is not owner of any group
2020-07-13 18:09:36 +05:30
Arpit Jalan
ba57dc57cc DEV: use group_ids instead of group_names in invite params 2020-07-13 17:37:04 +05:30
Jarek Radosz
eb73048b0f
DEV: Allow displaying both title and panels in modals (#10220) 2020-07-13 12:43:06 +02:00
Krzysztof Kotlarek
180494185c
FIX: last visit bar regression (#10224)
Last visit regression bar is missing because of that change https://github.com/discourse/discourse/commit/9b7000dbf10

Order property was changed from "default" to null and it was picked by guard condition
2020-07-13 10:42:05 +10:00
Jarek Radosz
942cc9b57a
DEV: Add rawTitle property support to modal-tab (#10221)
```js
const panels = [
  { id: "test1", rawTitle: "Test 1" },
  { id: "test2", rawTitle: "Test 2" }
];

showModal("a-modal", { panels }));
```
2020-07-13 01:26:45 +02:00
Bianca Nenciu
275b748016
FIX: Replace links to removed uploads from reviewables with a placeholder (#10180) 2020-07-10 17:57:06 +03:00
David Taylor
4b0d86d8d3
FIX: Do not display enabled inputs when username/name are locked 2020-07-10 10:49:32 +01:00
Dan Ungureanu
c72bc27888
FEATURE: Implement support for IMAP and SMTP email protocols. (#8301)
Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2020-07-10 12:05:55 +03:00
Martin Brennan
56f42d89c5
FIX: Post menu bookmark icon and attributes not refreshing on notification click (#10214)
When creating a bookmark reminder that deletes the bookmark on reminder, if the user clicked on the notification and got taken to the post in the topic the bookmark icon still showed as blue with the reminder clock indicator. This was because the response JSON for reloading a topic post was not including the bookmark attributes, not even the bookmarked boolean.

We now return the correct attributes in the serializer, and if bookmarked is false we clear all the bookmark related attributes on the post for the notification to make sure nothing of the old bookmark remains in the UI.

This was only a problem if the user did not refresh the app completely inbetween setting the reminder and receiving the notification.
2020-07-10 14:35:53 +10:00
Kris
706f1a6294
DEV: Remove text-ellipsis component and use CSS line-clamp instead (#10196) 2020-07-09 20:51:43 -04:00
Mark VanLandingham
bfde665e76
DEV: Classes and plugin-outlet in admin user-list nav (#10204) 2020-07-09 15:10:25 -05:00
Mark VanLandingham
52f8eecbb9
FIX: Incorrect fix for invites breaking when no group is selected (#10202) 2020-07-09 11:58:29 -05:00
Mark VanLandingham
9d74cf6a63
FIX: Invites when no group is selected (#10201) 2020-07-09 11:41:17 -05:00
Jarek Radosz
32ee9fae40
FIX: Short URL resolution in cook-text (#10200)
Regressed in 3b51e05de2. Thanks to @romanrizzi for reporting!
2020-07-09 14:39:13 +02:00
Penar Musaraj
bd511c004c
UX: Fix missing icon when merging selected posts 2020-07-08 13:57:05 -04:00
Mark VanLandingham
90512d723c
UX: Use group-chooser in invite modal (#10186) 2020-07-08 12:02:26 -05:00
Robin Ward
f3ff9d5625 FIX: getURL deprecation 2020-07-08 11:40:53 -04:00
marielaSAG
e45307a105
DEV: Added before-create-topic-button plugin-outlet (#10109) 2020-07-08 18:21:30 +10:00
Mark VanLandingham
a9292086f4
DEV: Add classes to quick-access-profile items (#10185) 2020-07-08 17:30:12 +10:00
Martin Brennan
6be7a66ba7
FIX: Cap bookmark name at 100 chars and truncate existing names (#10189)
We have a couple of examples of enormous amounts of text being entered in the name column of bookmarks. This is not desirable...it is just meant to be a short note / reminder of why you bookmarked this.

This PR caps the column at 100 characters and truncates existing names in the database to 100 characters.
2020-07-08 17:19:01 +10:00
Mark VanLandingham
81fe8a50d4
DEV: Plugin API function to add items to quick access profile (#10182) 2020-07-07 13:53:40 -05:00
Kris
66257ca8b6 FEATURE: Add "smallest" option to user text size preferences 2020-07-07 13:08:19 -04:00
Mark VanLandingham
d2e320d4f7
FIX: Bookmarks shortcut goes to new bookmarks with reminders (#10181) 2020-07-07 11:12:41 -05:00
Bianca Nenciu
4a90464619
FIX: Do not highlight large code blocks (#10125) 2020-07-07 18:51:19 +03:00
Bianca Nenciu
6705c45156
FEATURE: Add reply_as_new_group_message composer action (#10168) 2020-07-07 18:30:48 +03:00
jjaffeux
f92116d695 Revert "DEV: flexify post actions (#9926)"
This reverts commit 6ef0e98f4e.
2020-07-07 12:42:49 +02:00
Joffrey JAFFEUX
56475f57c5
UX: simplifies editing email templates by always having a default (#10179) 2020-07-07 11:44:13 +02:00
Joffrey JAFFEUX
9b7000dbf1
FIX: ensures category order keeps consistent (#10165)
Before this change:
- first full page load would get category defaults defined un cateory settings
- a navigation to a topic and then back to categories list would reset defaut to the ones defined in discovery/topics
2020-07-07 09:56:38 +02:00
Martin Brennan
280cd99c62
DEV: Add extra appEvents to composer workflow
* add composer:saved, composer:created-post, and composer:edited-post
  appEvents inside the composer controller, to make it easier to detect
  these events in plugins
2020-07-07 14:13:45 +10:00
Dan Ungureanu
556f7dc9c0
FIX: Fix race condition when resolving tag and category hashtags (#10153)
* FIX: Fix race condition when resolving tag and category hashtags

If the category hashtags were resolved first and then tag hashtags, then
the tags would overwrite the categories. Similarly, if the category
hashtags were resolved last it would overwrite even hashtags which ended
with '::tag'.

* DEV: Add test

* DEV: Fix test
2020-07-07 10:20:51 +10:00
Bianca Nenciu
b9e3db6387
UX: Add link to user email preferences in admin view (#10169) 2020-07-07 10:20:14 +10:00
Joffrey JAFFEUX
6ef0e98f4e
DEV: flexify post actions (#9926)
* DEV: flexify post actions

* more tweaks
2020-07-07 10:18:01 +10:00
Kris
4f12768d10 UX: Remove extra space added by img resize controls in composer preview 2020-07-06 19:11:58 -04:00