Commit Graph

38803 Commits

Author SHA1 Message Date
Neil Lalonde
d65a839577
FEATURE: allow group membership to unmute categories and tags
For sites that are configured to mute some or all categories and tags
for users by default, groups can now be configured to set members'
notification level to normal from the group manage UI.
2020-08-13 17:20:53 -04:00
Kris
18fb34bf2e formatting follow-up to 32102dd 2020-08-13 17:01:22 -04:00
Kris
32102ddff3 UX: Use the same formatting for both user and group card bios 2020-08-13 16:55:30 -04:00
Mark VanLandingham
b9891e3def
FIX: Update preview when autocomplete is clicked (#10430) 2020-08-13 15:42:38 -05:00
Jarek Radosz
d0d651d8bc
FIX: Prevent LockOn conflicts (#10422)
If there's already a `LockOn` instance, clear its lock before creating creating a new one. Fixes a shaky viewport effect after certain transitions.

Includes:
* Slight refactor (elementId wasn't an id, but a selector - it included the "#" prefix)
* Add support for a[name=X] anchors in `jumpToPost`
* Scope down anchors to the #main element (Embeded fontawesome sprites are causing conflicts, e.g. when given `bed` anchor, `<a name="bed">` was at odds with `<symbol id="bed" viewBox="0 0 640 512">(…)</symbol>`)
2020-08-13 19:39:40 +02:00
Robin Ward
ba3ee3444e
FIX: Move queryParams to each discovery controller rather than shared (#10424)
* REFACTOR: `refreshSort` doesn't cause it to sort again, it's misleading

* FIX: Move queryParams to each discovery controller rather than shared

This fixes issues where params previously would not reset between
routes. For example if you added `max_posts=1` to /latest and then went
to a category.

* Add backward compatibility for (action "changeSort") for themes

* FIX: refreshing was not working

* Update app/assets/javascripts/discourse/app/controllers/discovery/topics.js

Co-authored-by: Jarek Radosz <jradosz@gmail.com>

Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2020-08-13 11:33:46 -04:00
Jarek Radosz
ab5df7b2bd
FIX: Preserve anchors in permalink transitions (#10421)
When visiting a permalink with an anchor (e.g. /important-link#notes) the anchor part was being dropped during redirection.

The change doesn't have a test. Functions like scrollToPost or scrollToElement don't have any effect in the test environment.
2020-08-13 16:44:34 +02:00
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
Krzysztof Kotlarek
7194b31443
FEATURE: don't notify about changed tags for a private message (#10408)
* FEATURE: don't notify about changed tags for a private message

Only staff members observing specific tag should receive a notification

* FIX: remove other category which is not used

* FIX: improved specs to ensure that revise was succesful
2020-08-13 17:22:34 +10:00
Vinoth Kannan
310952fd6a FIX: generate topic excerpt when moving posts to new topic.
Currently, it's not generating the excerpt by default. We have to trigger the "Rebuild HTML" action to do it.
2020-08-13 11:30:14 +05:30
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
Martin Brennan
ffb31b8d2b
FIX: Do not require tagging to be enabled for IMAP archive and delete (#10426)
Previously we did an early return if either SiteSetting.tagging_enabled or SiteSetting.allow_staff_to_tag_pms was false when updating the email on the IMAP server -- however this also stopped us from archiving or deleting emails if either of these were disabled.
2020-08-13 14:04:40 +10:00
Sam Saffron
5be26c7d24
DEV: add error handling in case download fails 2020-08-13 13:48:23 +10:00
Jeff Wong
787ad7d84d FIX: allow plugin pinning to fetch missing commits
Add update for fetching git commits if they do not exist, eg with
clone --depth 1 - only can fetch via git fetch --depth 1 {remote} {ref}
the ref needs to be a full, non-ambiguous reference.
2020-08-12 20:03:37 -07:00
Sam Saffron
5011435ec7
DEV: do not correct sha when correctly uploads 2020-08-13 11:52:57 +10:00
Sam Saffron
f48fa30ecd
DEV: fix_missing_s3 attempts to re-download if missing
unverified uploads get re-downloaded and corrected if they exist in the task
2020-08-13 11:22:14 +10:00
David Taylor
bd0a7553c4
DEV: Detect when s3 inventory failure is caused by etag difference (#10427) 2020-08-13 09:30:28 +10:00
David Taylor
451b9b245f
DEV: Rename new upload rake tasks
These tasks are s3-specific, so update the names to make that very clear
2020-08-12 23:26:13 +01:00
Penar Musaraj
ced8cdad24
DEV: Order links by domain and url in spec 2020-08-12 17:46:12 -04:00
Kris
9bc992dce4 follow-ups to 1972364: increase notification limit, make show-all a link 2020-08-12 17:14:48 -04:00
Michael Brown
c25dc43f54 FIX: AWS S3 errors don't necessarily include a message
* If the error doesn't have a message, the class name will help
* example:
  before: "Failed to download #{filename} because "
  after: "Failed to download #{filename} because Aws::S3::Errors::NotFound"
2020-08-12 17:00:09 -04:00
Kris
95a454abb6 specificity fix to d1c570c 2020-08-12 16:03:08 -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
Blake Erickson
c68563a281 DEV: Improve API usage when creating * updating categories
The category model already has a default value for `color` and
`text_color` so they don't need to be required via the API. The ember UI
already requires that colors be selected.

The name of the category also doesn't need to be required when updating
the category either because we are already passing in the id for the
category we want to change.

These changes improve the api experience because you no longer have to
lookup the category name, color, or text color before updating a single
category attribute. When creating a category the name is still required.

https://meta.discourse.org/t/-/132424/2
2020-08-12 12:28:29 -06:00
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
Rafael dos Santos Silva
28669dfeb2
PERF: Faster TL3 promotion replies needed calculation (#10416)
Removing the LIMIT makes PostgreSQL use index_posts_on_user_id_and_created_at
which is much faster overall.

Before: 22 seconds
After: 100 ms
2020-08-12 11:28:34 -03:00
Mark VanLandingham
00a0767c35
DEV: Remove directory-toggle component (#10413) 2020-08-12 08:11:32 -05:00
Penar Musaraj
6dd9f2eca2
FIX: color scheme selection with non-default theme
This fixes an issue where a non-default theme set to use the base color
scheme (i.e. the theme had an empty `color_scheme_id`) was loading the
default theme's color scheme instead.
2020-08-12 08:49:13 -04:00
dependabot-preview[bot]
eb7320f52c Build(deps): Bump bootsnap from 1.4.7 to 1.4.8
Bumps [bootsnap](https://github.com/Shopify/bootsnap) from 1.4.7 to 1.4.8.
- [Release notes](https://github.com/Shopify/bootsnap/releases)
- [Changelog](https://github.com/Shopify/bootsnap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Shopify/bootsnap/compare/v1.4.7...v1.4.8)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-12 18:03:58 +08:00
Guo Xiang Tan
808e84a856
FIX: Expose PG headline highlighting for all search results. 2020-08-12 16:43:47 +08:00
Guo Xiang Tan
603a4d1794
DEV: Fix randomly failing spec. 2020-08-12 16:34:56 +08:00
Guo Xiang Tan
6792d7f50c
Fix the build.
Follow-up to 93f8396b4b.
2020-08-12 15:55:22 +08:00
Guo Xiang Tan
93f8396b4b
FIX: Limit PG headline based search blurb generation to 200 characters.
* Recovers omission characters '...' in blurb as well.
2020-08-12 15:34:27 +08:00
Sam Saffron
ec173a72d9
DEV: add more counts to analyze missing 2020-08-12 17:28:58 +10:00
Krzysztof Kotlarek
1f7f8ee72c
FIX: try to make topic_tracking_state_spec stable (#10419)
Sometime parallel spec if failing with error:
```
NoMethodError:
       undefined method `data' for nil:NilClass
     # ./spec/models/topic_tracking_state_spec.rb:339:in `block (4 levels) in <main>'
```

I have a theory that it might be related to instance variables in before block
2020-08-12 15:56:06 +10:00
Sam Saffron
97fe68e980
DEV: look for avatars when analyzing missing uploads 2020-08-12 14:04:21 +10:00
Sam Saffron
990cd8c2e4
FEATURE: introduce tasks for dealing with legacy broken uploads
`rake uploads:analyze_missing` can be used get rich information regarding
uploads missing from s3 (where verified is false)

`rake uploads:fix_missing` is a work in progress task for automatically
correcting certain historic issues. At the moment it simply rebakes all
posts with missing uploads, but it will improve over time
2020-08-12 13:33:04 +10:00
Martin Brennan
e059677bf7
Reveal IMAP site settings 2020-08-12 13:08:41 +10:00
Penar Musaraj
8633e3cae8
FIX: iOS/iPadOS freezing when changing notification level in topic footer 2020-08-11 22:39:17 -04:00
Kris
d1c570cf2c Hamburger menu needs to be able to scroll, follow-up to 1972364 2020-08-11 22:33:51 -04:00
Martin Brennan
95b71b35d6
FEATURE: IMAP delete email sync for group inboxes (#10392)
Adds functionality to reflect topic delete in Discourse to IMAP inbox (Gmail only for now) and reflecting Gmail deletes in Discourse.

Adding lots of tests, various refactors and code improvements.

When Discourse topic is destroyed in PostDestroyer mark the topic incoming email as imap_sync: true, and do the opposite when post is recovered.
2020-08-12 10:16:26 +10:00
jbrw
6391db5921
FIX: use correct site setting when uploading images 2020-08-11 18:13:55 -04:00
Penar Musaraj
c05aced094
FIX: Invalidate cache when updating color scheme colors (#10417) 2020-08-11 16:28:59 -04:00
naineet
7e79d339eb Update README.md 2020-08-11 16:01:35 -04:00
naineet
bb9d653831 Added BrowserStack Logo to Readme
Hi,

Thanks for signing up for our open source program! We hope you’ve found it valuable. 

Open source projects like yours power the world of tech, and we’re honored to be helping you. We’ve benefitted from hundreds of open source projects, and now's our time to give back.

I have added BrowserStack Logo under “Testing powered by” heading to the Readme

This helps us reach more open source developers like you, ones who can use BrowserStack’s infrastructure for free and build great products.

Naineet Patel
BrowserStack DevRel
2020-08-11 16:01:35 -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