Commit Graph

37093 Commits

Author SHA1 Message Date
Jarek Radosz c1c211365a
FIX: Improve clearing store cache (#9568)
1. Shorter
2. Simpler
3. Doesn't depend on external binaries
4. Doesn't fail on large amounts of files
5. Hopefully eliminates flaky spec errors
2020-04-28 17:24:04 +02:00
Penar Musaraj ec2943c5bc
DEV: Update jquery.fileupload and dependencies (#9466) 2020-04-28 10:39:29 -04:00
Joffrey JAFFEUX 4b57eb7049
FIX: published pages couldn't be routed from inside discourse (#9569)
This will allow to post a link to published page in a post. Before this, users clicking this link would have seen a 404.

ATM /pub is server sider only.
2020-04-28 16:37:56 +02:00
Robin Ward c1cc2f2a05
DEV: Remove ember-addons (#9559)
We weren't using this very much and introduces a dependency between
discourse-common and discourse which makes moving to yarn workspaces
more difficult.

In the future we might user ember-addons properly but for now it's
easier to move the code into discourse-common.

Note the old folder is still there because at least one plugin was still
requiring the old files. It will be removed in the future.
2020-04-28 10:14:49 -04:00
David Taylor 84be92c067
FIX: Avoid exception when rendering a poll in a trashed post
Maintain the poll belongs_to post relation when a post is trashed
2020-04-28 14:43:09 +01:00
David Taylor ba616ffb50
DEV: Use a tmp directory for storing uploads in tests (#9554)
This avoids development-mode upload files from polluting the test environment
2020-04-28 14:03:04 +01:00
Gerhard Schlager 7177b9d771 UX: Translating poll chart types wasn't possible 2020-04-28 14:29:42 +02:00
Arpit Jalan 198856f78d DEV: annotate models 2020-04-28 15:59:39 +05:30
Sam Saffron 6b62d75c50
FIX: remove unsuppored rake task
rebuilding user_actions is not something that should be done.

Plugins such as solved and assigned extend it, there are tons of
little rules that were not captured in `user_actions:rebuild`
2020-04-28 16:27:42 +10:00
Martin Brennan 5108cf8ddf
FIX: Topic user bookmarked column logic was not correct (#9563)
Make sure the topic_user.bookmarked column is set correctly when user bookmarks/unbookmarks any post in a topic. For example, you bookmarked a post in the topic that was not the OP, the bookmark icon in the topic list would not be shown. Same if deleting a bookmark for the last bookmarked post in a topic, the bookmark icon in the topic list would not be removed.

Previously this was only setting it to true if bookmarking the OP/topic, which was not correct -- we want to show the icon on the topic list if any post is bookmarked.
Also set to false if unbookmarking the last bookmarked post in the topic.
Also in this PR is a migration to correct any out of sync topic_user.bookmarked columns, based on the new logic.
2020-04-28 16:19:25 +10:00
mentalstring 67f3fe14aa
FEATURE: support SSO website and location overrides
Add location and website + the ability to override using SSO using the `sso_overrides_location` and `sso_overrides_website` site settings.
2020-04-28 16:06:35 +10:00
Joffrey JAFFEUX 23ff071ebd
FIX: currentUser might be undefined (#9555) 2020-04-28 15:55:06 +10:00
dependabot-preview[bot] d3dc8fc1b3
DEV: Bump message_bus from 3.0.0 to 3.1.0 (#9565)
Bumps [message_bus](https://github.com/SamSaffron/message_bus) from 3.0.0 to 3.1.0.
- [Release notes](https://github.com/SamSaffron/message_bus/releases)
- [Changelog](https://github.com/discourse/message_bus/blob/master/CHANGELOG)
- [Commits](https://github.com/SamSaffron/message_bus/compare/v3.0.0...v3.1.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>

Very safe change introduces new API needed for message filtering. 

7fad5a3e7d
2020-04-28 15:46:40 +10:00
Kris 82c5d85e99 add btn-default class to show-tag-info button 2020-04-27 23:29:28 -04:00
Martin Brennan 66b5b8cf29
FIX: Local time not updating between user cards (#9564)
The local time was not updating between user cards because the computed property was not used correctly.

There's an old saying in Tennessee — I know it's in Texas, probably in Tennessee — that says, fool me once computed properties, shame on — shame on you. Fool me — you can't get fooled again.
2020-04-28 13:23:43 +10:00
Kris f9a44488e9 UX: Right align notification item time, adjust mobile space, consolodate 2020-04-27 23:19:15 -04:00
Kris dcb40a92c7 Add discovery-below outlet to tag pages too 2020-04-27 22:49:11 -04:00
Kris c679c8008c Remove additional wrapper, follow-up to d516a88 2020-04-27 22:13:31 -04:00
Penar Musaraj a70ca3a72a UX: Better spacing for composer toggle buttons on mobile 2020-04-27 22:04:29 -04:00
Penar Musaraj b1d30d7f05 FIX: keep scroll position when minimizing composer in iOS 2020-04-27 22:03:56 -04:00
Joffrey JAFFEUX ad978b93ab
FIX: Correctly shows no bookmark message (#9548) 2020-04-28 11:19:35 +10:00
Joffrey JAFFEUX 2c6d6dfd05
FIX: Improves bookmark shortcut reliability and other minor issues (#9547)
This commit reworks slightly the `toggleBookmark` and `toggleBookmarkTopic` functions.

- Pressing [f] (toggleBookmarkTopic)
  - a topic list item is selected, we attempt to toggle the related topic
  - a post is selected, we bookmark the current topic
  - nothing is selected, if there's a currentTopic we bookmark it

- Pressing [b] (toggleBookmark)
  - a post is selected, we bookmark it
  - a topic list item is selected, we attempt to toggle the related topic
  - nothing is selected, if there's a currentTopic we bookmark it

Note this, commit also reduces jquery usage, a bug where the [f] shortcut was propagated to the modal input, and fixes bug when bookmarking a topic list item on the front page and the firstPost couldn't be found.
2020-04-28 10:32:59 +10:00
Martin Brennan bb4e965a66
FEATURE: Optionally show local time for user in card (#9527)
This adds a site setting (default off) to optionally show a user's local time and timezone in their user card. For example, I live in Brisbane, and if at 3:30PM my time I were to open a user who lives in California's card I would see 22:30 (PST).
2020-04-28 10:13:59 +10:00
Blake Erickson a93ef2926d
DEV: Add rswag to aid in api documention (#9546)
Adding in rswag will allow us to write spec files to document and test
our api.
2020-04-27 16:40:07 -06:00
Mark VanLandingham 051e6be7b8
DEV: Trigger 'user_added_to_group' when accepting invite with groups (#9561) 2020-04-27 15:13:34 -05:00
dependabot-preview[bot] e92a54f681
Build(deps): Bump aws-sigv4 from 1.1.2 to 1.1.3 (#9560)
Bumps [aws-sigv4](https://github.com/aws/aws-sdk-ruby) from 1.1.2 to 1.1.3.
- [Release notes](https://github.com/aws/aws-sdk-ruby/releases)
- [Changelog](https://github.com/aws/aws-sdk-ruby/blob/master/gems/aws-sigv4/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-ruby/compare/1.1.2...1.1.3)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-27 16:08:31 -04:00
Joffrey JAFFEUX 01f2819dde
DEV: enables and fixes multisite-spec (#9557) 2020-04-27 20:55:36 +02:00
Robin Ward d38b2e508e Ignore files that will be used with Ember CLI 2020-04-27 14:37:07 -04:00
Roman Rizzi 394babcae3
FIX: Only show the review page to users that can see it. Do not publish the reviewable count update message to everyone. (#9556) 2020-04-27 14:51:25 -03:00
Mark VanLandingham d8c884a856
DEV: Add has_many category_tag_stats in tag.rb (#9558) 2020-04-27 12:42:13 -05:00
Robin Ward 056327c0c9
DEV: Move `discourse.js` to `app/app.js` (#9545)
This is another thing to get our application in line with what Ember CLI
expects.
2020-04-27 13:28:10 -04:00
dependabot-preview[bot] f15fc0ebf3
Build(deps): Bump unicorn from 5.5.4 to 5.5.5 (#9552)
Bumps [unicorn](https://yhbt.net/unicorn/) from 5.5.4 to 5.5.5.

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-27 12:50:03 -04:00
Jarek Radosz fb20b57057
DEV: Re-enable "remove featured link" test (#9550)
It was disabled in ac4b4e30dc
2020-04-27 17:54:07 +02:00
David Taylor f95609ae23
FIX: Add additional checks for automatic theme script CSP
- Skip absolute URLs
- Skip CDN URLs
- Skip invalid URLs
- Properly format protocol-less URLs
2020-04-27 15:56:29 +01:00
Benno 6e01acb3cb
FIX: Apply category priority for empty query (#9516) 2020-04-27 10:35:27 -04:00
Arpit Jalan ec84b00aff fix the build. 2020-04-27 11:57:10 +05:30
Arpit Jalan 4c3a01f58d FIX: use absolute URL for YouTube thumbnail images. 2020-04-27 11:43:31 +05:30
Guo Xiang Tan 76fc48b318
DEV: Avoid an additional query in `SpamHandler`.
* Also run query against human users only
2020-04-27 13:03:57 +08:00
Guo Xiang Tan e0725fd123 Upgrade message_bus to 3.0.0
Fixes an issue where specifying `group_ids` and `user_ids` while
publishing a message would result in an intersection between both
options.
2020-04-27 12:45:23 +08:00
Guo Xiang Tan 16f0d1c503
PERF: Remove database query when publishing to staff users. 2020-04-27 11:50:21 +08:00
Jarek Radosz e0aec23844 DEV: Don't warn about valid data 2020-04-26 22:18:44 +02:00
Dan Ungureanu 0ae504aece
FIX: Raise a 4xx error instead of a 5xx if draft data is invalid 2020-04-25 11:47:22 +03:00
Sam Saffron 3de901e38d
DEV: correct missing file from revert
Test did not revert cleanly. Corrected.
2020-04-25 13:29:45 +10:00
Sam Saffron 8c1e008c59
DEV: Skip erratic spec for now
Spec fails intermittently due to CDN state.
2020-04-25 13:20:04 +10:00
Sam Saffron 1f6eaf26a1
Revert "UX: replace closed topic icon with discourse-no-entry"
This reverts commit 040b8c00a4.

We decided to keep status quo for now
2020-04-25 13:12:56 +10:00
Kris d516a88b4c DEV: add tag name class to body of tag pages 2020-04-24 22:27:25 -04:00
Kris 67429335d5 Remove SASS spacing function 2020-04-24 19:32:02 -04:00
Kris 040b8c00a4 UX: replace closed topic icon with discourse-no-entry 2020-04-24 17:31:34 -04:00
Jeff Wong e638d43f0a
FEATURE: dismiss first notification on click anywhere (#9525)
FEATURE: dismiss first notification on click anywhere

Quicker jumpstart for those already familiar with the platform:

Allow dismissal of first notification mask from any click.
On the dismissal click, we also need to send a "yes I saw it" confirmation
by grabbing a batch of notifications. This prevents the dialog from appearing
again on refresh, or other browsers and ensures we only see it once.
2020-04-24 13:27:54 -07:00
dependabot-preview[bot] 94d753ad16
Build(deps-dev): Bump better_errors from 2.6.0 to 2.7.0 (#9544)
Bumps [better_errors](https://github.com/BetterErrors/better_errors) from 2.6.0 to 2.7.0.
- [Release notes](https://github.com/BetterErrors/better_errors/releases)
- [Commits](https://github.com/BetterErrors/better_errors/compare/v2.6.0...v2.7.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-24 14:22:05 -04:00