Commit Graph

32775 Commits

Author SHA1 Message Date
Sam Saffron b2dc65f953 FIX: on rebakes should not recreate quoted_posts records
Previously every rebake would remove and recreate records in this table
This caused created_at and updated_at to keep changing

Yes, I know the SQL is somewhat complex, but this makes quote extraction
more efficient cause we do everything in 2 round trips.

This also removes some concurrency protection we should no longer need
2019-04-03 16:17:15 +11:00
Guo Xiang Tan 52c4711e80 DEV: Fix method that was incorrectly made private. 2019-04-03 12:37:50 +08:00
Guo Xiang Tan 4037a2fd0b FIX: Restrict scope of old scheme upload migration.
Some sites have external URLs that don't even match `%/uploads/%' and
some sites surprise me with URLs that contains the default path when it
is a site in a multisite cluster. We can't do anything about those.
2019-04-03 11:56:41 +08:00
Guo Xiang Tan 0de2253d55 Run with Ruby 2.6.2 on Travis. 2019-04-03 10:38:09 +08:00
Guo Xiang Tan d151425353
PERF: Delete search data of posts from trashed topics periodically. (#7302)
This keeps both the index and table smaller.
2019-04-03 10:10:41 +08:00
Guo Xiang Tan feb731bffd FIX: Regenerate optimized images instead of migrating from old scheme.
`OptimizedImage.migrate_to_new_scheme` was optimizing optimized images
which we don't need to do. Regnerating the optimized image is way easier.
2019-04-03 09:45:02 +08:00
Kris c3047a903d UX: Reviewable spacing adjustments 2019-04-02 17:22:22 -04:00
Kris 14cbbc5e13 UX: Reviewables fixes 2019-04-02 16:25:53 -04:00
Penar Musaraj 44fe2eec03 Better fix for Safari user card position
Better than a2c6683e3b
2019-04-02 15:36:47 -04:00
Kris ba727b2875 UX: Restructure queued posts to match flags, fix text 2019-04-02 14:54:55 -04:00
Kris 2ab6eb58c5 UX: Reviewable layout improvements 2019-04-02 13:51:03 -04:00
Penar Musaraj 15e27d9e2c Prettier fix 2019-04-02 11:56:21 -04:00
Joffrey JAFFEUX 40e1ba9d9a
FIX: ensures click on emoji in picker doesnt propagate (#7308) 2019-04-02 17:40:13 +02:00
Joffrey JAFFEUX d8dd130477
UX: gives aria-label to topics count in category-row (#7307) 2019-04-02 17:38:21 +02:00
Joffrey JAFFEUX e77b1cf7ff
UX: ensures only <li> are used as top level in breadcrumb (#7306) 2019-04-02 17:37:53 +02:00
venarius c185109380 FIX: Restricted site text better error 2019-04-02 11:16:27 -04:00
Robin Ward 123c05cb07 FIX: category id wasn't stored when enqueueing a topic 2019-04-02 11:12:17 -04:00
David Taylor ef3dd83367 DEV: Remove trailing blank line 2019-04-02 15:49:23 +01:00
David Taylor 02ed5e78e1 DEV: Use parallel-compatible formatter for logging autospec failures
The old method would cause the parallel processes to overwrite each other. The parallel formatter allows multiple processes to write to the same file.
2019-04-02 15:34:30 +01:00
Penar Musaraj a2c6683e3b FIX: inconsistent user card position in Safari
User cards triggered in header were incorrectly positioned in Safari desktop.

Using `position()` instead of `offset()` is more consistent, since header is a fixed element in this scenario.
2019-04-02 10:32:50 -04:00
Robin Ward 6ebadaed2c FIX: Do not allow `invite_only` and `enable_sso` at the same time
This functionality was never supported but before the new review queue
it didn't have any errors. Now the combination of settings is prevented
and existing sites with sso enabled will be migrated to remove invite
only.
2019-04-02 10:26:27 -04:00
Robin Ward af04318aff FIX: Allow us to serialize reviewables with deleted topics 2019-04-02 09:36:49 -04:00
Joffrey JAFFEUX 02d8931425
UX: more compact local-dates preview (#7305) 2019-04-02 14:39:20 +02:00
Arpit Jalan d68d29f37a FIX: only staff can banner topics 2019-04-02 12:46:55 +05:30
Guo Xiang Tan d85240335b Annotate models. 2019-04-02 13:19:14 +08:00
Tim Lange a9a35d2c19 FIX: Uncategorized pm not allowing edit (#7276) 2019-04-02 12:54:53 +08:00
Guo Xiang Tan 4175de5071 UX: Wrap title on search log term page with a proper div.
Search log filter selector was not floating right as it should.
2019-04-02 11:55:57 +08:00
Guo Xiang Tan 1a9452f24d UX: Pass period params when looking at search logs for a given term. 2019-04-02 11:51:41 +08:00
Kris cdce9c97bb minor margin fix 2019-04-01 23:50:47 -04:00
Guo Xiang Tan 6a95d3fded FIX: `UploadRecovery` should look through posts for img src and bbcode. 2019-04-02 11:41:00 +08:00
Guo Xiang Tan 1f9799c979 FIX: Handle more cases in `UploadRecovery`. 2019-04-02 11:29:26 +08:00
Guo Xiang Tan 4b0ac91bfb DEV: Remove duplicated scope.
`.joins(:topic)` will automatically add the `deleted_at IS NULL` scope.
2019-04-02 10:48:17 +08:00
Penar Musaraj 1c0f885a5b FIX: double render error with delegated authentication
Makes sure delegated authentication is checked before other login redirects

Updates specs to cover login_required = true cases
2019-04-01 22:13:53 -04:00
Kris 254de64df7 UX: Consistent profile image positioning on desktop and mobile 2019-04-01 22:04:11 -04:00
Guo Xiang Tan d8704c11ca PERF: Better use of index when queueing a topci for search reindex.
Also move `Search::INDEX_VERSION` to `SearchIndexer` which is where the
version is actually being used.
2019-04-02 09:53:37 +08:00
Kris 9603c906ec Moving staff counters back to the top of profiles 2019-04-01 21:04:37 -04:00
Guo Xiang Tan a2e6a8a51e DEV: Refactor test to assert for actual content.
The other assertion is already asserting for `Post#url` and I think it
makes the test clearer here.
2019-04-02 07:43:13 +08:00
Guo Xiang Tan aa2311a7b0 FIX: Don't reindex posts belonging to a deleted topic for search.
Posts belonging to a deleted topic can't be index for search so we need
to avoid loading those post ids.
2019-04-02 07:36:53 +08:00
Guo Xiang Tan 3fc5dbb045 FIX: Don't attempt to reindex posts that have an empty raw.
If the post ids keep loading, we might end up in a situations where
we're always loading the same post ids over and over again without
indexing anything new.

Follow up to daeda80ada.
2019-04-02 07:13:33 +08:00
Robin Ward d5a61ab167 FIX: Don't log a second pending action
If two people flagged the same post you'd get a "Pending" history event
logged which looked bad.
2019-04-01 17:07:47 -04:00
Robin Ward 76669bb5a6 FIX: Don't refer to pending review items as flags
They could be queued posts or users, and the notice should reflect that
properly.
2019-04-01 14:46:56 -04:00
Robin Ward 6470c85fda UX: Link directly to the post, not to the topic 2019-04-01 14:29:14 -04:00
Penar Musaraj fdf4145d4b
FEATURE: Delegated authentication via user api keys (#7272) 2019-04-01 13:18:53 -04:00
David Taylor 25feb287b8 DEV: Add parallel spec support to autospec
Set PARALLEL_SPEC=1 to use this functionality
2019-04-01 11:06:47 -04:00
David Taylor b375dcb14a DEV: Introduce parallel rspec testing
Adds the parallel_tests gem, and redis/postgres configuration for running rspec tests in parallel. To use:

```
rake parallel:rake[db:create]
rake parallel:rake[db:migrate]
rake parallel:spec
```

This brings the test suite from 12m20s to 3m11s on my macOS machine
2019-04-01 11:06:47 -04:00
Joffrey JAFFEUX 13a6a04cad
FIX: ensures popover is hidden when changing route (#7300) 2019-04-01 16:23:57 +02:00
Joffrey JAFFEUX 4b1b135ede
FIX: handles boolean with popupMenuOption (#7299)
Handle the case of https://github.com/discourse/DiscoTOC doing this kind of setup:

```
return {
    action: "insertDtoc",
    icon: "align-left",
    label: themePrefix("insert_table_of_contents"),
    condition: !composerController.get("model.canCategorize")
  };
```

In this case there's no function to call, it's already set.
2019-04-01 16:08:14 +02:00
Régis Hanol a6596662dc FIX: don't enqueue TruncateUserFlagStats job when not needed 2019-04-01 15:53:55 +02:00
Joffrey JAFFEUX 6e0e36f790
fix spec (#7298) 2019-04-01 14:35:09 +02:00
Régis Hanol 2b721dff57 FIX: whitelist 'feGaussianBlur' and 'filter' svg elements 2019-04-01 12:56:47 +02:00