Commit Graph

42103 Commits

Author SHA1 Message Date
Alan Guo Xiang Tan
6986b36985 FIX: Child themes being precompiled multiple times. 2021-06-30 16:09:45 +08:00
Krzysztof Kotlarek
5c43f9a3a3
FIX: problem when [] custom field is send (#13573)
Multiselect data can be saved but when all are removed then data are not cleared

Ajax function is removing an empty array from request data. In that case, we should change `[]` to `null`.

We need that empty values to properly empty data.
2021-06-30 16:18:37 +10:00
Arpit Jalan
1ea2880276
FEATURE: add staff action logs for watched words (#13574) 2021-06-30 11:22:46 +05:30
Penar Musaraj
ddaa7cc7ea Update spec/components/stylesheet/manager_spec.rb
Co-authored-by: Alan Guo Xiang Tan <gxtan1990@gmail.com>
2021-06-30 13:42:40 +08:00
Penar Musaraj
a838293aaf Refactor scss live refreshing 2021-06-30 13:42:40 +08:00
Penar Musaraj
99d259d39b Precompile core stylesheets independently of themes 2021-06-30 13:42:40 +08:00
Penar Musaraj
d82c58e6cc DEV: Add simple digest for core stylesheets
And move fonts + category_backgrounds to color definitions stylesheet.
This will let us use the same core + plugin stylesheets in multisite.
2021-06-30 13:42:40 +08:00
Bianca Nenciu
e123476329
FIX: Always render topic counts (#13563)
A post is rendered multiple times when it is being loaded. Sometimes,
not all information is available and the best link in the Onebox cannot
be found.
2021-06-30 15:30:16 +10:00
Régis Hanol
b8a0e47913
UX: make poll content selectable (#13529)
When initially released, the polls had a different design that didn't interact
well with the quote button - https://meta.discourse.org/t/31586

Now that the design has evolved, not being able to select text from inside a poll is
counter productive, so it's enabled again.
2021-06-30 15:25:59 +10:00
Alan Guo Xiang Tan
9a7adcd178 FIX: Use absolute URL when redirecting SVG sprite path.
This ensures that CDN URLs with relative paths do not end up losing the
relative paths.
2021-06-30 11:25:05 +08:00
dependabot[bot]
e81a98ec94 Build(deps): Bump rubocop from 1.17.0 to 1.18.0
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.17.0 to 1.18.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.17.0...v1.18.0)

---
updated-dependencies:
- dependency-name: rubocop
  dependency-type: indirect
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-30 09:02:17 +08:00
Joffrey JAFFEUX
33464cb07e
FIX: ensures we don't apply charts options to other modes (#13570)
This reverts commit 1f74ea0f08.
2021-06-29 21:58:35 +02:00
Mark VanLandingham
4b27de8c4b
FIX: Include user_field_ids in pagination URL for directory items (#13569) 2021-06-29 14:43:38 -05:00
Robin Ward
1f74ea0f08 FIX: Some admin reports (notably backups) were not showing up 2021-06-29 15:14:16 -04:00
Mark VanLandingham
e870c09438
FIX: Do not call 'set' in destroyed directory table component (#13567) 2021-06-29 13:59:32 -05:00
Jarek Radosz
aa56e2a758
DEV: Don't use the Ember global (#13535) 2021-06-29 19:54:18 +02:00
Mark VanLandingham
717908f426
FIX: Get all groups for user directory dropdown (#13566) 2021-06-29 11:03:27 -05:00
Discourse Translator Bot
23930738a7
Update translations (#13565) 2021-06-29 16:02:02 +02:00
Krzysztof Kotlarek
a69839689d
FEATURE: add multiselect user custom field (#13560)
New user custom field similar to dropdown but allowing users to select multiple options.
2021-06-29 16:29:25 +10:00
Krzysztof Kotlarek
a6363170e9 FIX: flaky search-spec
More precise expectations for search spec
2021-06-29 10:06:44 +08:00
Jarek Radosz
5af0636d83
DEV: Fix a leaky test (#13559)
The error was:

```
↪ Unit | Model | topic::recover [✔]
↪ Unit | Utility | emoji::emojiUnescape [✔]
↪ Unit | Utility | pretty-text::quoting a quote [✔]
↪ Unit | Utility | click-track::routes to internal urlsUnhandled request in test environment: /forum/t/1234/recover (PUT)
Error: Unhandled request in test environment: /forum/t/1234/recover (PUT)
    at Pretender.server.unhandledRequest (discourse/tests/setup-tests:173:15)
    at Pretender.handleRequest (pretender:400:14)
    at FakeRequest.send (pretender:169:21)
    at Object.send (jquery:10100:10)
    at Function.ajax (jquery:9683:15)
    at performAjax (discourse/app/lib/ajax:174:19)
    at eval (discourse/app/lib/ajax:183:11)
    at invokeCallback (ember:63104:17)
    at publish (ember:63087:9)
    at eval (ember:57463:16)
 [✘]
```

* DEV: Don't duplicate a function
2021-06-29 10:40:29 +10:00
Martin Brennan
d098f51ad3
DEV: Drop duration column from topic timers (#13543)
The duration column has been ignored since the commit
4af77f1e38
for topic_timers, we use duration_minutes instead.

Also removing the duration key from Topic.set_or_create_timer. The only
plugin to use this was discourse-solved, which doesn't use it any
longer
since
c722b94a97
2021-06-29 09:27:12 +10:00
Martin Brennan
03338f9086
FIX: Remove legacy topic timer code (#13544)
The new topic timer backend code introduced six months ago
in 0034cbd is now used instead of this legacy code. It can be safely removed
now.
2021-06-29 09:16:25 +10:00
dependabot[bot]
69e557be66
Build(deps): Bump excon from 0.82.0 to 0.83.0 (#13558) 2021-06-29 00:34:17 +02:00
Jarek Radosz
6afba42985
UX: Tweak spacing in the admin dashboard (#13557)
Even margins, indented `li > ul`, no extra space inside parens `( sha )`.
2021-06-28 23:35:31 +02:00
Rafael dos Santos Silva
d860e2717b
UX: Adds 'Processing Upload' to the composer status area during upload optimization (#13556) 2021-06-28 18:22:22 -03:00
Rafael dos Santos Silva
99da221034
FIX: Handle image decoding failure in composer image optimization (#13555)
There are some hard limits in browser Canvas implementations, that will
throw a runtime exception when crossed. Since those limits are platform
dependent, the best we can do is catch it and back off from trying to
optimize a problematic file.

For example, a 60MB PNG can be processed fine by Chrome but Firefox will
fail trying to extract the ImageData from the CanvasRenderingContext2D
with NS_ERROR_FAILURE.

Also cleans up the media-optimization-utils and add post-resize size logs
2021-06-28 18:21:39 -03:00
Mark VanLandingham
d03aee4642
UX: Horizontal scroll bar on top of user directory (when needed) (#13553) 2021-06-28 15:10:38 -05:00
mintsaxon
7d0d13c32e FEATURE: add slow_mode_prevents_editing setting..
..as per https://meta.discourse.org/t/slow-mode-for-a-category/179574/16
2021-06-28 13:08:10 -04:00
Jarek Radosz
04baca593b
UX: Tweak the timestamp line in Twitter onebox (#13551)
Fixed alignment and made the color less intrusive to make the actual content pop out more.
2021-06-28 15:04:33 +02:00
Dan Ungureanu
d015907668
FIX: Remove extra margin from share topic modal (#13549)
The styling between the "Create Invite" and "Share Topic" modals is
shared. The margin that was used to organize inputs in a list is not
needed for the "Share Topic" modal.
2021-06-28 15:52:44 +03:00
Arpit Jalan
3dda926cb2
FIX: only delete the word/phrase when the 'x' icon is clicked (#13547) 2021-06-28 15:14:18 +05:30
Andrei Prigorshnev
6be4699954
FIX: topic level bookmark button (#13530)
We changed (https://github.com/discourse/discourse/pull/13407) behaviour of the topic level bookmark button recently. That PR made the button be opening the edit bookmark modal when there is only one bookmark on the topic instead of just removing that bookmark as it was before.

This PR fixes the next problems that weren't taken into account in the previous PR:

1. Everything should work fine even on very big topics when a bookmarked post is unloaded from the post stream. I've added code that loads the post we need and makes everything work as expected
2. When at least one bookmark on the topic has a reminder, we should always be showing the icon with a clock on the topic level bookmark button
3. We should show correct tooltips for the topic level bookmark button
2021-06-28 12:24:23 +04:00
Alan Guo Xiang Tan
7719453fb7 DEV: Don't eager load tags when tagging is not enabled. 2021-06-28 16:00:10 +08:00
Sam
14a0247301
PERF: optimise backfilling of topic_id (#13545)
Relying on large offsets can have uneven performance on huge table, new
implementation recovers more cleanly and avoids double updates
2021-06-28 16:16:22 +10:00
Martin Brennan
a6b9289477
DEV: Remove old group form code (#13542)
We don't use this group form anymore
since
964da21817
when we revamped the UI
2021-06-28 14:57:51 +10:00
Martin Brennan
4d0178deab
FIX: Do not show In Reply To for group SMTP emails (#13541)
We do not want to show the In Reply To section of the
group SMTP email template, it is similar to Context Posts
which we removed and is unnecessary.

This PR also removes the link to staged user profiles in
the email; their email addresses will just be converted
to regular mailto: links.
2021-06-28 13:19:17 +10:00
Alan Guo Xiang Tan
fd8016d678 DEV: Remove unused attributes from topic-tracking-state. 2021-06-28 11:02:49 +08:00
Alan Guo Xiang Tan
ff1c53dd6f FIX: Missing category edit icon.
Follow-up to 0e4b8c5318
2021-06-28 10:54:23 +08:00
Martin Brennan
d3e27cabf6
FIX: Improve participant display in group SMTP emails (#13539)
This PR makes several changes to the group SMTP email contents to make it look more like a support inbox message.

* Remove the context posts, they only add clutter to the email and replies
* Display email addresses of staged users instead of odd generated usernames
* Add a "please reply above this line" message to sent emails
2021-06-28 10:42:06 +10:00
Martin Brennan
87684f7c5e
FEATURE: Use group SMTP job and mailer instead of UserNotifications change (#13489)
This PR backtracks a fair bit on this one https://github.com/discourse/discourse/pull/13220/files.

Instead of sending the group SMTP email for each user via `UserNotifications`, we are changing to send only one email with the existing `Jobs::GroupSmtpEmail` job and `GroupSmtpMailer`. We are changing this job and mailer along with `PostAlerter` to make the first topic allowed user the `to_address` for the email and any other `topic_allowed_users` to be the CC address on the email. This is to cut down on emails sent via SMTP, which is subject to daily limits from providers such as Gmail. We log these details in the `EmailLog` table now.

In addition to this, we have changed `PostAlerter` to no longer rely on incoming email email addresses for sending the `GroupSmtpEmail` job. This was unreliable as a user's email could have changed in the meantime. Also it was a little overcomplicated to use the incoming email records -- it is far simpler to reason about to just use topic allowed users.

This also adds a fix to include cc_addresses in the EmailLog.addressed_to_user scope.
2021-06-28 08:55:13 +10:00
dependabot[bot]
f9886ecfa2
Build(deps-dev): Bump mocha from 1.12.0 to 1.13.0 (#13538)
Bumps [mocha](https://github.com/freerange/mocha) from 1.12.0 to 1.13.0.
- [Release notes](https://github.com/freerange/mocha/releases)
- [Changelog](https://github.com/freerange/mocha/blob/main/RELEASE.md)
- [Commits](https://github.com/freerange/mocha/compare/v1.12.0...v1.13.0)

---
updated-dependencies:
- dependency-name: mocha
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-28 00:19:58 +02:00
Martin Brennan
69518bee15
FIX: Backfill topic_id for EmailLog (#13469)
In the previous commit 5222247
we added a topic_id column to EmailLog. This simply backfills it in
batches. The next PR will get rid of the topic method defined on EmailLog in favour
of belongs_to.
2021-06-28 08:15:52 +10:00
Jarek Radosz
203d56719d
UX: Improve blockquote styling in emails (#13527) 2021-06-25 20:13:46 +02:00
Roman Rizzi
fa4e5e8dad
FEATURE: Render emojis on GitHub labels when oneboxing an issue. (#13531) 2021-06-25 14:48:36 -03:00
Jarek Radosz
61472d6aaa
DEV: Rename hilight to highlight (#13526) 2021-06-25 18:05:50 +02:00
Jarek Radosz
b4f0a0fb94
FIX: Nil-filled CF arrays were not being deleted (#13518) 2021-06-25 11:34:51 +02:00
Bianca Nenciu
8ab6fd88ef
UX: Add notice when watched words are regexes (#13493)
There is a big difference between regular watched words and regular
expressions and this has been confusing in the past. This notice adds
an explanation.

This commit also reorganizes the code of the test modal.
2021-06-25 12:08:52 +03:00
Martin Brennan
c3394ed9bb
DEV: Update aws-sdk-s3 gem for S3 multipart uploads (#13523)
We are a few versions behind on this gem. We need to update it
for S3 multipart uploads. In the current version we are using, we
cannot do this:

```ruby
Discourse.store.s3_helper.object(key).presigned_url(:upload_part, part_number: 1, upload_id: multipart_upload_id)
```

The S3 client raises an error, saying the operation is undefined. Once
I updated the gem this operation works as expected and returns a
presigned URL for the upload_part operation.

Also remove use of Aws::S3::FileUploader::FIFTEEN_MEGABYTES.
This was part of a private API and should not have been used.
2021-06-25 14:22:31 +10:00
awesomerobot
895df9c239 UX: margin improvement for mobile alerts 2021-06-25 09:18:06 +08:00