Commit Graph

35634 Commits

Author SHA1 Message Date
Joe 23a4936826
UX: TMP fix (CSS revert) until translations are ready for flex 2019-12-31 10:43:16 +08:00
Sam Saffron e32bf19cd3 DEV: update dependencies
Quite a few have popped up due to 2.7 release, all gems being updated have
non urgent fixes, but it makes sense to be on latest.
2019-12-31 12:20:26 +11:00
Krzysztof Kotlarek 764e01b597
FIX: visual improvements to admin topic menu (#8638)
* 10 px padding from the bottom to look better on rounded phones
* dark cloak on other elements to emphasize admin menu
* slide up animation
2019-12-31 11:52:25 +11:00
dependabot-preview[bot] d048464b03 DEV: Bump rspec-core from 3.9.0 to 3.9.1 (#8637)
Bumps [rspec-core](https://github.com/rspec/rspec-core) from 3.9.0 to 3.9.1.
- [Release notes](https://github.com/rspec/rspec-core/releases)
- [Changelog](https://github.com/rspec/rspec-core/blob/master/Changelog.md)
- [Commits](https://github.com/rspec/rspec-core/compare/v3.9.0...v3.9.1)

Test only dependency, low risk.
2019-12-31 11:49:21 +11:00
dependabot-preview[bot] 4ddc6b8b96 DEV: Bump tzinfo from 1.2.5 to 1.2.6 (#8635)
Bumps [tzinfo](https://github.com/tzinfo/tzinfo) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/tzinfo/tzinfo/releases)
- [Changelog](https://github.com/tzinfo/tzinfo/blob/master/CHANGES.md)
- [Commits](https://github.com/tzinfo/tzinfo/compare/v1.2.5...v1.2.6)

Pretty safe update, deals with Ruby 2.7 and corrects a minor internal bug
2019-12-31 11:48:37 +11:00
dependabot-preview[bot] 09a6bb240e DEV: Bump public_suffix from 4.0.1 to 4.0.2 (#8631)
Bumps [public_suffix](https://github.com/weppos/publicsuffix-ruby) from 4.0.1 to 4.0.2.
- [Release notes](https://github.com/weppos/publicsuffix-ruby/releases)
- [Changelog](https://github.com/weppos/publicsuffix-ruby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/weppos/publicsuffix-ruby/compare/v4.0.1...4.0.2)

Definition only update, has very little impact.
2019-12-31 11:47:14 +11:00
dependabot-preview[bot] acabea4cfe DEV: Bump rspec-support from 3.9.0 to 3.9.2 (#8628)
Bumps [rspec-support](https://github.com/rspec/rspec-support) from 3.9.0 to 3.9.2.
- [Release notes](https://github.com/rspec/rspec-support/releases)
- [Changelog](https://github.com/rspec/rspec-support/blob/master/Changelog.md)
- [Commits](https://github.com/rspec/rspec-support/compare/v3.9.0...v3.9.2)

Minor test only update, also cleans up Ruby 2.7 support
2019-12-31 11:45:43 +11:00
dependabot-preview[bot] 420fd27e48 DEV: Bump pg from 1.1.4 to 1.2.0 (#8632)
Bumps [pg](https://github.com/ged/ruby-pg) from 1.1.4 to 1.2.0.
- [Release notes](https://github.com/ged/ruby-pg/releases)
- [Changelog](https://github.com/ged/ruby-pg/blob/master/History.rdoc)
- [Commits](https://github.com/ged/ruby-pg/compare/v1.1.4...v1.2.0)

This is a big update to the PG gem, overall our codebase should support it fully. It also comes with some perf fixes which is nice!
2019-12-31 11:44:49 +11:00
Rafael dos Santos Silva d170812e99
FIX: Use cached MaxMind DB for longer
Don't try to update the IP database as it's gone.

This allows users to rebuild Discourse while we work on a proper
fix / alternative database.
2019-12-30 16:41:23 -03:00
Jarek Radosz c76e22942c
FIX: Open a card on click even if the mention has extra elements (#8626)
Plugins like https://github.com/discourse/discourse-calendar add extra HTML (e.g. icons) to user/group mentions. Clicking on those extra elements used to only flash a blank card. Now, the card opens properly.
2019-12-30 19:26:23 +01:00
Roman Rizzi c751291769
FIX: The 'reviewed' status filter should include deleted elements (#8630) 2019-12-30 14:56:17 -03:00
Robin Ward 5214f82841 API endpoints should return a response, not nil 2019-12-30 10:14:29 -05:00
David Taylor bc4c40abd4
DEV: Remove unsafe-eval from development CSP (#8569)
- Refactor source_url to avoid using eval in development
- Precompile handlebars in development
- Include template compilers when running qunit
- Remove unsafe-eval in development CSP
- Include unsafe-eval only for qunit routes in development
2019-12-30 12:17:12 +00:00
David Taylor df8444e813
FIX: Update topic/post counter correctly when category has zero topics (#8600)
Previously, categories without any topics were being excluded from the UPDATE query. This means the counter gets stuck, and the category cannot be deleted. This change ensures that the counters get correctly set to zero.
2019-12-30 11:20:44 +00:00
David Taylor 9348d2cfdf
PERF: Cache user badge count in user_stats table (#8610)
This means that we no longer need to run a `count()` on the user_badges table when serializing a user
2019-12-30 11:19:59 +00:00
Joffrey JAFFEUX c15d702ae6
FEATURE: internet explorer deprecation global notice (#8577) 2019-12-30 08:19:07 +01:00
Joffrey JAFFEUX 6fa5725292
FIX: makes highlighting last viewed topic more resilient (#8624)
`highlight` was called from `didInsertElement` which technically doesn't ensure the list is rendered. By wrapping the highlighting code in `afterRender` we ensure it works more consistently.
2019-12-30 08:18:36 +01:00
Martin Brennan 473e39f4a4 DEV: model annotations 2019-12-30 16:13:27 +10:00
dependabot-preview[bot] dca99c0391 Build(deps): Bump cose from 0.9.0 to 0.10.0 (#8595)
Bumps [cose](https://github.com/cedarcode/cose-ruby) from 0.9.0 to 0.10.0.
- [Release notes](https://github.com/cedarcode/cose-ruby/releases)
- [Changelog](https://github.com/cedarcode/cose-ruby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/cedarcode/cose-ruby/compare/v0.9.0...v0.10.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-30 16:10:34 +10:00
dependabot-preview[bot] 831d46f55f DEV: Bump aws-partitions from 1.256.0 to 1.260.0 (#8617)
Bumps [aws-partitions](https://github.com/aws/aws-sdk-ruby) from 1.256.0 to 1.260.0.
- [Release notes](https://github.com/aws/aws-sdk-ruby/releases)
- [Changelog](https://github.com/aws/aws-sdk-ruby/blob/master/gems/aws-partitions/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-ruby/commits)

Contains a bunch of AWS gem updates that we do not use. My long term thinking here is that maybe the AWS dependency is just too heavy and we should consume the API directly to avoid this constant churn.
2019-12-30 17:09:07 +11:00
dependabot-preview[bot] 9178b36e64 Build(deps): Bump request_store from 1.4.1 to 1.5.0 (#8608)
Bumps [request_store](https://github.com/steveklabnik/request_store) from 1.4.1 to 1.5.0.
- [Release notes](https://github.com/steveklabnik/request_store/releases)
- [Commits](https://github.com/steveklabnik/request_store/compare/v1.4.1...v1.5.0)

request_store is a side dependency that is only used for lograge support, not expecting this to break anything.
2019-12-30 17:07:37 +11:00
dependabot-preview[bot] bb9c54514f DEV: Bump unicorn from 5.5.1 to 5.5.2 (#8602)
Bumps [unicorn](https://bogomips.org/unicorn/) from 5.5.1 to 5.5.2.

This contains a fix for: 024f7a8c8c 

Specifically its around operation when you use the ruby tainting feature (which will soon be removed) 

Update has no actual impact on Discourse.
2019-12-30 17:06:00 +11:00
dependabot-preview[bot] 640fa6d118 DEV: Bump excon from 0.71.0 to 0.71.1 (#8587)
Bumps [excon](https://github.com/excon/excon) from 0.71.0 to 0.71.1.
- [Release notes](https://github.com/excon/excon/releases)
- [Changelog](https://github.com/excon/excon/blob/master/changelog.txt)
- [Commits](https://github.com/excon/excon/compare/v0.71.0...v0.71.1)

Minor performance update, the big change here is that internally excon starts using frozen strings.
2019-12-30 16:57:32 +11:00
Sam Saffron be880d2ac1 DEV: update rubocop
This is a minor update to rubocop, it is fully compatible with our current
set of rules.
2019-12-30 16:54:47 +11:00
dependabot-preview[bot] 0234214533 DEV: Bump stackprof from 0.2.14 to 0.2.15 (#8584)
Bumps [stackprof](https://github.com/tmm1/stackprof) from 0.2.14 to 0.2.15.
- [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.14...v0.2.15)

Very safe change only used for diagnostics.
2019-12-30 16:42:16 +11:00
dependabot-preview[bot] 2d3d7a8f86 DEV: Bump mini_sql from 0.2.2 to 0.2.3 (#8601)
Bumps [mini_sql](https://discourse.org) from 0.2.2 to 0.2.3.

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

Minor update was there mainly for JRuby support should not have any real impact on Discourse.
2019-12-30 16:41:37 +11:00
dependabot-preview[bot] 4989fec1be DEV: Bump sidekiq from 6.0.3 to 6.0.4 (#8611)
Bumps [sidekiq](https://github.com/mperham/sidekiq) from 6.0.3 to 6.0.4.
- [Release notes](https://github.com/mperham/sidekiq/releases)
- [Changelog](https://github.com/mperham/sidekiq/blob/master/Changes.md)
- [Commits](https://github.com/mperham/sidekiq/compare/v6.0.3...v6.0.4)

Minor update which seems very safe.
2019-12-30 16:36:23 +11:00
Krzysztof Kotlarek b725252cd0
FEATURE: Topic admin menu sticks to bottom on mobile. (#8620)
Our current topic admin menu is not always fully visible on a mobile
device, therefore some options are difficult to click.

To solve this issue, we can display the admin menu on the bottom of the
screen on mobile devices.
2019-12-30 08:15:46 +11:00
Joffrey JAFFEUX 041067cc21
FIX: correctly styles pwa consent banner (#8623) 2019-12-29 19:10:35 +01:00
Joffrey JAFFEUX df465ed0be
FIX: allows global_notice site setting to contain html (#8622) 2019-12-29 18:29:41 +01:00
Michael Brown 7200653e16 FIX: cache_critical_dns was erroring without IPAddr
* sometimes cache_critical_dns would error out since "IPAddr" was
  undefined
* sometimes it autoloaded, so no error
2019-12-27 12:39:08 -05:00
Joffrey JAFFEUX 2f37f446f8
FIX: correctlt styles notification-consent-banner (#8621)
TODO: this should be moved to new global notice API
2019-12-27 15:27:12 +01:00
Roman Rizzi 16d97573f9
DEV: Improve support for extending flags. (#8619)
- Ensure that the 'notify_moderators' flag is always the last flag when using custom flags.
- Support passign a custom FlagSettings object when replacing flags to reuse existing ones.
2019-12-27 08:41:50 -03:00
Joffrey JAFFEUX c25b8abd70
FEATURE: allows plugins to add a global notice (#8552)
* FEATURE: allows plugins to add a global notice

Usage:

```
api.addGlobalNotice(id, text, options = {});
```

Options can be:

```
dismissable // Will display a button to hide the notice if true
html // will prepend html to the next if present
level // alert level, will usee css class of alert component
persistentDismiss // if true won't show notice again on reload
onDismiss // execute a custom action on dismiss
visibility // defines custom logic for notice visibility
```

Co-authored-by: Robin Ward <robin.ward@gmail.com>
2019-12-27 09:06:36 +01:00
Arpit Jalan 1820347d58 fix the build (take 2). 2019-12-24 19:27:35 +05:30
Gerhard Schlager 7aea7f2cae FIX: Track correct site setting 2019-12-24 14:11:37 +01:00
Gerhard Schlager 52a59b5811 FIX: English and US date/time formats 2019-12-24 12:17:25 +01:00
Arpit Jalan 49c124a12e fix the build. 2019-12-24 15:56:44 +05:30
Arpit Jalan 2c0574010a FIX: better error message when forum is in read-only mode 2019-12-24 15:49:27 +05:30
Krzysztof Kotlarek 86fb08d04a
Revert "FIX: update normalize css from 3.0.1 to 8.0.1 (#8591)" (#8618)
This reverts commit 16f01d0ddf.
2019-12-24 10:45:42 +11:00
Krzysztof Kotlarek 16f01d0ddf
FIX: update normalize css from 3.0.1 to 8.0.1 (#8591)
Changelog is available here - https://github.com/necolas/normalize.css/blob/master/CHANGELOG.md

I decided that the easiest way to ensure it works would be checking different browsers. It looked good to me on Chrome, Firefox, Edge and IE 11. In addition, I checked 3 random themes.
2019-12-24 08:39:51 +11:00
Krzysztof Kotlarek 9e4fcb1a0a
FIX: Correct description for out of love badge (#8615)
The bug mentioned here
https://meta.discourse.org/t/badge-not-triggering/135896/8

Basically, descriptions for 3 badges: "Out of Love", "Higher Love" and
"Crazy in Love" are granted based on on "max_likes_per_day" and the
description should reflect that.
2019-12-24 08:30:34 +11:00
Krzysztof Kotlarek 8c2e27790c
FIX: everyone can see poll results when on_vote and closed (#8613)
The bug was mentioned here: https://meta.discourse.org/t/poll-name/136436

I added specs to cover existing behaviour and refactored can_see_results method.

Guard condition should apply only if the poll result setting is set to `staff_only`.

In other cases, user can see results when the poll result setting is set to `always` or user voted or poll is closed.
2019-12-24 08:04:35 +11:00
Krzysztof Kotlarek ac626a0dc3
FIX: bug when revoking badge as title (#8616)
When user revokes badge as title, UserHistory item is created. However,
that object is not accepting revoke_reson parameter.
2019-12-24 08:03:51 +11:00
Jeff Wong 63323bd7a8
FIX: category routes model params should decode their URL parts (#8612)
* FIX: category routes model params should decode their URL parts

Ember's route star globbing does not uri decode by default. This is
problematic for subcategory globs with encoded URL site settings enabled.

Subcategories with encoded URLs will 404 without this decode.

I found this https://github.com/tildeio/route-recognizer/pull/91
which explicitly explains that globbing does not decode automatically.
2019-12-23 10:24:41 -08:00
Jeff Wong e36efb1edc FIX: ensure that we encode a slug only once if slug generation method is encoded
This was re-encoding the search slug each loop - if the category list was not
the first category in the list, it'd continually search with a re-encoded search
term from the previous iteration. This results in ember 404ing when navigating
to raw encoded category slugs of the form /c/encoded-slug-with-non-ascii
that have no ID attached.
2019-12-22 00:25:12 -08:00
Jeff Wong eca1c643d5 FEATURE: allow TL3 promotions for overturned penalties
Restore tl3 reachability by calculating penalty counts vs unsuspend/unsilence.

Only count unsuspend or unsilences that have been made by a user other than
the Discourse system user.
2019-12-20 15:25:21 -08:00
Kris 00477d8f88 UX: Some category page style adjustments for sub-sub categories 2019-12-20 16:17:34 -05:00
Mark VanLandingham 6ec3d42b16
FEATURE: Allow complex post params from plugin (#8598) 2019-12-20 10:37:12 -06:00
AlexP11223 1e4a83cc2a FEATURE: add mybb.ru import script (#8609) 2019-12-20 11:10:18 -05:00