Commit Graph

12583 Commits

Author SHA1 Message Date
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