Commit Graph

41525 Commits

Author SHA1 Message Date
Bianca Nenciu
ecc3c404a0
FIX: Cache missing inline oneboxes (#12953)
* FIX: Cache missing inline oneboxes

Some inline oneboxes were not cached when the server did not return an
answer for an URL and the queried URL and the absolute URL were
different.

For example, if user typed www.example.com, the client asked the server
for http://www.example.com and if the server returned an empty response,
then the client would keep requesting an inline onebox everytime the
composer changed.

In other words, the key used for reading (the absolute URL) and the one
used for writing (the URL as typed by the user) were not the same when
the server returned an empty response.

* DEV: Check cache before making request

There is another cache check in PrettyText, but that is not enough if
multiple requests are pending. This problem was made obvious in tests,
but can happen for users with slow connections.
2021-05-06 19:08:04 +03:00
Robin Ward
1bc6fdd41d
Add Mini Profiler support to Ember CLI (#12970) 2021-05-06 11:54:17 -04:00
Penar Musaraj
82ecd9fdd5
DEV: tiny refactor in watched words (#12969) 2021-05-06 11:37:05 -04:00
Penar Musaraj
b61d4663ec
FIX: Prevent infinite loop when replacing watched words (#12967) 2021-05-06 11:06:25 -04:00
dependabot[bot]
ff45be747c
Build(deps): Bump rqrcode from 1.2.0 to 2.0.0 (#12962)
Bumps [rqrcode](https://github.com/whomwah/rqrcode) from 1.2.0 to 2.0.0.
- [Release notes](https://github.com/whomwah/rqrcode/releases)
- [Changelog](https://github.com/whomwah/rqrcode/blob/master/CHANGELOG.md)
- [Commits](https://github.com/whomwah/rqrcode/compare/v1.2.0...v2.0.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-06 10:13:52 -04:00
David Taylor
c456e31d26
SECURITY: Bump Rails to 6.1.3.2 (#12963)
Includes fixes for

- CVE-2021-22902
- CVE-2021-22903
- CVE-2021-22904
- CVE-2021-22885

https://github.com/rails/rails/blob/v6.1.3.2/actionpack/CHANGELOG.md
2021-05-06 12:41:45 +01:00
Joffrey JAFFEUX
a6300a9863
DEV: remove unused Helpers::StubbedJob (#12960) 2021-05-06 13:04:41 +02:00
Joffrey JAFFEUX
f3a4c12564
DEV: removes unused set_env (#12961) 2021-05-06 13:04:18 +02:00
Dan Ungureanu
17efce9023
FEATURE: Allow sending a message with invite (#12892)
* FEATURE: Allow sending a message with invite

It used to be a staff-only feature and this commit makes it available
to everyone who can invite.

* FIX: Inviting to topic uses another email template

This used to be the case, but the extra parameter was lost when we
switched to the new modal.
2021-05-06 10:16:42 +03:00
dependabot[bot]
b5a70bbb25 Build(deps): Bump rubocop from 1.13.0 to 1.14.0
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.13.0 to 1.14.0.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop/compare/v1.13.0...v1.14.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-06 14:29:58 +08:00
Martin Brennan
5f7bef6d20
FEATURE: Add email_encoded parameter to accept inbound base64 encoded emails (#12947)
We have found when receiving and posting inbound emails to the handle_mail route, it is better to POST the payload as a base64 encoded string to avoid strange encoding issues. This introduces a new param of `email_encoded` and maintains the legacy param of email, showing a deprecation warning. Eventually the old param of `email` will be dropped and the new one `email_encoded` will be the only way to handle_mail.
2021-05-06 12:59:52 +10:00
Alan Guo Xiang Tan
c697efc186 DEV: Remove autoloading in initializers depreciation message. 2021-05-06 10:50:44 +08:00
Alan Guo Xiang Tan
7a98efe72e DEV: Remove unused autoload path. 2021-05-06 10:50:44 +08:00
Penar Musaraj
aec52ce043
UX: Admin watched words UI tweaks (#12956) 2021-05-06 12:40:07 +10:00
Martin Brennan
72648dd576
FIX: Base topic details message on current category and tag tracking state (#12937)
The user may have changed their category or tag tracking settings since a topic was tracked/watched based on those settings in the past. In that case we need to alter the reason message we show them otherwise it is very confusing for the end user to be told they are tracking a topic because of a category, when they are no longer tracking that category.

For example: "You will see a count of new replies because you are tracking this category." becomes: "You will see a count of new replies because you were tracking this category in the past."

To do this, it was necessary to add tag and category tracking info to current user serializer. I improved the serializer code so it only does 3 SQL queries instead of 9 to get the tracking information for tags and categories for the current user.
2021-05-06 09:14:07 +10:00
Robin Ward
c792c2b5fe
FIX: {{ace-editor}} was buggy in Ember CLI release (#12952) 2021-05-05 13:45:52 -04:00
Roman Rizzi
c8f34db648
FIX: Use the no-sandbox flag when running Ember CLI tests. (#12951)
Without this flag we get "Error: Browser exited unexpectedly" when trying to run tests.
2021-05-05 14:02:26 -03:00
David Taylor
ac1d344368
DEV: Update server startup warning to be more specific (#12949)
Using `bundle exec` will slow down server startup by at least 0.5s. `bin/unicorn` has built-in handling of bundler dependencies, so it is better to launch `bin/rails s` or `bin/unicorn` directly.
2021-05-05 13:33:11 +01:00
Discourse Translator Bot
2024440c94
Update translations (#12950) 2021-05-05 13:23:44 +02:00
Joffrey JAFFEUX
b0e9c6e127
FIX: limit visible revisions history to last 100 (#12946)
This is done to prevent spike memory usage when the number of revisions is very large (thousands) and the post has a significant length.
2021-05-05 12:18:25 +02:00
Andrei Prigorshnev
8f82243ee7
UX: update copy on the notifications empty panel (#12948) 2021-05-05 14:02:39 +04:00
Blake Erickson
1b02dce594
DEV: Drop old IE11 intersection-observer references (#12942)
It's been awhile since we have supported IE11 so it should be safe to remove
IntersectionObserver now.

From a TODO task in this repo:
> drop when we eventually drop IE11

Announcement of when we removed IE11 support:

https://meta.discourse.org/t/137984/40?u=blake
2021-05-04 17:54:54 -06:00
Martin Brennan
657370b56c
FIX: Pressing back from topic in bookmark list takes user to / (#12936)
See: https://meta.discourse.org/t/navigating-back-to-bookmarks/188912/4

Instead of taking the user back to the bookmark list after selecting
a topic and navigating back, the user was navigated back to the page
before that. This is because the topic-link component was missing
the data-auto-route attribute which tells the intercept-click library
not to use DiscourseURL.routeTo to handle the transition (so it is just
handled internally by Ember)
2021-05-05 09:00:21 +10:00
dependabot[bot]
9d3aee115d
Build(deps): Bump bootsnap from 1.7.4 to 1.7.5 (#12944)
Bumps [bootsnap](https://github.com/Shopify/bootsnap) from 1.7.4 to 1.7.5.
- [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.7.4...v1.7.5)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-05 00:45:01 +02:00
Kris
f57878f20f
FEATURE: Add more class names to latest-topic-list-item (#12933) 2021-05-04 16:40:42 -04:00
Roman Rizzi
5794787300
FIX: Make the docker:test task install dependencies before calling yarn ember test. (#12943) 2021-05-04 16:30:35 -03:00
Discourse Translator Bot
d45c7973f9
Update translations (#12940) 2021-05-04 16:34:37 +02:00
Andrei Prigorshnev
599327658c
FIX: temporarily skip flaky future-date-input tests (#12941) 2021-05-04 17:18:58 +04:00
Grayden
61ad959212
UX: Allow saving with cmd+s/ctrl+s with Ace editor (#12674)
When editing the files for a theme in the admin dashboard, typing "cmd+s" (a common key-binding to save in most text editors) used to engage the browser's default "save page" dialogue.

This commit adds a key-binding to the ace editor that saves the file.

Now, the "cmd+s" (and "ctrl+s" for windows) key-binding does the same action as the save button.
2021-05-04 12:56:10 +01:00
Andrei Prigorshnev
338740c385
UX: hide the list of file extensions on the upload dialog (#12836) 2021-05-04 15:16:00 +04:00
Joffrey JAFFEUX
d14a7f1965
DEV: removes comment about disable_jump_reply (#12939)
This has been removed in 40fa96777d
2021-05-04 11:44:09 +02:00
Vinoth Kannan
167bbb259f
UX: add CSS classes on body tag based on topic statuses. (#12729)
This commit will add CSS classes like `unlisted`, `pinned`, and `unpinned` on the body tag.

* DEV: we no longer using the `categoryClass` & `tagClasses` methods.
* Update app/assets/javascripts/discourse/app/components/add-topic-status-classes.js

Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2021-05-04 11:07:54 +05:30
dependabot[bot]
14ed6e1657
Build(deps): Bump simplecov_json_formatter from 0.1.2 to 0.1.3 (#12934)
Bumps [simplecov_json_formatter](https://github.com/fede-moya/simplecov_json_formatter) from 0.1.2 to 0.1.3.
- [Release notes](https://github.com/fede-moya/simplecov_json_formatter/releases)
- [Changelog](https://github.com/codeclimate-community/simplecov_json_formatter/blob/master/CHANGELOG.md)
- [Commits](https://github.com/fede-moya/simplecov_json_formatter/commits)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-04 13:13:50 +10:00
Bianca Nenciu
77c92fd674
FIX: Hide Uncategorized unless allow_uncategorized_topics (#12889)
Uncategorized was sometimes visible even if allow_uncategorized_topics
was false. This was especially happening on mobile, if at least one
topic was uncategorized.
2021-05-04 13:05:08 +10:00
Dan Ungureanu
d1d9f83304
FIX: Link notification to first unread post (#12868)
* FIX: Link notification to first unread post

If a topic with a few posts was posted in a watched category or with a
watched tag, the created notification would always point to the last
post, instead of pointing to the first one.

The root cause is that the query that fetched the first unread post
uses 'TopicUser' records and those are not created by default for
user watching a category or tag. In this case, it should use the
'CategoryUser' or 'TagUser' records.

* DEV: Use named bind variables
2021-05-04 13:03:00 +10:00
dependabot[bot]
5cba86f321
Build(deps): Bump stackprof from 0.2.16 to 0.2.17 (#12935)
Bumps [stackprof](https://github.com/tmm1/stackprof) from 0.2.16 to 0.2.17.
- [Release notes](https://github.com/tmm1/stackprof/releases)
- [Changelog](https://github.com/tmm1/stackprof/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tmm1/stackprof/compare/v0.2.16...v0.2.17)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-04 13:01:53 +10:00
Hariraj Venkatesan
0ac9abe59e
FIX: show required only when full name is required and lint fix (#12916) 2021-05-04 12:58:26 +10:00
Joffrey JAFFEUX
3ef1cde6e8
DOC: adds a link to teams.discourse.com (#12928) 2021-05-04 12:52:15 +10:00
Blake Erickson
174c68509d
DOCS: Update min versions (#12932)
Update the minimum required version for ruby, pg, and redis to match what is listed in the [INSTALL.md](https://github.com/discourse/discourse/blob/master/docs/INSTALL.md) file.
2021-05-03 12:58:34 -06:00
Penar Musaraj
10d229ff71
Revert "FIX: excludes .svg-as-img from JS sizing (#12906)" (#12931)
This reverts commit 2f0205e5c8.
2021-05-03 14:40:18 -04:00
Penar Musaraj
9bc126949e
DEV: Support referencing public images in plugins in SCSS (#12930) 2021-05-03 14:40:02 -04:00
Kris
8ca6202d81
FIX: tag control styles should apply to desktop (#12919) 2021-05-03 13:57:10 -04:00
Kris
3731d3c772
UX: anticipate anchor link hover (#12920) 2021-05-03 13:56:58 -04:00
Hariraj Venkatesan
b81c740fc7
FIX: remove invite based associated object (#12927) 2021-05-03 12:49:53 -04:00
webdirektindia
6c276765c2
Adding composer-after-composer-editor plugin-outlet on the composer template (#12914)
* Adding after-groups-index-container plugin-outlet on the groups index template

* Update app/assets/javascripts/discourse/app/templates/groups/index.hbs

Co-authored-by: Régis Hanol <regis@hanol.fr>

* Adding composer-after-composer-editor plugin-outlet on the composer template

* Update composer.hbs

Co-authored-by: Régis Hanol <regis@hanol.fr>
2021-05-03 11:27:09 -04:00
dependabot[bot]
6e09c8fc78
Build(deps-dev): Bump discourse_dev from 0.1.0 to 0.2.0 (#12844)
Bumps [discourse_dev](https://github.com/discourse/discourse_dev) from 0.1.0 to 0.2.0.
- [Release notes](https://github.com/discourse/discourse_dev/releases)
- [Commits](https://github.com/discourse/discourse_dev/compare/v0.1.0...v0.2.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-03 16:38:05 +02:00
Joffrey JAFFEUX
374ff4c54c
FIX: topic might be night at this stage (#12929) 2021-05-03 10:37:43 +02:00
Dan Ungureanu
3ff9dbb15c
FIX: Show warning only if new value is different (#12893)
A warning is logged when a shadowed site setting is being changed. This
should not be the case when the new value is the same as the old one.
2021-05-03 09:25:02 +02:00
Joffrey JAFFEUX
286b6916af
UX: refactor security modals (#12870)
- better form
- uses d-footer
- ensure buttons have the same height

Note that to achieve same height for btn without text, I made the choice to go for a minimum height which should work in most cases.
2021-05-03 09:22:33 +02:00
Andrei Prigorshnev
e7de943b5d
FIX: hide "Next Week" in future-date-input on Sundays (#12918) 2021-05-03 09:22:05 +02:00