Commit Graph

41592 Commits

Author SHA1 Message Date
b21f74060e FIX: Layout of date input in poll builder (#13057) 2021-05-13 10:27:03 -04:00
f05f5fde0f PERF: Preload JsLocaleHelper.load_translations for default locale. (#13041)
In production, each Unicorn child process will currently hold the
default locale in memory on first load. Instead, we should preload it in
the Unicorn master process so that the memory is immediately shared when
forking.

Also, the translations are only memoized on first load now and is
adding considerable overhead to the first few requests after a fresh
boot.
2021-05-13 16:16:01 +10:00
034a0493e3 FIX: Delete unconfirmed emails first if available (#13046)
Users can end up with the same email both as secondary and unconfirmed.
When they tried to delete the unconfirmed ones, the secondary one was
deleted.
2021-05-13 16:14:00 +10:00
b690e7787e FIX: Missing iframe closing tag in discobot certificate (#13052)
When issuing the discobot certificate, we were not closing the
iframe tag, which meant that the final message instruction to
the user was swallowed up.
2021-05-13 15:51:12 +10:00
3d2cace94f DEV: Add service to validate email settings (#13021)
We have a few places in the code where we need to validate various email related settings, and will have another soon with the improved group email settings UI. This PR introduces a class which can validate POP3, IMAP, and SMTP credentials and also provide a friendly error message for issues if they must be presented to an end user.

This PR does not change any existing code to use the new service. I have added a TODO to change POP3 validation and the email test rake task to use the new validator post-release.
2021-05-13 15:11:23 +10:00
bbb4469811 Build(deps-dev): Bump test-prof from 1.0.3 to 1.0.4 (#13051)
Bumps [test-prof](https://github.com/test-prof/test-prof) from 1.0.3 to 1.0.4.
- [Release notes](https://github.com/test-prof/test-prof/releases)
- [Changelog](https://github.com/test-prof/test-prof/blob/master/CHANGELOG.md)
- [Commits](https://github.com/test-prof/test-prof/compare/v1.0.3...v1.0.4)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-13 01:04:30 +02:00
20b03b30ad Build(deps): Bump docile from 1.3.5 to 1.4.0 (#13050)
Bumps [docile](https://github.com/ms-ati/docile) from 1.3.5 to 1.4.0.
- [Release notes](https://github.com/ms-ati/docile/releases)
- [Changelog](https://github.com/ms-ati/docile/blob/main/HISTORY.md)
- [Commits](https://github.com/ms-ati/docile/compare/v1.3.5...v1.4.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-13 01:03:57 +02:00
582ec198d8 DEV: Update ember-cli across all in-repo addons (#13048)
…to match the version used in the app.
2021-05-12 21:49:55 +02:00
3d7abad949 FIX: We should include resumable.js in the admin bundle (#13049)
Normally we'd use `ember-auto-import` for this, but it's not run on
our admin tree due to the quirky way we load it conditionally.
Instead we'll append it at the bottom like our Rails app does.
2021-05-12 13:44:24 -04:00
2cf063dc7e DEV: Update lodash from 4.17.15 to 4.17.21 (#13045)
We're dropping lodash from core after the next release, but until then let's keep it up to date.
2021-05-12 18:07:23 +02:00
f08f6118f2 FIX: Make truth-helpers work in Ember CLI (#13044)
The addon wasn't included at all 😃
2021-05-12 17:52:36 +02:00
b24270845f DEV: Update chart.js from 2.9.3 to 2.9.4 (#13026)
Release notes: https://github.com/chartjs/Chart.js/releases/tag/v2.9.4
2021-05-12 17:28:16 +02:00
e8d0c122e3 added a plugin outlet for above the discovery list controls (#13042) 2021-05-12 11:21:32 -04:00
b0d66b4b2f FIX: Support pausing inline animated images (#13033) 2021-05-12 09:49:04 -04:00
f9bb6399e0 DEV: Remove SCSS color vars fallbacks (#13035)
They are no longer needed.
2021-05-12 08:56:15 -04:00
4f07e9d017 Update handlebars from 4.7.6 to 4.7.7 (#13027)
Release notes: https://github.com/handlebars-lang/handlebars.js/blob/master/release-notes.md#v477---february-15th-2021
2021-05-12 13:03:17 +02:00
60be1556fc FIX: Various invite system fixes (#13003)
* FIX: Ensure the same email cannot be invited twice

When creating a new invite with a duplicated email, the old invite will
be updated and returned. When updating an invite with a duplicated email
address, an error will be returned.

* FIX: not Ember helper does not exist

* FIX: Sync can_invite_to_forum? and can_invite_to?

The two methods should perform the same basic set of checks, such as
check must_approve_users site setting.

Ideally, one of the methods would call the other one or be merged and
that will happen in the future.

* FIX: Show invite to group if user is group owner
2021-05-12 13:06:39 +03:00
b65af1193d DEV: Print a warning and restart server when editing non-autoloaded files (#13037)
This commit adds a listener on (almost) all `.rb` files in the repository. When a change occurs, it checks whether Zeitwerk is responsible for autoloading it. If not, a warning will be printed to the console and the server will be automatically restarted. Optionally, you can pass the `AUTO_RESTART=0` environment variable to prevent auto-restart.
2021-05-12 10:32:45 +01:00
d8b19432a7 DEV: Remove tool-versions used by asdf package manager.
Reverts ce17eb9ee622bb84e4be8c3e5bc9ad0e94ff76c9

We really shouldn't be adding a development configuration file for asdf
into the repo. Not everyone uses asdf for package management and for
those that do, this prevents them from using other versions of Ruby and
Nodejs in their development enviornment.
2021-05-12 14:18:13 +08:00
4da86210f8 Build(deps): Bump puma from 5.3.0 to 5.3.1 (#13038)
Bumps [puma](https://github.com/puma/puma) from 5.3.0 to 5.3.1.
- [Release notes](https://github.com/puma/puma/releases)
- [Changelog](https://github.com/puma/puma/blob/master/History.md)
- [Commits](https://github.com/puma/puma/compare/v5.3.0...v5.3.1)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-12 02:03:16 +02:00
63ca9e0650 DEV: Add cleanup methods for composer extension hooks that tests can use (#13034) 2021-05-11 17:29:24 -03:00
21c301aa72 Update translations (#13030) 2021-05-11 19:01:59 +02:00
2f60309b13 FEATURE: New API hook to allow for client side upload transforms (#12990) 2021-05-11 12:20:28 -03:00
033a1fb2af DEV: Minor changes to /theme-qunit landing page (#13032) 2021-05-11 10:45:07 -04:00
cf6b823a2d DEV: Load plugins in theme tests (#13028)
Some themes/components depend on plugins, and it would be impossible to write tests for those themes without installing/loading the plugins they depend on.
2021-05-11 17:38:50 +03:00
e8f6e00dc9 DEV: Show warning in admin UI for core SCSS color vars (#12984)
Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2021-05-11 09:01:06 -04:00
06f47684f2 Build(deps): Bump ini from 1.3.5 to 1.3.8 (#13029)
Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.8)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-11 12:11:36 +02:00
533ed03b47 Build(deps): Bump y18n from 4.0.0 to 4.0.3 (#13024)
Bumps [y18n](https://github.com/yargs/y18n) from 4.0.0 to 4.0.3.
- [Release notes](https://github.com/yargs/y18n/releases)
- [Changelog](https://github.com/yargs/y18n/blob/y18n-v4.0.3/CHANGELOG.md)
- [Commits](https://github.com/yargs/y18n/compare/v4.0.0...y18n-v4.0.3)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-11 12:11:19 +02:00
ca91b4ed66 Build(deps): Bump execjs from 2.7.0 to 2.8.0 (#13016)
Bumps [execjs](https://github.com/rails/execjs) from 2.7.0 to 2.8.0.
- [Release notes](https://github.com/rails/execjs/releases)
- [Commits](https://github.com/rails/execjs/compare/v2.7.0...v2.8.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-11 12:10:10 +02:00
0a4cb65020 DEV: Fix some deprecation warnings in tests
- Import `exists()` instead of using the global function (#13010)
2021-05-11 14:04:33 +04:00
9ec5f39764 DEV: Clear NavItem.customNavItemHrefs between tests (#13025)
Identical callbacks can pile up during tests and cause all sort of weird problems that are difficult to debug. This commit clears registered callbacks after each test.
2021-05-11 12:54:37 +03:00
a7a2887df0 DEV: Remove unnecessary yarn.lock files (#13001)
All in-repo ember addons share the same yarn.lock in the yarn workspace: `/app/assets/javascripts/yarn.lock`
2021-05-11 11:15:07 +02:00
81bf581aa9 DEV: rescues site setting missing exception (#13022)
This will allow to correctly catch it client side and display a correct error.
2021-05-11 10:36:57 +02:00
4a2912233c FIX: flaky specs after topic view custom filters (#13019)
* FIX: flaky specs after topic view custom filters

When ensuring TopicView class variables return to the original state it should use empty Hash instead of empty Array. That

https://github.com/discourse/discourse/blob/master/lib/topic_view.rb#L60

* FIX: convert to string for topic view custom filter
2021-05-11 11:24:14 +10:00
37812b8e35 Revert "DEV: Drop old IE11 intersection-observer references" (#13017)
This reverts commit 7360a0f70fae59bb065dffb9b1ad42d13ff38f46.

iOS still wants this sometimes. Probably best to revert for now and we can
always remove this again later.

See: https://meta.discourse.org/t/189799/11?u=blake
2021-05-10 17:47:09 -06:00
7a0e5c8cb9 FIX: properly filter ember-cli args (#13011)
Was previously rejecting all args.
2021-05-10 10:39:54 -07:00
ee880c4c89 DEV: Extract out compound conditional (#13008) 2021-05-10 11:11:51 -06:00
d4b5a81b05 FIX: Recalculate scores only when approving or transitioning to pending. (#13009)
Recalculating a ReviewableFlaggedPost's score after rejecting or ignoring it sets the score as 0, which means that we can't find them after reviewing. They don't surpass the minimum priority threshold and are hidden.

Additionally, we only want to use agreed flags when calculating the different priority thresholds.
2021-05-10 14:09:04 -03:00
d61573fb1b FIX: ember-cli proxy subfolder fix (#12996)
* FIX: ember-cli proxy subfolder fix

* REFACTOR: put rootURL setup in environment, update baseURL logic for subfolder

Correctly have ember understand and parse relative_url_root and use it in
the dev server
2021-05-10 10:02:33 -07:00
81616fbdc4 DEV: Fix flaky d-editor test (#13005) 2021-05-10 13:00:18 -04:00
c473cde997 FIX: check trust level of user creating invite for group (#12993) 2021-05-10 12:47:32 -04:00
02f0acc41b Version bump to v2.7.0.beta9 (#13006) v2.7.0.beta9 2021-05-10 11:29:47 -04:00
49de5dadf7 DEV: Ember CLI postinstall hook and shortcut (#12987) 2021-05-10 09:34:24 -04:00
53c06442ef DEV: Clean up .gitignore (#12981)
(inspired by martin-brennan's recent adventure with `tags` exclusion)

**tl;dr: some of it is obsolete, some is dev-env specific and should live in *your* ~/.gitignore.**

---

To enable global gitignore (`~/.gitignore`) run:
```bash
git config --global core.excludesFile '~/.gitignore'
```

Then create that file and add your VIM/VSCode/Sublime/Emacs/Eclipse/RubyMine/JetBrains/macOS/Arch/Windows 95-specific stuff.

---

Reasons for removal:

* `bin` - never really ignored, all the files are checked in
* `.DS_Store`, `._.DS_Store` - OS specific
* `.sass-cache/*`, `/.bundle`, `/bundle/*`, `/cache`, `/logfile`, `!/plugins/discourse-nginx-performance-report`, `MiniProfiler/Ruby/rack-mini-profiler-2.0.1a.gem`, `config/fog_credentials.yml`, `/public/stylesheet-cache/*`, `script/download_db`, `script/refresh_db`, `config/version.rb` - no longer used?
* `/log/*.log` - covered by /log
* `bootsnap-load-path-cache`, `bootsnap-compile-cache` - bootsnap now keeps its ~~trash~~ temporary files in `/tmp`
* `/.project`, `/.buildpath`, `/.byebug_history`, `/.idea`, `discourse.sublime-workspace`, `*~`, `*.swp`, `*.swo`, `*.swm`, `config/multisite1.yml`, `.rvmrc`, `.ruby-version`, `.ruby-gemset`, `.rbenv`, `bundler_stubs/*`, `*.db`, `*.iml`, `*.swn`, `/package-lock.json`, `.vscode`, `.envrc`, `tags` - dev-env specific, see the note at the top of the commit
2021-05-10 13:43:13 +02:00
b64f93aae1 Build(deps-dev): Bump discourse_dev from 0.2.0 to 0.2.1 (#13002)
Bumps [discourse_dev](https://github.com/discourse/discourse_dev) from 0.2.0 to 0.2.1.
- [Release notes](https://github.com/discourse/discourse_dev/releases)
- [Commits](https://github.com/discourse/discourse_dev/compare/v0.2.0...v0.2.1)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-10 12:32:16 +02:00
483347202c Build(deps): Bump puma from 5.2.2 to 5.3.0 (#12997)
Bumps [puma](https://github.com/puma/puma) from 5.2.2 to 5.3.0.
- [Release notes](https://github.com/puma/puma/releases)
- [Changelog](https://github.com/puma/puma/blob/master/History.md)
- [Commits](https://github.com/puma/puma/compare/v5.2.2...v5.3.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-10 10:27:29 +02:00
36b1e1b989 Build(deps-dev): Bump rb-fsevent from 0.10.4 to 0.11.0 (#12998)
Bumps [rb-fsevent](https://github.com/thibaudgg/rb-fsevent) from 0.10.4 to 0.11.0.
- [Release notes](https://github.com/thibaudgg/rb-fsevent/releases)
- [Commits](https://github.com/thibaudgg/rb-fsevent/compare/v0.10.4...v0.11.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-10 10:25:42 +02:00
c187ede3c6 FIX: Catch UndefinedConversionError for inbound emails (#13000)
Some emails coming in via the mail receiver can still end up
with bad encoding when trying to enqueue the job. This catches
the last encoding issue and forces iso-8559-1 and encodes to
UTF-8 to circumvent the issue.
2021-05-10 14:26:23 +10:00
aaa034786a FIX: Remove auto-route from topic-link (#12999)
This was needed to fix a bookmark back button issue but it
broke category topic links, causing a full reload. Now it appears
something has changed in core and this is no longer necessary for
the bookmark back button to work, so I am removing it again.
2021-05-10 11:09:55 +10:00
a4bd1806d9 FEATURE: ability to register custom filters for posts (#12938)
Allow plugins to extend TopicView to filter posts
2021-05-10 08:57:58 +10:00