Commit Graph
100 Commits
Author SHA1 Message Date
Dan Ungureanu ef68e11137 FIX: Check if invite has expired before showing it (#10581) 2020-09-02 13:24:49 +03:00
Dan Ungureanu 38c9c87128 FIX: Add to tags result set only visible tags (#10580) 2020-09-02 13:24:40 +03:00
Dan Ungureanu 5e2e374c72 DEV: Fix build
Follow-up to bd3c0dd59f.
2020-07-30 13:10:16 +03:00
Dan Ungureanu bd3c0dd59f FEATURE: Show login button on error page if user is not logged in 2020-07-30 12:34:34 +03:00
Dan Ungureanu cf02c518b9 DEV: Merge category and tag hashtags code paths (#10216)
Category and tag hashtags used to be handled differently even though
most of the code was very similar. This design was the root cause of
multiple issues related to hashtags.

This commit reduces the number of requests (just one and debounced
better), removes the use of CSS classes which marked resolved hashtags,
simplifies a lot of the code as there is a single source of truth and
previous race condition fixes are now useless.

It also includes a very minor security fix which let unauthorized users
to guess hidden tags.
2020-07-13 19:13:17 +03:00
Dan UngureanuandJoffrey JAFFEUX c72bc27888 FEATURE: Implement support for IMAP and SMTP email protocols. (#8301)
Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2020-07-10 12:05:55 +03:00
Dan Ungureanu e88b17c044 FIX: Sync client and server side behavior for category hashtag lookup
Category.query_from_hashtag_slug is the only source of truth.
2020-07-10 10:45:39 +03:00
Dan Ungureanu 57d46694c5 DEV: Fix flaky test 2020-07-07 17:10:24 +03:00
Dan Ungureanu 333d4f9a98 FIX: Redirect user to the URL with the correct category slug (#10167)
This commit implements a category redirect similar to the one for topic
URLs with wrong slug.
2020-07-07 15:25:36 +03:00
Dan Ungureanu 556f7dc9c0 FIX: Fix race condition when resolving tag and category hashtags (#10153)
* FIX: Fix race condition when resolving tag and category hashtags

If the category hashtags were resolved first and then tag hashtags, then
the tags would overwrite the categories. Similarly, if the category
hashtags were resolved last it would overwrite even hashtags which ended
with '::tag'.

* DEV: Add test

* DEV: Fix test
2020-07-07 10:20:51 +10:00
Dan Ungureanu e08b860e88 FIX: Improve category hashtag lookup (#10133)
* FIX: Improve category hashtag lookup

This commit improves support for sub-sub-categories and does not include
the ID of the category in the slug, which fixes the composer preview.

* FIX: Sub-sub-categories can be mentioned using only two levels

* FIX: Remove support for three-level hashtags

* DEV: Simplify code
2020-07-07 10:19:01 +10:00
Dan Ungureanu fc4d74870c UX: Add Login button on 403 error page if user is not logged in (#10154) 2020-07-01 18:27:42 +03:00
Dan Ungureanu fe284ffd06 Revert "DEV: Remove useless code (#10130)"
Some oneboxes still generate empty P tags (video oneboxes).

This reverts commit c299d02287.
2020-06-29 13:56:28 +03:00
Dan Ungureanu c299d02287 DEV: Remove useless code (#10130)
protection is not needed and can easily be bypassed with empty divs anyway.
2020-06-29 17:49:30 +10:00
Dan Ungureanu 4efc126635 FIX: Serialize an empty array if no suggested topics exist (#10134)
It used to return nil, which was ambiguous (empty vs absent
result).
2020-06-26 22:25:38 +03:00
Dan Ungureanu 2e1efbde52 FIX: Pass local scope variable to inner function 2020-06-22 19:23:59 +03:00
Dan Ungureanu d21a08c284 DEV: Deprecate Category#url_with_id in favor of Category#url (#9972) 2020-06-18 11:32:14 +03:00
Dan Ungureanu 62faa0f5fe FIX: Do not show Add or Change buttons if email is not editable (#10068) 2020-06-18 11:15:44 +03:00
Dan Ungureanu 79ab1493c8 DEV: Add test (#10066)
Follow-up-to f1b97202d4
2020-06-17 21:41:29 +03:00
Dan Ungureanu 7ed7b1ef64 DEV: Add test (#10064)
Follow-up-to 84dfaad137
2020-06-17 21:41:16 +03:00
Dan Ungureanu a60a67c431 FIX: Show unconfirmed emails too when checking emails (#10062)
When checking emails through user preferences, it did not display the
unconfirmed emails.
2020-06-17 21:41:01 +03:00
Dan Ungureanu f1b97202d4 FIX: Ensure users can confirm new emails using security keys 2020-06-16 14:19:21 +03:00
Dan Ungureanu 84dfaad137 FIX: Fill acting_user field instead of target_user in history 2020-06-16 13:30:58 +03:00
Dan Ungureanu 219bb0b6a7 DEV: Fix build
Follow-up to 6258406419.
2020-06-16 13:00:09 +03:00
Dan Ungureanu 111877db1f FIX: Load I18n first in show_confirm_new_email page 2020-06-12 14:49:16 +03:00
Dan Ungureanu b7e70850e4 FIX: Allow users to add emails which were deleted before 2020-06-11 14:54:11 +03:00
Dan Ungureanu 5bfe1ee4f1 FEATURE: Improve UX support for multiple email addresses (#9691) 2020-06-10 19:11:49 +03:00
Dan Ungureanu 3a7ca97c36 FIX: Use include-subcategories filter in report export (#10007)
Some filters were renamed and the conversion of the filter names and arguments
was removed.
2020-06-10 18:57:39 +03:00
Dan Ungureanu ef3e3077d0 FIX: Staff users can bypass tag validation rule (#9924) 2020-06-02 16:11:25 +10:00
Dan Ungureanu 570b12a903 FEATURE: Show a detailed 404 page for private topics (#9894) 2020-05-27 20:10:01 +03:00
Dan Ungureanu 05ca0c908f FIX: GroupArchivedMessage belongs to Group, not User 2020-05-19 14:13:28 +03:00
Dan Ungureanu 3ed6a0e904 FIX: Detect Wayback Machine using user agent (#9777) 2020-05-14 21:10:07 +10:00
Dan Ungureanu 321879a619 FIX: Load locale first in wizard app 2020-05-14 11:48:55 +03:00
Dan Ungureanu b80128a973 FEATURE: Add structured data to follow Google's guidelines (#9764)
All Schema.org properties are optional, but Google has a set of
properties which are required.
2020-05-14 10:42:01 +03:00
Dan Ungureanu 141f16eb6b FIX: Multiple schema.org improvements
* Do not show "Uncategorized" category in topics list.
* Use "BreadcrumbList" only if topic is in a category.
* Add tags list as keywords to the first post.
* Add "dateModified" even if it is the same with "datePublished".
* Show "crawler-linkback-list" only if there are links to be shown.
2020-05-11 20:38:49 +03:00
Dan Ungureanu 1019789d1a FIX: Resolve Schema.org validation issues 2020-05-05 16:57:16 +03:00
Dan Ungureanu fe51f7a863 FEATURE: More improvements to crawler and old browsers view
Related to c85018cdfd.
2020-04-30 12:07:51 +03:00
Dan Ungureanu 238cbff46f Revert "HACK: Add dummy plugin folder"
This reverts commit 590830b931 because a
proper fix was implemented in discourse_docker@d587158.
2020-04-30 11:02:15 +03:00
Dan Ungureanu 590830b931 HACK: Add dummy plugin folder
On some installations, there may be a leftover symlink which uses the
old plugin name:

  public/plugins/discourse-internet-explorer ->
  -> plugins/discourse-internet-explorer/public
2020-04-29 23:18:57 +03:00
Dan Ungureanu c85018cdfd Improve support for old browsers (#9515)
* FEATURE: Improve crawler view

* FIX: Make lazyYT crawler-friendly

* DEV: Rename discourse-internet-explorer to discourse-unsupported-browser

* DEV: Detect more unsupported browsers

Follow-up to 4eebbd2212.

* FIX: Hide browser update notice in print view
2020-04-29 21:40:21 +03:00
Dan Ungureanu 402194f313 FIX: Enter selected link with 'o' on full page search
Follow-up to 70012f2027.
2020-04-29 21:25:59 +03:00
Dan Ungureanu 7a946b9f5c DEV: Fix typo
Follow-up to 0a85a7aef9.
2020-04-29 12:38:57 +03:00
Dan Ungureanu 0a85a7aef9 FEATURE: Add user_profile to user_archive CSV export (#9571) 2020-04-29 12:09:50 +03: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
Dan Ungureanu 4e5f9d4cd1 DEV: Drop 'key' column from user_api_keys (#9388) 2020-04-22 12:13:19 +03:00
Dan Ungureanu e733701887 FEATURE: Make report filters reusable (#9444)
This commit also adds 'include subcategories' report filter
2020-04-22 11:52:50 +03:00
Dan Ungureanu 799ddeea3c FIX: Include subcategories in 'posts' report (#9410) 2020-04-13 18:57:52 +03:00
Dan Ungureanu 3d9c320aab PERF: Cache Category.subcategory_ids (#9350)
Also reset category cache after backup restore.
2020-04-09 15:42:24 +03:00
Dan Ungureanu 1cd8c6ce4c FIX: Detect more unsupported browsers 2020-04-09 11:47:59 +03:00
Dan Ungureanu 73d71e3fee FEATURE: Show noscript view to unsupported browsers (#9373) 2020-04-08 20:24:18 +03:00
Dan Ungureanu b64b590cfb FIX: Add index on user_api_keys.key_hash (#9387) 2020-04-08 19:49:18 +03:00
Dan Ungureanu 2e8f54e9ee DEV: Fix build
Follow up to 0653750fbf.
2020-04-07 17:10:05 +03:00
Dan Ungureanu 0653750fbf FEATURE: Hash user API keys in the database (#9344)
The 'key' column will be dropped in a future commit.
2020-04-07 16:42:52 +03:00
Dan Ungureanu f8ec5f309a FIX: Ensure category_id is an integer 2020-04-04 14:20:01 +03:00
Dan Ungureanu b9d411a4eb FIX: Topic.time_to_first_response should include sub-sub-categories (#9349) 2020-04-04 13:31:34 +03:00
Dan Ungureanu 3ae26c6c59 FEATURE: List search menu shortcuts in instructions modal (#9273) 2020-03-25 17:11:33 +02:00
Dan Ungureanu 49395ec577 FIX: Fix image optimization pipeline (#9257)
* FIX: Do not use original filename to extract the original filename

Prefer extracting filename from the destination path, which is build
using extracted image information.

* UX: Show better error images
2020-03-25 12:59:16 +02:00
Dan Ungureanu 70012f2027 FEATURE: Navigate through search results using J/K (#9264) 2020-03-25 15:45:35 +11:00
Dan Ungureanu 5715f0ad01 UX: Hotkey K can select partial posts
When no post is selected, K selects first partial post and J selects
first full post.
2020-03-23 14:05:29 +02:00
Dan Ungureanu 1393950dbc FIX: Improve HTML to Markdown conversion (#9231)
This commit ensures that whitespaces are preserved in <pre>, but removed
inside text paragraphs.
2020-03-18 19:31:10 +02:00
Dan Ungureanu 0754c7c404 FIX: Various fixes to support posts with no user (#8877)
* Do not grant badges for posts with no user
* Ensure instructions are correct in Change Owner modal
* Hide user-dependent actions from posts with no user
* Make PostRevisor work with posts with no user
* Ensure posts with no user can be deleted
* discourse-narrative-bot should ignore posts with no user
* Skip TopicLink creation for posts with no user
2020-03-11 14:03:20 +02:00
Dan Ungureanu c62d5b139b FIX: Allow users to create polls in PMs with non human users (#9055) 2020-03-02 14:29:40 -05:00
Dan Ungureanu 8cbb6e35cb DEV: Fix build
Follow up to 60184a290c.
2020-02-28 11:31:04 +02:00
Dan Ungureanu 60184a290c FIX: Sync preload key format for category topic lists
The server and client used two different formats for preload keys. The
server was using 'topic_list_c/SLUG/l/latest', but the client was using
'topic_list_c/SLUG/ID/l/latest'.

This commit is an addition to 374534f00e.
2020-02-28 11:10:03 +02:00
Dan Ungureanu d461772661 FIX: Skip poll tutorial if user cannot create polls (#9058) 2020-02-27 16:01:59 +02:00
Dan Ungureanu 60908a94ec FIX: Skip 'invited' small action if user is in an invited group (#9056)
Inviting a user that is already invited through a group used to generate
a small action and a notification. This commit skips that small action.
2020-02-27 14:45:20 +02:00
Dan Ungureanu 3568f296a3 FIX: Another attempt at fixing reviewable claiming
Follow-up to 9314751e5c.
2020-02-26 10:46:10 +02:00
Dan Ungureanu 9314751e5c FIX: Claim reviewable button did not show up for all topics
Follow-up to 514c22e64b.
2020-02-26 10:36:35 +02:00
Dan Ungureanu 514c22e64b FIX: Make reviewable claiming work with deleted topics (#9040)
This fixes the case when the reviewed topic is deleted (for example, in
discourse-akismet).
2020-02-25 15:49:23 +02:00
Dan Ungureanu 5905930c32 FIX: Sync Ember and non-Ember layouts (#9028) 2020-02-25 15:31:04 +02:00
Dan Ungureanu 533495169e FEATURE: Publish a message when reviewable claimer changes (#9019)
This commit ensures that all users are kept in sync and no user can claim
a topic that has been claimed already.
2020-02-21 19:11:50 +02:00
Dan Ungureanu cf0c6d5761 FIX: Ensure web hooks are retried at most 5 times 2020-02-21 17:02:40 +02:00
Dan Ungureanu 20b90afad9 FIX: Remove broken error dismiss button 2020-02-19 23:03:52 +02:00
fd1e04ba0a UX: Improve small buttons appearance (#8990)
Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
Co-authored-by: Kris  <kris.aubuchon@discourse.org>
2020-02-19 12:38:46 -05:00
66893c020f FIX: Use 'hostname' when Discourse.os_hostname is not available
This may be the case when DiscourseLogstashLogger is initialized before
the application (see unicorn.conf.rb)

This commit is a follow-up to 28292d2759.

Co-authored-by: David Taylor <david@taylorhq.com>
Co-authored-by: Sam Saffron <sam.saffron@gmail.com>
2020-02-18 13:37:39 +02:00
Dan Ungureanu 59db2811b0 FIX: Disable poll options if user groups do not allow them (#8987) 2020-02-18 12:13:19 +02:00
Dan Ungureanu 82b307cd52 FIX: Use correct translation string 2020-02-17 13:49:43 +02:00
Dan Ungureanu 8eae7d2799 DEV: Improve code readability (#8967)
Follow-up to b0f72ca1 and 8e27fa1b.
2020-02-14 13:05:52 +02:00
Dan Ungureanu 09edde8ef7 DEV: Add test (#8961)
Follow-up to 67c9940d72.
2020-02-14 10:19:57 +02:00
Dan Ungureanu 9aeb9f0ca1 DEV: Add test (#8960)
Follow-up to 3ad07aacfa.
2020-02-14 10:19:40 +02:00
Dan Ungureanu 82c84c5141 PERF: Memoize PostRevisor#diff_size (#8939)
Although this method is usually called twice, its execution can take
about 1s.
2020-02-12 19:47:48 +02:00
Dan Ungureanu 8e27fa1bd8 PERF: Optimize post editing
Reordering the conditions reduced the execution time by a factor of 5.
2020-02-12 15:53:28 +02:00
Dan Ungureanu 67c9940d72 FIX: Avoid highlight mention to groups that are not public.
Follow-up to 3f50481188.
2020-02-12 13:04:40 +02:00
Dan Ungureanu ec40242b5c FIX: Make inline oneboxes work with secured topics in secured contexts (#8895) 2020-02-12 12:11:28 +02:00
Dan Ungureanu 3f50481188 Improvements to group mentions (#8927)
* FIX: Avoid highlight mention to groups that are not public
* UX: Composer autocomplete will suggest all visible group names
2020-02-12 10:11:10 +02:00
Dan Ungureanu ecaf2c2f4e FIX: Make category slug validation less strict (#8915)
This was changed recently and caused issues saving old categories which
already had digits at the beginning of the slug (for example, '30-days').
2020-02-11 17:01:12 +02:00
Dan Ungureanu 478c095e5c DEV: Set commit.gpgsign=false for test Git repos (#8891) 2020-02-10 17:34:00 +11:00
Dan Ungureanu 2a884e25be DEV: Make image resize controls more resilient (#8867)
Commit aa24be1 made it possible to build data attributes from image's
Markdown and this changes ensure that the resize controls still work
when data attributes are present.
2020-02-06 17:19:24 +02:00
Dan Ungureanu c5e3faac00 FIX: Recovered posts with no user will be taken over by system user (#8834) 2020-02-06 10:19:04 +02:00
Dan Ungureanu 2240b1681b FIX: Show detailed error messages for category pages. (#8832) 2020-02-06 15:32:12 +11:00
Dan Ungureanu a2f8ac9aac FIX: Check parameter types
/u/is_local_username used to throw a 500 error
2020-02-03 12:36:08 +02:00
Dan Ungureanu 62b9a432bd FIX: Import sub-sub-categories (#8810)
This should make the importer more resilient to incomplete or damaged
backups. It will disable some validations and attempt to automatically
repair category permissions before importing.
2020-01-30 18:46:33 +02:00
Dan Ungureanu e470b27b41 FIX: Ensure 'unless' helper resolves variable name once (#8820)
This fixes a bug which caused '{{#unless var}}' to act the same as
'{{#if true}}' because 'unless' was transforming the conditional value
to 'undefined'.
2020-01-30 18:41:39 +02:00
Dan Ungureanu bf50087d72 Revert "FIX: Create post notices only for public posts (#8708)"
This reverts commit c2d051315d.
2020-01-30 14:26:08 +02:00
Dan Ungureanu 09e8be3209 UX: Introduce automatic 'categories topics' setting (#8804)
When 'categories topics' setting is set to 0, the system will
automatically try to find a value to keep the two columns (categories
and topics) symmetrical.

The value is computed as 1.5x the number of top level categories and at
least 5 topics will always be returned.
2020-01-29 20:30:48 +02:00
Dan Ungureanu 5060811464 FIX: Export all category names in user archives (#8790) 2020-01-28 12:52:07 +02:00
Dan Ungureanu 6e8a1ac09a DEV: Add test for categories_breadcrumb (#8791) 2020-01-28 12:50:27 +02:00
Dan Ungureanu 6279d0e8b5 UX: Use '-' as default category slug (#8607)
This replaces the default slug from 'ID-category' to '-'.
2020-01-23 15:44:29 +01:00
Dan Ungureanu c7a8bbd6a5 FIX: Show category list on subcategory page if it has subcategories too (#8768)
The category list was displayed only for top level categories, which
had no parent.
2020-01-22 20:27:30 +02:00
Dan Ungureanu b25d9e96c1 FIX: Show all parent categories on topic page (#8767) 2020-01-22 17:39:50 +02:00