Commit Graph

32964 Commits

Author SHA1 Message Date
2c6b595eed FIX: Process image onebox correctly when image is wrapped in a link
The instagram onebox sometimes surrounds the image with an `<a>` tag, which was breaking the aspect ratio logic, and therefore causing posts to change height on load.
2019-05-10 10:02:40 +01:00
4096d559b5 REFACTOR: user-stream model (#7515) 2019-05-10 10:05:43 +02:00
a85b7feef4 REFACTOR: composer controller (#7516) 2019-05-10 10:05:29 +02:00
7aedc92a35 REFACTOR: login-controller (#7514) 2019-05-10 10:05:11 +02:00
63a3caa516 FIX: Don't display option for users to flag and notify a bot. 2019-05-10 10:05:03 +08:00
0ab6c6e24e PERF: speed up spec suite, avoid featuring topics
Before: 6:05
After: 5:42

Featuring topics for `list/categories` is a very expensive operation that
happened each time we created a topic. This introduces a test only bypass
2019-05-10 11:37:53 +10:00
41f4f9302d UX: Rename discobot tutorial triggers.
We found the previous triggers less straight forward than just calling
it tutorial.

`start new user` -> `start tutorial`
`start new advanced user` -> `start advanced tutorial`
2019-05-10 09:08:16 +08:00
ce15f085c6 DEV: Return the right response code and error message.
Follow up to d1dbafebbc4b21c2a6714cd19c0ba05fac7717c4.

Also remove test that is a duplicate of
867c1a5ac9355aadef35d60fd9c7aa4ebd0eda25.
2019-05-10 07:33:02 +08:00
4a1755b780 FIX: Don't create staged users when processing forwarded email fails 2019-05-09 23:47:47 +02:00
ccc1e85bf4 REFACTOR: Shorten up category param check
Follow up to d1dbafebbc4b21c2a6714cd19c0ba05fac7717c4
2019-05-09 14:35:36 -06:00
34684af195 FIX: Show error message if message exists 2019-05-09 22:12:51 +02:00
b380ed5282 FEATURE: Claim Reviewables by Topic
This is a feature that used to be present in discourse-assign but is
much easier to implement in core. It also allows a topic to be assigned
without it claiming for review and vice versa and allows it to work with
category group reviewers.
2019-05-09 13:40:36 -04:00
8dfb15a2e5 FIX: Do not show self edits in Post Edits report. (#7510) 2019-05-09 20:39:17 +03:00
ea3004ef11 UX: Save scroll position in tags topic list. (#7511) 2019-05-09 20:39:03 +03:00
9758857a78 FIX: escape Vimeo iframe URL 2019-05-09 23:01:50 +05:30
d1dbafebbc FIX: Return error if new topic category not found take 2
If creating a topic via the api as an admin and the category you specify
cannot be found an error will now be returned instead of just creating
the topic with no category. This will prevent accidental public topic
creation originally intended for a private category.

This commit is follow up to 535c594891ec703a3b2e57c1b1a3497373d2e1f6 and
still allows for the creation of topics where the category param is
blank.
2019-05-09 11:27:45 -06:00
b5c8f5f900 SPEC: ensure never remap readonly columns
Follow-up to bfcbfd78
2019-05-09 18:01:35 +02:00
2a45933ff2 FIX: reduce iPad app nav padding 2019-05-09 10:25:22 -04:00
c06b00a54e FIX: Hide Uncategorized in site menu when disabled. (#7509) 2019-05-09 14:08:10 +03:00
4e91839c97 FIX: Remove default val for colors step if a default theme has been set.
Running through the wizard after a default theme has been configured
will always revert the default theme to the light theme.
2019-05-09 17:25:09 +08:00
d110f252bb DEV: Remove unsued option from spec. 2019-05-09 17:25:09 +08:00
f3a346464e FIX: allTimezonesd was mistakenly removed (#7513) 2019-05-09 10:22:54 +02:00
977ffa20f4 FIX: variable is different from key (#7512) 2019-05-09 10:03:33 +02:00
88249932a0 PERF: remove SQL notifiers for every SQL execution
Benchmarking:

```
Benchmark.ips do |b|
  b.report("simple") do
    User.first
  end
end

ActiveSupport::Notifications.notifier.listeners_for("sql.active_record").clear

Benchmark.ips do |b|
  b.report("simple") do
    User.first
  end
end

```

```
sam@arch discourse % RAILS_ENV=production ruby script/micro_bench.rb

Before

Calculating -------------------------------------
              simple      3.289k (± 4.4%) i/s -     16.575k in   5.049771s
After

Calculating -------------------------------------
              simple      3.491k (± 3.6%) i/s -     17.442k in   5.002226s
````
2019-05-09 17:44:46 +10:00
414a36184b DEV: Prefer create! over create when not checking return value. 2019-05-09 15:10:24 +08:00
626808e100 Fix incorrect condition in groups:grant_badge rake task.
`#find` raises an error if the id given to it is invalid. As a result,
the conditional to check whether a `group` or `badge` is `present?` will
not be executed if any of the ids are invalid.

Follow up to
6ba914033c.
2019-05-09 14:53:13 +08:00
867c1a5ac9 DEV: Add request spec for creating an uncategorized category. 2019-05-09 14:53:13 +08:00
742decc2a1 PERF: Avoid looking up the same category twice in TopicCreator. 2019-05-09 14:53:13 +08:00
535c594891 Revert "FIX: Return error if new topic category not found"
This reverts commit 9c606dd99a7ce227bde38527986b250d6e6c22dc.
2019-05-09 14:53:13 +08:00
d1860536bc omit needless words 2019-05-08 23:22:51 -07:00
7dc58d62e4 DEV: Clear topic title input each smoke test.
There may be pre-filled topic title as a result of a draft.
2019-05-09 14:02:45 +08:00
427979e7e5 FEATURE: use full screen login by default for social login methods (#7481) 2019-05-09 10:03:01 +05:30
88650a1259 PERF: avoid checking for consecutive replies in test
This check can issue up to 2 queries per post created, we have specific
tests for it so we can avoid.

This also rolls back #4da6ca4d
2019-05-09 13:28:53 +10:00
8ec1f8cf07 DEV: Correct naming convention for JS file. 2019-05-09 10:18:29 +08:00
4da6ca4d9f PERF: Skip post validation by default when fabricating posts (#7508)
This speeds up tests by 10%
2019-05-09 10:15:38 +10:00
8c07c272f2 make rubocop happy. 2019-05-09 05:25:44 +05:30
87cd4701b8 FEATURE: option to skip posts with ignored missing uploads 2019-05-09 05:11:15 +05:30
7c0cb59741 DEV: Skip new JS flaky tests 2019-05-08 18:17:49 -03:00
9c606dd99a FIX: Return error if new topic category not found
If creating a topic via the api as an admin and the category you specify
cannot be found an error will now be returned instead of just creating
the topic with no category. This will prevent accidental public topic
creation originally intended for a private category.
2019-05-08 15:02:00 -06:00
a92c925378 Use faster Brotli compression for non-default locale files 2019-05-08 14:55:24 -04:00
d9ab722d05 Revert "Revert "PERF: Skip compressing locales for faster rebuilds (#7501)" (#7502)"
This reverts commit 6ea811c923c2d96e4d71332c300422653909d890.
2019-05-08 14:55:06 -04:00
e6cfc584d0 Revert "FIX: frozen string exception (#7506)"
This reverts commit c4b7fb2754555bb2b68113897271535e0f9aff58.
2019-05-08 17:27:09 +02:00
497c0ba418 Revert "FIX: frozen string exception (#7505)"
This reverts commit 2938e3f03394a5b7c23efb44ade88d360c7a7f7b.
2019-05-08 17:27:03 +02:00
24ca074f3f FIX: short description title on client side when empty description
follow-up 77af097c
2019-05-08 17:07:12 +02:00
e84531a6a6 FIX: Correctly clear theme stylesheet cache when changing color scheme 2019-05-08 16:02:55 +01:00
54c2f24ee9 REFACTOR: composer model (#7499) 2019-05-08 16:53:12 +02:00
2938e3f033 FIX: frozen string exception (#7505)
Initial backtrace:

```
/var/www/discourse/app/mailers/user_notifications.rb:554:in `send_notification_email'
/var/www/discourse/app/mailers/user_notifications.rb:459:in `notification_email'
/var/www/discourse/app/mailers/user_notifications.rb:318:in `user_private_message'
```

* this might fail too
2019-05-08 16:52:38 +02:00
a4eb523af6 Track Discourse user agent pageviews as crawler
Since 5bfe051e, Discourse user agents are marked as non-crawlers (to avoid accidental blacklisting). This makes sure pageviews for these agents are tracked as crawler hits.
2019-05-08 10:38:55 -04:00
4aaee7ee35 REFACTOR: change-timestamp controller (#7498) 2019-05-08 16:26:51 +02:00
c4b7fb2754 FIX: frozen string exception (#7506)
Initial backtrace:

```
/var/www/discourse/app/models/incoming_domain.rb:29:in `to_url'
/var/www/discourse/app/models/incoming_link.rb:83:in `referer'
/var/www/discourse/app/models/incoming_link.rb:106:in `referer_valid'
```
2019-05-08 16:25:54 +02:00