Commit Graph

40980 Commits

Author SHA1 Message Date
Daniel Waterworth 361875b323
FIX: Kernel.open is deprecated (#12387) 2021-03-12 12:44:31 -06:00
Daniel Waterworth 27386ba714
FIX: Kernel.open is deprecated (#12387) 2021-03-12 12:42:32 -06:00
Roman Rizzi 9a779ca99a
FIX: Show a proper error message when trying to bulk award a disabled badge. (#12384) 2021-03-12 14:28:27 -03:00
Daniel Waterworth e7ac906f21
DEV: Move TemporaryDB class to its own file (#12383)
rake tasks get repeated reloaded during the tests and it causes
redefinition warnings.
2021-03-12 11:27:13 -06:00
Penar Musaraj 52d833472c
DEV: Refactor plugin SCSS compilation (#12359) 2021-03-12 11:17:42 -05:00
Dan Ungureanu 53158c0542
FIX: Show link in invite panel (#12378) 2021-03-12 17:09:05 +02:00
Robin Ward c60cdab1fe
FIX: Invite acceptance tests were broken in Ember CLI (#12367)
* FIX: Invite acceptance tests were broken in Ember CLI

They relied on old Ember behavior where the app does not boot until
`visit` is called and this is no longer true.

This refactors the test to DRY stuff up a bit, and modify the DOM where
necessary in `needs.hooks.beforeEach`.

* Update app/assets/javascripts/discourse/tests/acceptance/invite-accept-test.js

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

Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2021-03-12 09:00:39 -05:00
David Taylor 1533cbb38b
Revert "FIX: deprecation warning - initialization autoloaded the constant (#12347)" (#12381)
This reverts commit 9a5a38a529.

This change was preventing `rake multisite:migrate` from working
2021-03-12 13:48:46 +00:00
Vinoth Kannan c3865659e7
DEV: bump `discourse_dev` gem to version `0.0.4`. (#12363) 2021-03-12 07:19:31 +05:30
Rafael dos Santos Silva 9737ce8c5f
FEATURE: New DiscourseEvent trigger for likes (#12374) 2021-03-11 21:07:29 -03:00
dependabot[bot] 9aa510f609
Build(deps): Bump discourse-fonts from 0.0.7 to 0.0.8 (#12372)
Bumps [discourse-fonts](https://github.com/discourse/discourse-fonts) from 0.0.7 to 0.0.8.
- [Release notes](https://github.com/discourse/discourse-fonts/releases)
- [Commits](https://github.com/discourse/discourse-fonts/compare/v0.0.7...v0.0.8)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-12 00:13:57 +01:00
dependabot[bot] 97c03b8075
Build(deps): Bump nokogiri from 1.11.1 to 1.11.2 (#12370)
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.11.1 to 1.11.2.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.11.1...v1.11.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-12 00:13:46 +01:00
Martin Brennan cf1a80dea6
FIX: Make sure tag-based topic list uses its own preload key (#12354)
When transitioning from a tag topic list e.g. /tag/alerts
to the / route the topic list was not reloaded because the
same preload key was used for both lists (topic_list_latest).
The topic list was only reloaded when clicking on the / route
a second time because then it is forced to reload.

In the topic list adapter, we call `PreloadStore.getAndRemove` to
get the topic lists:

534777f5fd/app/assets/javascripts/discourse/app/adapters/topic-list.js (L34-L41)

Now instead of both / and /tag/alerts sharing the same preload
key of `topic_list_latest`, the tag has a key of `topic_list_tag/alerts/l/latest`
2021-03-12 09:06:21 +10:00
dependabot[bot] be6864e44c
Build(deps): Bump oj from 3.11.2 to 3.11.3 (#12371)
Bumps [oj](https://github.com/ohler55/oj) from 3.11.2 to 3.11.3.
- [Release notes](https://github.com/ohler55/oj/releases)
- [Changelog](https://github.com/ohler55/oj/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/ohler55/oj/compare/v3.11.2...v3.11.3)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-12 00:04:51 +01:00
dependabot[bot] 5086a9df48
Build(deps): Bump discourse-ember-source from 3.12.2.2 to 3.12.2.3 (#12368)
Bumps [discourse-ember-source](https://github.com/discourse/discourse-ember-source) from 3.12.2.2 to 3.12.2.3.
- [Release notes](https://github.com/discourse/discourse-ember-source/releases)
- [Commits](https://github.com/discourse/discourse-ember-source/commits/v3.12.2.3)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-11 23:53:25 +01:00
Jordan Vidrine f1c1f9e0e7
UX: Add class to body on first unread notification (#12362)
* UX: Add class to body on first unread notification

This commit adds `first-notification` class to the body element when there is a first unread notification. This will fix any issues with certain themes who use custom headers where z-index issues sometimes cause those custom headers to not be hidden by the transparent shadow over the page.
2021-03-11 16:10:40 -06:00
Krzysztof Kotlarek 9a5a38a529
FIX: deprecation warning - initialization autoloaded the constant (#12347)
Get rid of deprecation related to Zeitwerk autoloader.
2021-03-12 08:42:53 +11:00
Neil Lalonde b42ee6e296
DEV: add classes to invite modal fields so they can be targeted (#12366) 2021-03-11 15:56:02 -05:00
Rafael dos Santos Silva 52810713d3
FEATURE: Enable contact picker on new invite modal (#12364) 2021-03-11 17:10:18 -03:00
Robin Ward 7036346965
A couple important Ember CLI fixes (#12345)
* FIX: Error related to sending headers twice

* FIX: Insert correct bootstrap contents in test runner html and boot
2021-03-11 14:40:25 -05:00
Arpit Jalan 3eb769d03b
UX: respect "prioritize username in ux" setting wherever possible (#12357)
This commit ensures that "prioritize username in ux" setting is
respected in following places:

- user directory
- user summary
- badge detail
- group detail
2021-03-11 21:55:14 +05:30
Justin DiRose 1aaf588fb7
DEV: Improvements to vanilla_mysql importer (#12308)
Made some improvements to the Vanilla MySQL script -- mainly because not all SQL imports require use of the VanillaBodyParser. Still left it as an option to turn on and use if so desired. Also added subcategory support, importing of likes, and solve status.
2021-03-11 10:21:56 -06:00
Dan Ungureanu 9c93a62b97
DEV: Update API documentation for invites (#12360) 2021-03-11 18:19:32 +02:00
ByteHamster 36ec09a07b
FIX: Do not block `uploads` path in robots.txt (#12349)
The `/u` rule also matches the `/uploads` path, which prevents Twitter from showing the site logo in its link previews.
2021-03-11 09:36:49 -05:00
Roman Rizzi 56262349a9
FIX: When destroying a topic, destroy its associated published page. (#12358)
Destroying a topic should remove the associated published page so another topic could re-use the slug.
2021-03-11 11:34:54 -03:00
Roman Rizzi 8fcad73b36
FEATURE: Admins can flag posts so they can review them later. (#12311)
Staff can send a post to the review queue by clicking the "Flag Post" button next to "Take Action...". Clicking it flags the post using the "Notify moderators" score type and hides it. A custom message will be sent to the user.
2021-03-11 08:21:24 -03:00
David Taylor 0902e56162
FEATURE: Flag to disable DiscourseConnect CSRF protection (#12356)
This is not recommended. But if you have other protections in place for CSRF mitigation, you may wish to disable Discourse's implementation. This site setting is not visible in the UI, and must be changed via the console.
2021-03-11 10:38:34 +00:00
Martin Brennan 593edc43c5
FEATURE: Add tag-custom-settings plugin outlet (#12355)
So plugin developers can add extra settings to the tag UI.
2021-03-11 16:45:35 +10:00
Alan Guo Xiang Tan 839caa274a DEV: Drop `show_filter_by_tag` site settings.
Follow-up to 83519e7f3a
2021-03-11 10:48:18 +08:00
Penar Musaraj 0cd4da51c7
FIX: Include `json_schemer` in prod (#12351) 2021-03-10 21:32:23 -05:00
Kris 83519e7f3a
FEATURE: Always show tag dropdown when tagging is enabled (#12209) 2021-03-10 21:13:15 -05:00
Martin Brennan b81bb2f93b
FIX: Nav items not recomputing on query param change (#12350)
The recalculation of the `forceActive` function for the nav items was being run _before_ the querystring parameters are getting updated. For example for the Unassigned link:

```javascript
i.addNavigationBarItem({
  name: "unassigned",
  customFilter: (category) => {
    return category && category.enable_unassigned_filter;
  },
  customHref: (category) => {
    if (category) {
      return getURL(category.url) + "/l/latest?status=open&assigned=nobody";
    }
  },
  forceActive: (category, args, router) => {
    const queryParams = router.currentRoute.queryParams;

    return (
      queryParams &&
      Object.keys(queryParams).length === 2 &&
      queryParams["assigned"] === "nobody" &&
      queryParams["status"] === "open"
    );
  },
  before: "top",
});
```

When forceActive is hit going from e.g.`http://localhost:3000/c/some-category/5/l/top` to `http://localhost:3000/c/some-category/5/l/latest?assigned=nobody&status=open` the `queryParams` are empty and the URL does not seem to change until after the transition and so `active` ends up being false in this `navigation-item` function which controls whether or not to do the highlight:

```javascript
@discourseComputed("content.filterType", "filterType", "content.active")
active(contentFilterType, filterType, active) {
  if (active !== undefined) {
    return active;
  }
  return contentFilterType === filterType;
},
```

Also sometimes this is not even recalculated, for example going from `http://localhost:3000/c/some-category/5/l/latest?status=open` to `http://localhost:3000/c/some-category/5/l/latest?assigned=nobody&status=open`. This PR fixes the issue where the query parameters changing was not forcing this recalculation. This was especially noticable in conjunction with https://github.com/discourse/discourse-loading-slider.
2021-03-11 11:50:05 +10:00
Penar Musaraj 10780d2448
DEV: support json_schema in theme settings (#12294) 2021-03-10 20:15:04 -05:00
Sam 9fb9a2c098
DEV: freeze time when running rate limiter tests (#12315)
This avoids issues around clock skew making retry-after return 9 instead of
10
2021-03-11 10:47:23 +11:00
Jeff Atwood ec00482027
UX: add bell emoji for better unread education (#12348) 2021-03-11 10:07:53 +11:00
Simon Cossar 1a0cca5539
Update disable mailing list mode setting description (#12346) 2021-03-10 14:32:40 -08:00
Neil Lalonde 3cd26cc9d7
UX: pasting a twitter link into composer title will not set the title (#12332)
The title of Twitter oneboxes is always the name of the Twitter user,
which is not a descriptive topic title. Leave the title field blank so
that users must enter their own title.
2021-03-10 15:49:56 -05:00
jbrw aed97c7bab
FIX: Add amazon sites to force_get_hosts (#12341)
It has been observed that doing a HEAD against an Amazon store URL may result in a 405 error being returned.

Skipping the HEAD request may result in an improved oneboxing experience when requesting these URLs.
2021-03-10 14:42:17 -05:00
Neil Lalonde 5b8941c568
Version bump to v2.7.0.beta5 (#12287) 2021-03-10 13:45:19 -05:00
Robin Ward e429af8220
FIX: QUnit tests could time out based on load order (#12342)
By default our QUnit test runner starts automatically. This is normally
fine but for our `run-qunit.js` script we add a bunch of QUnit events
using `eval` and sometimes those events were added after the tests
already started/finished resulting in a hang.

This adds a new parameter that will cause QUnit not to run
automatically, which the runner uses, then triggers a `start()` when it
knows it's ready.
2021-03-10 13:32:20 -05:00
Penar Musaraj b3bcf2769a
UX: Consistent labels in invite form (#12339) 2021-03-10 12:27:53 -05:00
David Taylor bce837db0c
FIX: Update excerpt after process_post (#12340)
Onebox content may only be resolved during the process_post job. Onebox content could change the content of the excerpt, so we need to make sure the excerpt is updated accordingly.
2021-03-10 17:07:13 +00:00
Penar Musaraj de6474a85f
DEV: Update highlight.js dependency to 10.6.0 (#12303) 2021-03-10 11:35:00 -05:00
Penar Musaraj 4071af1d09
DEV: Refactor font and category background importers (#12312) 2021-03-10 11:05:56 -05:00
David Taylor a52a863fc9
FIX: Ensure the signup boolean is passed when started via _autoLogin (#12338)
The signup boolean was being passed in the third _autoLogin argument, when it should have been the fourth. The third parameter to _autoLogin was optional, which is confusing. This commit cleans things up so both optional arguments are supplied via keywords.

Followup to cbef2ba151
2021-03-10 15:39:14 +00:00
Krzysztof Kotlarek 942e8bac4f
FIX: bump aws-sdk-s3 and aws-sdk-sns (#12333)
The reason to update is that I  want to install aws-sdk-sqs in a plugin and it relies on the newest version of aws-sdk-core

https://github.com/aws/aws-sdk-ruby/blob/version-3/gems/aws-sdk-sqs/aws-sdk-sqs.gemspec#L28
2021-03-10 10:31:27 -05:00
Robin Ward 55007c0621
FIX: Flaky JS tests (#12331)
If you were unlucky and tested a mobile raw template before a desktop
raw template, it would keep using the mobile one resulting in failures.
2021-03-10 08:27:42 -05:00
Bianca Nenciu c0421e4586
FEATURE: Implement bulk operations for PMs (#12286) 2021-03-10 14:49:38 +02:00
Bianca Nenciu 9bd436c20b
FIX: Do not add same email multiple times (#12322)
The user and an admin could create multiple email change requests for
the same user. If any of the requests was validated and it became
primary, the other request could not be deleted anymore.
2021-03-10 14:49:26 +02:00
Bianca Nenciu 92ad2182f5
FIX: Validate user email only once (#12327)
It was validated twice: once by validates_associated and once
by has_many.
2021-03-10 14:49:13 +02:00