Commit Graph

22956 Commits

Author SHA1 Message Date
Guo Xiang Tan 3b08b15855
PERF: Remove one extra call to Redis when searching. 2020-08-04 14:02:02 +08:00
Martin Brennan 5a3494b1e1
FIX: IMAP archive fix and group list mailbox code unification (#10355)
* Fixed an issue I introduced in the last PR where I am just archiving everything regardless of whether it is actually archived in Discourse man_facepalming
* Refactor group list_mailboxes IMAP code to use providers, add specs, and add provider code to get the correct prodivder
2020-08-04 14:19:57 +10:00
Penar Musaraj c937afc75e
FEATURE: automatic dark mode (#10341)
A first step to adding automatic dark mode color scheme switching. Adds a new SCSS file at `color_definitions.scss` that serves to output all SCSS color variables as CSS custom properties. And replaces all SCSS color variables with the new CSS custom properties throughout the stylesheets. 

This is an alpha feature at this point, can only be enabled via console using the `default_dark_mode_color_scheme_id` site setting.
2020-08-03 22:57:10 -04:00
Sam Saffron eb18f91cf7
DEV: new api to iterate through tracked topics
`topicTrackingState.forEachTracked(topic,isNew,isUnread)` can be used to
iterate through tracking state efficiently.

This is handy for extension looking at subsets of tags and categories.
2020-08-04 10:40:03 +10:00
Kris 5e46ec8b76 width fix for category chooser in move posts modal 2020-08-03 17:44:11 -04:00
Penar Musaraj 52b864facf
FIX: bug with sharing when used outside a topic
Followup to ac76bfb, fixes share buttons in topic lists (only used in themes or plugins)
2020-08-03 16:27:11 -04:00
Bianca Nenciu 2682da81ad
FIX: Get correct selectable avatar from URL (#10339)
The URL for selectable avatars was 'cooked' which means that the find_by
method was not enough.
2020-08-03 17:15:41 +03:00
Penar Musaraj e6349685d3
UX: Uniform focus styles for composer inputs/textarea (#10296)
Uses a thin border as indicator that element is in focus for all editable items in the composer (inputs, select kit, textarea).

 Disables a default iOS style that has a blinking background color on inputs/textareas
2020-08-03 10:01:04 -04:00
Gerhard Schlager 957e851ffe Revert "FIX: Regularly reset unknown extension of uploads"
This reverts commit cc7b24b88b as it shouldn't be needed anymore for new uploads.
2020-08-03 13:37:32 +02:00
Joffrey JAFFEUX eb61916e23
UX: allows to navigate widget dropdown with tab and enter (#10356) 2020-08-03 10:37:30 +02:00
Bianca Nenciu 12913a46e4
FIX: Reset max_posts query parameter (#10334) 2020-08-03 11:19:36 +03:00
Penar Musaraj ac76bfb400
Disable social media sharing on private categories, unlisted topics (#10349)
* Do not show social media sharing on private categories, unlisted topics

* Disable quote sharing entirely in private categories and unlisted topics
2020-08-03 17:06:09 +10:00
Blake Erickson 4dae9d458b
FIX: Respect query params for latest.rss (#10350)
Apparently latest.json and latest.rss are not routed to the same
controller methods. This change allows for any passed in query
parameters to actually be applied to the rss route.

This came in as a request on meta:

https://meta.discourse.org/t/-/155812/6
2020-08-03 17:03:58 +10:00
Krzysztof Kotlarek 515699776b
FIX: set mailing_list_mode to false when unsubscribing from all (#10354)
Currently, we only reset `email_digests`, `email_level` and `email_messages_level` when the user wants to unsubscribe from all email.

`mailing_list_mode` should be reset as well
2020-08-03 16:59:54 +10:00
Martin Brennan 2920988b3a
FIX: IMAP sync email update uniqueness across groups and minor improvements (#10332)
Adds a imap_group_id column to IncomingEmail to deal with an issue where we were trying to update emails in the mailbox, calling IncomingEmail.where(imap_sync: true). However UID and UIDVALIDITY could be the same across accounts. So if group A used IMAP details for Gmail account A, and group B used IMAP details for Gmail account B, and both tried to sync changes to an email with UID of 3 (e.g. changing Labels), one account could affect the other. This even applied to Archiving!

Also in this PR:

* Fix error occurring if we do a uid_fetch and no emails are returned
* Allow for creating labels within the target mailbox (previously we would not do this, only use existing labels)
* Improve consistency for log messages
* Add specs for generic IMAP provider (Gmail specs still to come)
* Add custom archiving support for Gmail
* Only use Message-ID for uniqueness of IncomingEmail if it was generated by us
* Various refactors and improvements
2020-08-03 13:10:17 +10:00
Joffrey JAFFEUX 8a9e4504fe
DEV: allows to decouple csv-uploader texts from bulk invite (#10344) 2020-08-01 10:29:09 +02:00
Robin Ward 0b3f963804 FIX: Removes an error in the console in test mode 2020-07-31 14:06:52 -04:00
Régis Hanol da7e6b1f7e DEV: make rubocop 🤖 happy 2020-07-31 18:16:54 +02:00
Régis Hanol 3f59d0cffe
DEV: prevent initialized constant warning
Was tired of seeing the following warnings in the logs

```
/discourse/app/jobs/scheduled/old_keys_reminder.rb:7: warning: already initialized constant Jobs::OldKeysReminder::OLD_CREDENTIALS_PERIOD
/discourse/app/jobs/scheduled/old_keys_reminder.rb:7: warning: previous definition of OLD_CREDENTIALS_PERIOD was here
```
2020-07-31 18:05:12 +02:00
Blake Erickson 8de635fe92
DEV: Show message when cannot invite user to PM (#10336)
* DEV: Show message when cannot invite user to PM

When inviting a user to a PM return a message that says, "Sorry, this
user can't be invited." if they have been muted or are not in a users
allowed pm users list.

* Minor refactor & improved some text
2020-07-31 09:52:19 -06:00
Jordan Vidrine 831802aedc
Change pp to published-page (#10343)
* UI: Markdown Code Wrapping

* pp -> published-page

change to match previous syntax

* pp -> published-page

change to match previous syntax
2020-07-31 09:24:08 -05:00
Penar Musaraj e6dbb4fcf5
DEV: Live refresh all themes when watching stylesheets (#10337) 2020-07-30 19:03:24 -04:00
Simon Cossar 3d9eb3e085
Rename options passed to Readability::Document back to whitelist and blacklist (#10340) 2020-07-30 12:56:48 -07:00
Vinoth Kannan 6a1746a0c5
FEATURE: add expandable muted categories ui to `/categories` page. (#10303)
Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2020-07-30 23:32:51 +05:30
Jordan Vidrine f90e02162b
UI: Styling for Published Page (#10335)
* UI: Styling for Published Page

Styling to look more visually connected to Discourse
2020-07-30 10:25:28 -05: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
Sam Saffron dc14d156b6
FEATURE: g,j and g,k to navigate to next and prev topic
After visiting a topic list (by tag / category / top level) we track the list

Once a list is tracked the combo `g` `j` can be used to go to the next topic
in the list and `g` `k` to go to previous topic.

This allows you to quickly work through subsets of topics without having
to navigate back to the top level lists

The shortcut does not work in PM lists yet, or search results, both are
under consideration.
2020-07-30 17:54:47 +10:00
Kris 6da90af6c6 fix triple-click text selection in firefox 2020-07-29 22:38:38 -04:00
Penar Musaraj 25dcc577ae
DEV: More color transformation refactoring 2020-07-29 12:01:12 -04:00
Vinoth Kannan 691edc16c9 FIX: should allow non-ASCII slugs for category pages. 2020-07-29 19:47:57 +05:30
Penar Musaraj 3116591dc6
DEV: Refactor `dark-light-choose()` usage in SCSS
Covers most, but not all, cases.
2020-07-29 09:09:37 -04:00
Penar Musaraj fb2fce037b
DEV: Refactor `.coldmap` styles
Component is only used in mobile category lists, no need to have it available globally

Uses opacity instead of color manipulation to deliver the same effect
2020-07-29 09:00:21 -04:00
Bianca Nenciu 27d853e2ea
FIX: Reset 'filter' query parameter when clicking on a nav-item (#10299)
Usually, this would have been implemented using resetController, but
because we do not use link-to component for linking, that method is not
called.
2020-07-29 15:38:15 +03:00
Bianca Nenciu fd02856f80
FIX: Keep category name in URL when filtering (#10317) 2020-07-29 14:57:05 +03:00
Bianca Nenciu d2380a01b6
FIX: Allow 'c' as a tag (#10305)
The new tag routes allow the use of tag 'c'.
2020-07-29 14:47:12 +03:00
David Taylor 4ef389bc04
FIX: Define s3_helper in EnsureS3UploadsExistence job
Followup to 16c65a94
2020-07-29 12:23:04 +01:00
David Taylor 16c65a94f7
PERF: Preload S3 inventory data for multisite clusters 2020-07-29 10:31:55 +01:00
Martin Brennan 36c11cb62b
FIX: Rename delete_when_reminder_sent? bookmark method to avoid conflict with AR (#10333)
I added delete_when_reminder_sent to ignored_columns because it no longer exists and added a shortcut method delete_when_reminder_sent? to the Bookmark model. However I have been seeing some weird errors like:

> Job exception: unknown attribute 'delete_when_reminder_sent' for Bookmark.

So I am very suspicious. I am just renaming the method to auto_delete_when_reminder_sent? to avoid any potential conflicts.

Also found include_bookmark_delete_on_owner_reply? in PostSerializer which is used for nothing; I must have forgotten to delete it before.
2020-07-29 17:02:36 +10:00
Sam Saffron 04a3b949a4
FIX: add protection when removing auto delete on post bookmarks
If you reply to a topic and are looking at an admin page (like site settings)
,you have no postStream or posts.
2020-07-29 16:42:39 +10:00
Penar Musaraj c2d31f5336
DEV: Remove effectively unused `disable-no-hover` class 2020-07-28 21:44:16 -04:00
Guo Xiang Tan 6a060913d8
DEV: Reduce logging level when logging favicon download failures.
This was accidentally changed in 1c6a2262b3.
2020-07-29 09:42:55 +08:00
Penar Musaraj 29276a37ed
DEV: Refactor `scale-color()` usage in SCSS 2020-07-28 19:56:35 -04:00
Penar Musaraj 8ae66047fc
Remove unused SCSS rules 2020-07-28 19:48:08 -04:00
Martin Brennan 9e5b213089
FIX: Ensure topic user bookmarked synced on bookmark auto-delete (#10323)
For the following conditions, the TopicUser.bookmarked column was not updated correctly:

* When a bookmark was auto-deleted because the reminder was sent
* When a bookmark was auto-deleted because the owner of the bookmark replied to the topic

This adds another migration to fix the out-of-sync column and also some refactors to BookmarkManager to allow for more of these delete cases. BookmarkManager is used instead of directly destroying the bookmark in PostCreator and BookmarkReminderNotificationHandler.
2020-07-29 09:43:32 +10:00
Rafael dos Santos Silva 2ea17c06dd
FEATURE: Allow picture HTML element in posts 2020-07-28 20:26:32 -03:00
Kris 150e83d2a6 Add color definition so bold/italic btn localization matches icon color 2020-07-28 18:24:25 -04:00
Jordan Vidrine 7cf45dab01
Remove darken & lighten functions from scss (#10330) 2020-07-28 18:21:53 -04:00
Rafael dos Santos Silva c65c3407f8
FIX: Allow playsinline for videos in posts
This is used in webkit browsers mostly.
2020-07-28 19:03:54 -03:00
David Taylor f25fa83b6d
FIX: Ensure correct locale is set during RenderEmpty responses
Follow-up to bcb0e623
2020-07-28 22:20:38 +01:00