Commit Graph

24157 Commits

Author SHA1 Message Date
Kris d71468a66a
UX: make desktop category page topics match mobile (#11857) 2021-01-27 17:27:54 -05:00
Kris f1d5d2b134
REFACTOR: Convert buttons to flexbox (#11785) 2021-01-27 16:17:08 -05:00
Mark VanLandingham 809274fe0d
DEV: Replace 'processed' column on notifications with new table (#11864) 2021-01-27 10:29:24 -06:00
David Taylor 1ccb6583b1
FIX: Do not cache translated trust level names in site settings (#11863)
There's no real need to cache these, and the caching can introduce
problems when different sites/users are using different locales.
2021-01-27 14:31:19 +00:00
Penar Musaraj e1c0a003fe
FIX: external auth account creation in iOS app (#11859) 2021-01-27 08:31:27 -05:00
Joffrey JAFFEUX c6a1042950
DEV: prettier 2.2.1 (#11862) 2021-01-27 12:39:20 +01:00
Dan Ungureanu 7be556fc19
FIX: Ensure 'tr' is called on a string. (#11853)
It depends on the route, but sometimes 'id' parameter can contain a
slug-like value and sometimes it is just an ID. This should work in
both cases.
2021-01-27 10:43:33 +02:00
tshenry 65cf3230ee
FIX: Can't remove selection from group chooser in tag group settings (#11822)
This change fixes an issue with the user group chooser of a tag group's settings. It was impossible to clear any selected groups through the UI.

The `setPermissionsGroups` function determines which groups appear selected in the group-chooser based on the passed-in `groupIds` array.

It starts with `updatedPermissions` being set to the group permissions as they were prior to the action that called the function. From there, we were correctly adding a group permission to `updatedPermissions` whenever a group appeared in `groupIds`. This addressed newly added groups and also maintained any group permissions that had been set before. The problem was that there was no logic to remove a group permission when the associated group no longer appeared in `groupIds`. If a group isn't included in `groupIds`, we can simply attempt to delete an associated group permission if it exists.
2021-01-26 10:22:05 -08:00
Roman Rizzi f3cd5dc096
FIX: Restore user summary's delete button behavior. (#11844)
The user summary's delete button UX relied on the "admin-user.js" destroy function, which was called through the "admin-tools" service. After #11724, we no longer put UX behavior on Ember models.
2021-01-26 13:10:46 -03:00
Joffrey JAFFEUX 8417c9829e
A11Y: hamburger menu aria-{expanded,haspopup} and user title (#11852)
User title in the current-user header-dropdown was sometimes `title="null"` if user doesn’t have a name. This is fixed as part of this commit to improve accessibility of this part of the UI.
2021-01-26 16:33:15 +01:00
Andrew Prigorshnev 3bbe87f229
FIX: polls extending in post reply histories (#11837)
* Add an acceptance test

* FIX: polls extending in post reply histories
2021-01-26 10:29:49 -05:00
Régis Hanol cd3d24ed8c
FIX: move post_search_data migration into onceoff job (#11851)
And reduce the size of the batches to 100k.

That should hopefully make the migrations run smoother...
2021-01-26 16:29:00 +01:00
Penar Musaraj 4228c7e7d1
UX: Small tweak to category delete warning (#11799) 2021-01-26 09:43:47 -05:00
Joffrey JAFFEUX 1989a326c9
A11Y: correctly sets role=dialog and aria-labelledby for d-modals (#11850) 2021-01-26 15:26:30 +01:00
Dan Ungureanu 4d70cc379b
DEV: Add test (#11847)
Follow-up to 77c48644eb.
2021-01-26 14:44:00 +02:00
Gerhard Schlager 363dca5ddc
FIX: "Customize text" link was broken on badges admin page (#11842) 2021-01-25 21:45:13 +01:00
Régis Hanol f421d9bdd6
FIX: only de-prioritise exact matches in mentions (#11843)
Not when doing a site-wide search like we do in the Directory.

This solves the following specfailure:

  1) DirectoryItemsController with data finds user by name
     Failure/Error: expect(json['directory_items'].length).to eq(1)

       expected: 1
            got: 0

       (compared using ==)
     # ./spec/requests/directory_items_controller_spec.rb:88:in `block (3 levels) in <main>'
     # ./spec/rails_helper.rb:271:in `block (2 levels) in <top (required)>'
     # ./bundle/ruby/2.7.0/gems/webmock-3.11.1/lib/webmock/rspec.rb:37:in `block (2 levels) in <top (required)>'
2021-01-25 21:27:15 +01:00
Régis Hanol 27656f5c84
FIX: un-prioritise inactive users in user search (#11838)
When doing a user search (eg. when mentioning a user) we will not prioritie
users who hasn't been seen in over a year.

REFACTOR the user-search specs to be more precise regarding the ordering
2021-01-25 20:33:11 +01:00
Vinoth Kannan c7781f1139
UX: respect `email_editable` site setting in user activation page. (#11835)
Previously, when both `enable_local_logins` and `email_editable` are disabled still user can change the email in  user activation page.
2021-01-25 22:19:26 +05:30
Roman Rizzi afe6db5f33
FIX: Destroy associated user api keys when making a user anonymous. (#11760) 2021-01-25 11:07:22 -03:00
David Taylor 2092152b03
FIX: Cleanup authentication_data cookie after login (#11834)
This cookie is only used during login. Having it persist after that can
cause some unusual behavior, especially for sites with short session
lengths.

We were already deleting the cookie following a new signup, but not for
existing users.

This commit moves the cookie deletion logic out of the erb template, and
adds logic and tests to ensure it is always deleted consistently.

Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2021-01-25 13:47:44 +00:00
Dan Ungureanu 77c48644eb
FIX: Dismissing unread topics with a tag (#11832)
This commits add missing router service to the mixin. It did not work
because 'router' was undefined.
2021-01-25 15:16:21 +02:00
Joffrey JAFFEUX bed011feef
A11Y: uses role=button and supports ariaPressed for tapTile (#11827) 2021-01-25 11:31:52 +01:00
Régis Hanol aa1138ff71
FIX: reindex_search job should work on model with no search data (#11819)
Lots of changes but it's mostly a refactoring.

The interesting part that was fix are the 'load_problem_<model>_ids' methods.
They will now return records with no search data associated so they can be properly indexed for the search.
This "bad" state usually happens after a migration.
2021-01-25 11:23:36 +01:00
Krzysztof Kotlarek fcbb6c4143
FIX: remove rendering UX from bookmark model (#11765)
Fix for `bookmark.js` model. Most logic was moved to `topic` controller
2021-01-25 09:35:13 +11:00
Kris 37f7f30640
edit button fix, follow up to 6f13d2b (#11821) 2021-01-22 20:31:01 -05:00
Roman Rizzi 6d30e01d1c
A11Y: Structure user menu as tabs. (#11789)
* A11Y: Structure user menu as tabs.

Although the user menu content has the appearance of tabs and relies on the functionality of tabs to make sense in terms of content and focus order, it is not marked up correctly as tabs and tab panels. See [WAI-ARIA Authoring Practices 1.1](https://www.w3.org/TR/wai-aria-practices-1.1/#tabpanel) and the [example](https://www.w3.org/TR/wai-aria-practices-1.1/examples/tabs/tabs-2/tabs.html) for details.

* Make plugin api backwards compatible
2021-01-22 19:05:14 -03:00
Penar Musaraj 73cb083b7b
FIX: Cannot find currentThemeColorSchemeId when no themeId is present (#11817) 2021-01-22 16:27:19 -05:00
David Taylor cd11689446
FIX: Check the confirmation result before deleting SSO record (#11816) 2021-01-22 19:16:43 +00:00
Mark VanLandingham 56294b4fba
FIX: Remove scheduled DND timings when schedule is disabed (#11814) 2021-01-22 13:02:11 -06:00
Joffrey JAFFEUX 6f13d2b039
A11Y: makes post-edits-indicator a button instead of a link (#11811) 2021-01-22 17:09:39 +01:00
Robin Ward dc268822a4
FIX: It seems sometimes shims are evaluated by older JS engines (#11813)
This gives us backwards compatibility with those.
2021-01-22 10:41:01 -05:00
Penar Musaraj 4f01ca87e3
FEATURE: Add new features section in admin dashboard (#11731) 2021-01-22 10:09:02 -05:00
Gerhard Schlager 71656d2c37
UX: Makes the theme editor display placeholder correctly for RTL languages (#11800)
This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/246/en-he#53834
2021-01-22 16:03:43 +01:00
Arpit Jalan 15b5bd4e14
UX: show onebox error preview image as favicon (#11810) 2021-01-22 20:05:28 +05:30
Joffrey JAFFEUX 314e7be2b1
A11Y: improves search-in-options filter accessibility (#11809) 2021-01-22 14:39:16 +01:00
Joffrey JAFFEUX 7521cb51c4
A11y: makes advanced search and html heading (#11808) 2021-01-22 14:35:17 +01:00
Arpit Jalan e81d93cf26
UX: specify width and height for onebox preview error image (#11807) 2021-01-22 19:02:23 +05:30
Bianca Nenciu d2cf43a7d5
FIX: Update categories without full page refresh (#11793)
Creating or moving a category required a full page refresh until it
showed up correctly.
2021-01-22 10:21:09 +02:00
Kris 9e6ff9cc67
A11Y: associate search controls with their labels (#11806) 2021-01-21 22:24:15 -05:00
Kris e031679f99
A11Y: Add aria-label to input clear button (#11803) 2021-01-21 21:58:34 -05:00
Kris ff095e7249
A11Y: Update selected name role to button (#11804) 2021-01-21 21:58:06 -05:00
Vinoth Kannan 872f3e6934
UX: warn about messages to be orphaned while deleting a group. (#11727)
Currently, after destroying a group its messages are inaccessible to everyone. Only admins can access using direct URLs.
2021-01-22 03:29:34 +05:30
Krzysztof Kotlarek 5cbb522c41
FIX: broken URL when username contains subfolder. (#11786)
The bug was mentioned on [meta](https://meta.discourse.org/t/two-bugs-with-usernames-starting-with-subfolder-name/169505)

When discourse is installed on `/subfolder` and username is containing subfolder name like for example `subfolderadmin` - user URLs were incorrect.

Instead of having `/subfolder/u/subfolderadmin/summary/` we were leading to `/subfolder/uadmin/summary`.

The reason for that was incorrect check in `getUrl` helper:

```javascript
  const found = url.indexOf(baseUri);
  if (found >= 0 && found < 3) {
    return url;
  }
  return baseUri + url;
```
baseUri is `/subfolder`, url is `/u/subfolderadmin` and indexOf returned position which in the end returned incorrect URL.

I think that we should check if the URL starts with baseUri and not if contains baseUri.
2021-01-22 08:43:14 +11:00
Robin Ward 83347ac218
DEV: Sync up more Ember CLI features (#11790)
This is mostly changes to acceptance tests to allow them to run in both
versions of Ember.
2021-01-21 15:55:39 -05:00
Osama Sayegh 4c0aa20dae
FIX: Share popup is positioned incorrectly in RTL locales (#11792) 2021-01-21 23:52:24 +03:00
Osama Sayegh 5f410979e2
UX: Make moment.js produce Arabic numerals instead of Hindi numerals in the Arabic locale (#11788)
Signed-off-by: OsamaSayegh <asooomaasoooma90@gmail.com>
2021-01-21 22:11:51 +03:00
Robin Ward 53ab3dda5d
FIX: Embedded comments should only return regular posts (#11773)
There shoudln't be a situation where you'd want to see moderator actions
or small posts.
2021-01-21 12:47:03 -05:00
Roman Rizzi fb9e422bd6
FIX: Show the fallback locale warning when both settings are enabled. (#11787)
We only want to warn admins when both settings are enabled. When "set locale from accept language header" setting is enabled, the user locale will be set based on the header when they register an account on the site, which could be confusing.
2021-01-21 13:09:32 -03:00
Martin Brennan 9ee8a01c3a
FIX: Change default for IncomingEmail#created_via to 0 (unknown) and make NOT NULL (#11782)
Follow up to https://review.discourse.org/t/dev-add-created-via-column-to-incomingemail-pr-11751/18366/6
2021-01-21 12:59:50 +10:00
Martin Brennan f34fa999a2
DEV: IMAP debugging improvements (#11784)
Improvements to make console access to IncomingEmail more pleasant, and stopping certain IMAP logs from landing in the DB because they just create too much noise,
2021-01-21 11:37:47 +10:00
Roman Rizzi 1e28d2900e
UX: Fallback locale warning improvements. (#11775)
- Improve warning message.
- Only display the warning if the language has a fallback and either "allow_user_locale", or "set_locale_from_accept_language_header" are enabled.
2021-01-20 18:08:02 -03:00
Roman Rizzi 82d2284ce6
FIX: I18n couldn't find translations. (#11774)
"I18n.t(key, locale: locale)" fails to find the correct translation in some cases. We should always wrap it with the "I18n.with_locale(locale)" method.

Also, reverting an override wasn't always possible because the serializer always used "I18n.locale" as the locale.
2021-01-20 17:43:00 -03:00
Gerhard Schlager 3b2f6e129a
FEATURE: Add English (UK) as locale (#11768)
* "English" gets renamed into "English (US)"
* "English (UK)" replaces "English"

@discourse-translator-bot keep_translations_and_approvals
2021-01-20 21:32:22 +01:00
Bianca Nenciu 0b07085d72
FIX: Allow max_redemptions_limit to be 1 (#11771) 2021-01-20 20:47:43 +02:00
Roman Rizzi 48f06e56f2
A11Y: Improve the quick access menu accessibility. (#11757)
- The icon for the “view all” controls in the panels have no accessible alternative.
- Because the “Log Out” and "Do Not Disturb" elements in the preferences tab are an <a> element without an href attribute, it is not keyboard focusable and therefore not keyboard focusable. Use a button element instead.
2021-01-20 14:50:36 -03:00
Jordan Vidrine da2ed566e3
A11y: Accessible user menu icons (#11763)
* FEATURE: Give user menu icons alt attributes

This commit gives user menu icons + notifications alt attributes

* UI: Use Translations

This commit refactors the code injecting alt tags to the icons to use translations instead of hard-coded text.

* FIX: Add correct syntax for aria-label + role

This commit adds the correct accessibility syntax to the tab icons + notification icons.
2021-01-20 10:46:57 -06:00
Mark VanLandingham 1a7922bea2
FEATURE: Create notification schedule to automatically set do not disturb time (#11665)
This adds a new table UserNotificationSchedules which stores monday-friday start and ends times that each user would like to receive notifications (with a Boolean enabled to remove the use of the schedule). There is then a background job that runs every day and creates do_not_disturb_timings for each user with an enabled notification schedule. The job schedules timings 2 days in advance. The job is designed so that it can be run at any point in time, and it will not create duplicate records.

When a users saves their notification schedule, the schedule processing service will run and schedule do_not_disturb_timings. If the user should be in DND due to their schedule, the user will immediately be put in DND (message bus publishes this state).

The UI for a user's notification schedule is in user -> preferences -> notifications. By default every day is 8am - 5pm when first enabled.
2021-01-20 10:31:52 -06:00
Joffrey JAFFEUX 54a01701d7
DEV: makes user-stream an unordered list (#11770)
Note, ideally we would drop tagName usage, but I think it's safer to do it in a separate PR in few weeks.
2021-01-20 15:57:38 +01:00
Joffrey JAFFEUX a8169e93c2
DEV: implements combobox roles for select-kit (#11769)
https://www.w3.org/TR/wai-aria-practices-1.1/#wai-aria-roles-states-and-properties-6
2021-01-20 15:50:53 +01:00
Jarek Radosz d6aadf60bd
FIX: Don't try to focus on a missing element (#11766)
Replacing 3 imports and flawed fragile logic with a single html attribute 💆
2021-01-20 15:02:27 +01:00
Bianca Nenciu 15da528870
FIX: Support for single use invite links (#11719)
The "invite link" checked if the number of uses was greater than 1. This
is not always true as single use invite links are perfectly valid.
2021-01-20 10:50:02 +02:00
Bianca Nenciu 3d7bb15be8
FIX: Always show overriden colors filter (#11755) 2021-01-20 10:40:05 +02:00
Krzysztof Kotlarek 8b10fc2f8c
FIX: remove rendering UX from ember models (#11724)
Fix for `admin-user.js` and `backup.js` models.
2021-01-20 16:04:21 +11:00
Martin Brennan fb184fed06
DEV: Add created_via column to IncomingEmail (#11751)
This should make it easier to track down how the incoming email was created, which is one of four locations:

The POP3 poller (which picks up reply via email replies)
The admin email controller #handle_mail (which is where hosted mail is sent)
The IMAP sync tool
The group SMTP mailer, which sends emails when replying to IMAP topics, pre-emptively creating IncomingEmail records to avoid double syncing
2021-01-20 13:22:41 +10:00
Alan Guo Xiang Tan 05e8c1ebf8 FIX: Unescape emoji when pg headlines is used for search result blurb.
Follow-up to 8336c2235e
2021-01-20 09:31:25 +08:00
Martin Brennan 44f15d4281
FIX: Do not email group user with user_private_message notification (#11754)
There was an issue that occurred with this order of operations:

* An IMAP topic was created by emailing a group
* A second user was invited to the topic (not the OP and not the group)
* A user with access to the group replies to the topic
* The second user receives a user_private_message notification email because of their involvement in the topic
* The second user replies to the email via email

This new reply would then go and notify the other group PM users, except for those who emailed the group topic directly, which is handled via the group SMTP mailer. However because the new post already has an incoming email because it is parsed via the Email::Receiver via POP3 the group SMTP section of the post alerter is skipped, and the group's email address is not ignored for the user_private_message notification.

This PR fixes it so the group is not ever sent an email via the PM notification. This is important because any new emails in the group's IMAP inbox will be picked up by the Imap::Sync code and created as a new topic which is not at all desirable.

Also in this PR I split up the specs a bit more for group SMTP in the post alerter to make them easier to read and they each only test one thing.
2021-01-20 10:53:08 +10:00
Martin Brennan 8d3f803b3f
FIX: Make sure login required skipped for confirm new email routes (#11748)
As per @davidtaylorhq 's comment at 6e2be3e#r46069906, this fixes an oversight where if login_required is enabled and an anon user follows a confirm new email link they are forced to login, which is not what the intent of #10830 was.
2021-01-20 10:52:25 +10:00
Robin Ward cdaa506397
FIX: currentUser was missing `appEvents` (#11758) 2021-01-19 14:37:21 -05:00
Kris e968af6dd4
A11Y: Add aria-labels to search inputs and search button (#11752) 2021-01-19 14:32:32 -05:00
Jordan Vidrine e6bbe9b5df
FEATURE: Give user menu icons alt attributes (#11750)
* FEATURE: Give user menu icons alt attributes

This commit gives user menu icons + notifications alt attributes

* UI: Use Translations

This commit refactors the code injecting alt tags to the icons to use translations instead of hard-coded text.
2021-01-19 15:27:27 -03:00
Martin Brennan 0034cbda8a
DEV: Change Topic Timer from enqueue_at scheduled jobs to incrementally executed jobs (#11698)
Moves the topic timer jobs from being scheduled ahead of time with enqueue_at to a 5 minute scheduled run like bookmark reminders, in a new job called Jobs::EnqueueTopicTimers. Backwards compatibility is maintained by checking if an existing topic timer job is enqueued in sidekiq for the timer, and if it is not running it inside the new job.

The functionality to close/open a topic if it is in the opposite state still remains in the after_save block of TopicTimer, with further commentary, which is used for Open/Close Temporarily.

This also removes the ensure_consistency! functionality of topic timers as it is no longer needed; the new job will always pick up the timers because they are not stored in a fragile state of sidekiq.
2021-01-19 13:30:58 +10:00
Martin Brennan 5710d5d771
FIX: Do not process pop3 mails > 1 week old (#11740)
This adds a safe default to not process pop3 emails when the pop3 polling option is set up that are > 1 week old. This is to avoid the situation where an older mailbox is used, which causes us to go and process all emails in that mailbox, sending out error emails to the senders of emails which cannot be parsed successfully.
2021-01-19 09:49:50 +10:00
Martin Brennan be145ccf2f
FIX: Add bookmark limits (#11725)
Adds a bookmark search per page limit, a total bookmark creation limit, and a rate limit per day for bookmark creation.
2021-01-19 08:53:49 +10:00
Robin Ward 7374eeb447
Sync up master and Ember CLI branches again (#11746)
We are getting closer to parity now. These changes should not affect
master but help keep things in sync.
2021-01-18 16:12:45 -05:00
Penar Musaraj b547b8415d
FIX: Check for user presence before granting badge (#11745) 2021-01-18 15:12:38 -05:00
Penar Musaraj 670b438ca5
UX: Use uniform style for tag counts (#11743) 2021-01-18 15:11:23 -05:00
Roman Rizzi ea8b5c18db
UX: Text customization for different languages. (#11729)
Admins can now edit translations in different languages without having to change their locale. We display a warning when there's a fallback language set.
2021-01-18 14:53:45 -03:00
Roman Rizzi 7ac9a4d2ec
FIX: Allow users to opt-out of using the site's small logo as the system user avatar. (#11744) 2021-01-18 14:09:07 -03:00
Roman Rizzi 19b2011601
UX: Show a warning on the category edit page when category style is none and colors are disabled. (#11742) 2021-01-18 13:13:38 -03:00
Joffrey JAFFEUX ce01f9db46
DEV: adds support for lang attribute in select-kit (#11741) 2021-01-18 15:34:18 +01:00
Roman Rizzi 9e25ab2e96
FEATURE: Replace single dash arrows when the typographer is enabled. (#11730) 2021-01-18 09:03:58 -03:00
Martin Brennan d0ef952af2
FIX: acceptance/bookmarks test date issue (#11739)
The post date was not being used in the spec, rather today's date which broke after the first day the test was introduced.
2021-01-18 10:03:17 +10:00
Martin Brennan 39e9e40268
FIX: Make sure current user timezone is used for bookmark reminders from post dates (#11722)
When selecting the "date in post" option from the bookmark reminder modal, it was not converting the date from the post, which may be in a completely different timezone, to the current user's timezone.

This PR fixes it so the timezone from the post is used to parse the date then converted to the user's timezone.
2021-01-18 09:45:42 +10:00
Robin Ward 06d318820a
FIX: TopicTrackingState was initialized after Site (#11732) 2021-01-15 13:48:01 -05:00
Robin Ward f772a0beac
More backwards compatible changes to sync with ember-cli-test (#11718)
* More backwards compatible changes to sync with ember-cli-test

* Update app/assets/javascripts/discourse/app/pre-initializers/discourse-bootstrap.js

Co-authored-by: Jarek Radosz <jradosz@gmail.com>

* Various router fixes

Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2021-01-15 12:16:05 -05:00
Neil Lalonde 9057379aac FIX: url:refresh triggered when query params change
Going from /latest?f=tracked to /latest will result in three
different topic list requests because the query params are not
considered when determining if the route is staying the same.
2021-01-15 11:58:48 -05:00
Martin Brennan 6c155dba77
FIX: Stop incorrect emailing of group email from PostAlerter (#11723)
Fixes bug introduced by bd25627198

What happens is we send notifications to everyone involved in the group inbox topic about new posts, however we pass the param `skip_send_email_to: email_addresses`. In the above commit I removed the group email address from this `email_addresses` array. This breaks the IMAP inbox because we email the group with the reply, and the IMAP sync tool finds this email and opens a new unrelated topic with it.
2021-01-15 14:31:59 +10:00
Kane York eeb7aa735a UX: Stop attempts to convert the default theme to a component by removing button
Client-side of the fix.
2021-01-14 17:20:20 -08:00
Kane York e96c373f3a FIX: Prevent users from converting the default theme to a component
This results in some fun disasters if allowed to happen. For now, just issue an oblique error message; a localized message will be added on the client.
2021-01-14 17:20:20 -08:00
Martin Brennan bd25627198
FIX: IMAP post alerter race condition and code improvements (#11711)
This PR fixes a race condition with the IMAP notification code. In the `Email::Receiver` we call the `NewPostManager` to create the post and enqueue jobs and sends alerts via `PostAlerter`. However, if the post alerter reaches the `notify_pm_users` and the `group_notifying_via_smtp` method _before_ the incoming email is updated with the post and topic, we unnecessarily send a notification to the person who just posted. The result of this is that the IMAP syncer re-imports the email sent to the user about their own post, which looks like this in the group inbox:

To fix this, we skip the jobs enqueued by `NewPostManager` and only enqueue them with `PostJobsEnqueuer` manually _after_ the incoming email record has been updated with the post and topic.

Other improvements:

* Moved code to calculate email addresses from `IncomingEmail` records into the topic, with a group passed in, for easier testing and debugging. It is not the responsibility of the post alerter to figure this stuff out.
* Add shortcut methods on `IncomingEmail` to split or provide an empty array for to and cc addresses to avoid repetition.
2021-01-15 10:54:46 +10:00
Mark VanLandingham 23059297b5
UX: Ellipsis hamburger menu link text when overflowing (#11715) 2021-01-14 18:25:19 -05:00
Krzysztof Kotlarek 06b7c44593
FEATURE: reason to reject user signup (#11700)
Feature for `Must Approve Users` setup. When a user is rejected, a staff member can optionally set a reason for audit purposes. In addition, feedback email can be sent to the user.

Meta: https://meta.discourse.org/t/account-rejection-email/103112/8
2021-01-15 09:43:26 +11:00
Mark VanLandingham 82af278ae5
FIX: Render fancy title correctly in composer (#11714) 2021-01-14 13:07:06 -06:00
Mark VanLandingham 54d3b37b48
FIX: Render topic fancy title in review queue (#11713) 2021-01-14 12:33:19 -06:00
Robin Ward 4321a55b61
Sync up master with Ember CLI branch where possible (#11707)
These changes should all be safe to live in master even if they're not
being used yet.
2021-01-14 12:52:51 -05:00
Dan Ungureanu c3bab3ef38
FIX: Make category change work with shared drafts (#11705)
It used to change the category of the topic, instead of the destination
category (topic.category_id instead of topic.shared_draft.category_id).

The shared drafts controls were displayed only if the current category
matched the 'shared drafts category', which was not true for shared
drafts that had their categories changed (affected by the previous bug).
2021-01-14 19:20:34 +02:00
Joffrey JAFFEUX 8ee3d2d954
FIX: prevents debouncing and query to override each other (#11704)
Before this change we were setting the input after the query has been done, resulting in us overwriting the input if the user types during the query.
We don't need to update it after the query, we just need to ensure it's set when we load the page and then it should stay in sync.
2021-01-14 10:19:08 +01:00
Roman Rizzi 1ad378f5c5
FEATURE: Log when a group is deleted. (#11706)
We include the group "name" and "granted_trust_level" attributes.
2021-01-13 15:53:18 -03:00
Penar Musaraj 26337408a9
FIX: Safari iOS page title and url regression when sharing (#11699) 2021-01-13 11:10:43 -05:00
Roman Rizzi e52ccaa51f
FIX: Users can remove themselves from a PM even if they can still access it through a group. (#11693)
If a group you're a member of is invited to a PM, you can no longer remove yourself from it. This means you won't be able to remove the message from your inbox, and even if you archive it, it'll come back once someone replies.
2021-01-13 11:27:23 -03:00
Joe 2b071ed930
DEV: pass the current category to discovery-list-container-top on tag pages (#11690) 2021-01-13 20:04:02 +08:00
Martin Brennan 2404fa7a23
DEV: Split toggle topic close job (#11679)
Splits the `ToggleTopicClosed` job into two distinct `OpenTopic` and `CloseTopic` jobs to make the code clearer. The old job cannot be deleted yet because of outstanding sidekiq schedules, so a todo has been added to do so later this year.

Also replaced mentions of `topic_status_update` with `topic_timer` in some files, because the `topic_status_update` model is obsolete and replaced by topic timer.

Added some shortcut methods for checking if a topic is open/whether a user can change an open topic.
2021-01-13 08:49:29 +10:00
Bianca Nenciu ec0212e56b
FIX: Make category slugs lowercase (#11277)
Admins could specify category slug with upper case characters and same slug,
but with different cases could be used simultaneously.
2021-01-12 17:28:33 +02:00
Robin Ward e80332a2bc
REFACTOR: Sync up master with changes for Ember-CLI (#11671)
The more parallel the branches, the easier the transition will be.
2021-01-12 10:13:21 -05:00
Kris 7210e0a050
FEATURE: Add before-groups-index-container outlet (#11681) 2021-01-11 20:27:24 -05:00
jbrw b1f32f2f57
DEV: TopicTrackingState calls should happen in the background (#11682)
* DEV: TopicTrackingState calls should happen in the background

It was observed that calling TopicTrackingState on popular topics could result in a large number of calls to redis, resulting in slow response times when posting replies.

These calls should be moved to a background job.

* DEV: PostUpdateTopicTrackingState should execute on default queue
2021-01-11 15:58:27 -05:00
Mark VanLandingham 3eae4d3669
FIX: Publish DND ends_at updates in httpdate format (#11683) 2021-01-11 14:11:26 -06:00
Robin Ward 49b753eee0
FIX: Hiding a post should not trigger the duplicate check (#11680)
If for some reason a post was allowed to be duplicated (probably via
staff edit) hiding it should be permitted.
2021-01-11 14:56:08 -05:00
Kris 2f84ab6e0a
UX: add space between links and text in labels (#11674) 2021-01-11 13:35:41 -05:00
Osama Sayegh 422f395042
FIX: Show unassigned component warning when installing multiple components successively (#11675)
A while ago we made a change to display a warning after installing a theme component when the admin tries to leave the page without adding the new installed component to any themes (see 5e29ae3ef5).

However there is an edge case that we forgot to address, and that's when an admin installs a component and then immediately opens the install modal again to install another one which can result in the warning being shown twice at the same time.

This PR prevents that by showing the warning when opening the install modal if the conditions are met (new component and not added to any themes) instead of showing it after installing the second component.
2021-01-11 18:29:12 +03:00
Osama Sayegh 116a879ff4
FIX: Reset theme install modal state on close (#11670)
The theme install modal should reset its state on close, otherwise it might cause confusion when installing multiple components successively.
2021-01-11 18:27:31 +03:00
Neil Lalonde 19cbda15e9 FIX: hidden tags returned in extras of tags index json 2021-01-11 10:21:54 -05:00
Krzysztof Kotlarek efaa63bd1d
FIX: always truncate uncomplete emojis in excerpts (#11678)
Additional fix after https://github.com/discourse/discourse/pull/11667

Always truncate "broken" emojis from excerpts.
2021-01-11 13:43:11 +11:00
Krzysztof Kotlarek 7f78b6ec10
FIX: broken emojis in topic excerpt (#11667)
When a post is truncated into the excerpt, sometimes we are breaking code of emoji
2021-01-11 10:40:41 +11:00
Arpit Jalan 25b4e82601
FEATURE: allow disabling self-deletions of posts (#11668)
https://meta.discourse.org/t/restoring-deleted-messages/173647/6?u=techapj
2021-01-08 20:35:13 +05:30
Roman Rizzi caa17386ee
FEATURE: Use the site's small logo as the system user's avatar. (#11661) 2021-01-08 10:40:00 -03:00
Krzysztof Kotlarek 4928f9cceb
FIX: don't error topic RSS when posts are deleted (#11641) 2021-01-08 11:16:15 +11:00
Roman Rizzi e696cba071
FIX: Don't count HTML comments when calculating reply length. (#11658)
We'll remove them when we sanitize the post raw content.
2021-01-07 15:44:17 -03:00
Osama Sayegh 2e3b3ec2de
FEATURE: Warn admins when installing a theme that's already installed (#11651)
Installing multiple copies of the same theme/component is possible, but you rarely need to actually have multiple copies installed. We've seen many times new admins installing duplicates of components because they were unaware it was already installed. This PR makes the theme installer modal loop through the existing themes when you click on 'install', and if there is a theme with a URL that matches the URL you entered, a warning will show up and you will need to click 'install' again to proceed.
2021-01-07 21:03:35 +03:00
Mark VanLandingham 4601f3be7e
FEATURE: Send notification emails when users leave do not disturb mode (#11643) 2021-01-07 10:49:49 -06:00
Osama Sayegh 3865308e36
FIX: Tab key should autocomplete like enter key does (#11659) 2021-01-07 19:43:13 +03:00
Penar Musaraj c819284660
UX: Improve color scheme choices in user prefs (#11656) 2021-01-07 11:15:38 -05:00
Jordan Vidrine 437ca97eac
FIX: Fix bg color of header on published page (#11652)
This commit correctly sets the bg color of the header on published pages to be var(--header_background) instead of var(--secondary).
2021-01-06 16:54:37 -06:00
Mark VanLandingham aa909f58a9
FIX: Hide notification count on document title in Do Not Disturb (#11646) 2021-01-06 16:15:04 -06:00
Kris d15159dff7
UX: Refactor topic list nav (#11285) 2021-01-06 16:15:28 -05:00
Osama Sayegh e02cc98092
UX: Autocomplete suggestions should be unselected by default (#11637)
When you type # or @ in the search box, a popup appears with
autocomplete suggestions. Currently, when the popup is rendered it has
the first item selected and upon pressing Enter, the first item is
inserted into the search box. The problem with this behavior is that the
first suggestion may not be what you want, and if you are typing quickly
and hit enter, the first suggestion (which is not what you want) is
inserted in the search box.

This PR amends the popup so that it has no suggestions selected by
default which means the enter key will not insert anything unless you
select a suggestion via the up or down arrow keys.
2021-01-07 08:10:18 +11:00
Kris 5b77c6a5d8
UX: Allow quick access profile content to scroll (#11639) 2021-01-06 15:32:20 -03:00
Roman Rizzi 118ea89372
FEATURE: Replace arrows when the markdown typographer is enabled. (#11638)
By inserting this rule before markdown-it's replacement rule, we can replace "-->" with "&rarr;", and "<--" with "&larr;".
2021-01-06 12:05:38 -03:00
Joffrey JAFFEUX 53f9a0883e
UX: allows to copy/paste a list of | separated values in sk (#11642)
* UX: allows to copy/paste a list of | separated values in sk

* fixes tests
2021-01-06 12:57:13 +01:00
Penar Musaraj 5f846531a5
DEV: Cleanup variables/mixins SCSS imports (#11618)
Prepends variables.scss and mixins.scss globally for all assets. With
one notable exception, theme fields, which will be addressed in a
separate PR.
2021-01-05 14:05:34 -05:00
Penar Musaraj 95df15bad9
UX: transition to edit URL when adding a category (#11634) 2021-01-05 08:34:35 -05:00
Roman Rizzi afebaf439f
FIX: Validate type when picking an avatar. (#11602)
This change improves the "UsersController#pick_avatar" validations to raise an error when "allow_uploaded_avatars" is disabled.
2021-01-05 10:29:10 -03:00
Martin Brennan 64ba5b1d21
FIX: Group SMTP email improvements (#11633)
Fixes a rare race condition causing the `Imap::Sync` class to create an incoming email and associated post/topic, which then kicks off the PostAlerter to notify others in the PM about a reply in the topic, but for the OP which is not necessary (because the person emailing the IMAP inbox already knows about the OP). Basically, we should never be sending the group SMTP email for the first post in a topic.

Also in this PR:

* Custom attribute accessors for the to/from/cc addresses on `IncomingEmail`, to parse them from an array to a joined string so the logic for this is only in one place.
* Store extra detail against the `IncomingEmail` created in `GroupSmtpMailer`
* regex test Mail header Reply-To as string instead of Field, which fixes `warning: deprecated Object#=~ is called on Mail::Field; it always returns nil`
* Add DEBUG_IMAP to log all IMAP logs as warnings for easier debugging
* Changed the Rails logging to `ImapSyncLog` in the `GroupSmtpMailer`
2021-01-05 15:32:04 +10:00
Joffrey JAFFEUX 7cf46b290d
FIX: prevents autocompoete of username to appear on right (#11623) 2021-01-04 10:36:54 +01:00
Joffrey JAFFEUX 1405b6859d
DEV: uses popper for autocomplete (#11201) 2021-01-04 09:55:47 +01:00
Roman Rizzi 024d91410d
FIX: Correctly set scroll position when viewing a tag's topic list. (#11612)
Follows up #11496. The scroll position was not updated when scrolling up.
2020-12-31 15:40:42 -03:00
Mark VanLandingham 836cbfe7ae
UX: Move do not disturb to profile panel (#11592) 2020-12-31 08:39:06 -06:00
Joffrey JAFFEUX e4dcf93238
UX: text overflow user-{primary,secondary}-navigation (#11604) 2020-12-30 21:34:27 +01:00
Penar Musaraj 303f229e98
DEV: Use indexes when importing SCSS from a folder (#11591)
By default, SCSS does not support globbing. This removes our magic and uses index files to import all files in a folder.
2020-12-30 15:29:10 -05:00
David Taylor 13e39d8b9f
PERF: Improve cook_url performance for topic thumbnails (#11609)
- Only initialize the S3Helper when needed
- Skip initializing the S3Helper for S3Store#cdn_url
- Allow cook_url to be passed a `local` hint to skip unnecessary checks
2020-12-30 18:13:13 +00:00
Rafael dos Santos Silva 8da0b4979b
FIX: S3 CDN warning was showing wrong warning message (#11603) 2020-12-29 14:09:55 -03:00
Sam 53f4d54f23
PERF: add indexes to speed up profile pages (#11598)
These 2 indexes optimise performance on profile pages.

The summary page displays:

1. A list of "Top Link" - links sorted by number of clicks posted by user
2. A list of "Top Replies" - replies made by a user that go the most hearts

These two areas could devolve into full index or table scans, new indexes are there to avoid this cost on large dbs

One minor downside is that storage requirements go a tiny bit up to maintain the new indexes
2020-12-29 15:54:05 +11:00
Rafael dos Santos Silva 330ef3700f
FEATURE: Add dash warning for using S3 without CDN (#11561)
Over the years we had some admins complaining that most of their costs
running Discourse is on S3 uploads.

That only happens when they are using S3 without a CDN, which is widely
considered a bad pratice for public websites, as egress bandwidth can
get expensive quite fast.

Related:

https://meta.discourse.org/t/download-avatars-locally-from-s3-shutting-down-s3-in-my-site/174001/3?u=falco

https://meta.discourse.org/t/use-webtorrent-to-load-media-objects/155873/2?u=falco
2020-12-28 12:43:48 -03:00
Robin Ward abe8aeb597
FIX: The `title` attribute of the diversity scales was incorrect (#11570)
It needed to be underscored, since it had dashes in it.
2020-12-23 14:12:13 -05:00
Bianca Nenciu 755627caa5
FEATURE: Introduce skip_auto_delete_reply_likes site setting (#11562)
osts from topics with 'auto delete replies timer' with more than
skip_auto_delete_reply_likes likes will no longer be deleted. If 0,
all posts will be deleted.
2020-12-23 16:30:10 +11:00
Krzysztof Kotlarek 32ff52dd42
FIX: when the user is deleted anonymise category post (#11551)
Fix for a bug when deleting a user who was an admin and created a category.

The first post with instruction about category should not be deleted but rather anonymise.

The bug was mentioned here: https://meta.discourse.org/t/cant-undelete-category-description-posts-created-by-deleted-user/173696/10
2020-12-23 14:19:30 +11:00
Alan Guo Xiang Tan d9109ed436 FIX: Show all topic statuses on full page search. 2020-12-23 10:30:35 +08:00
Krzysztof Kotlarek f84ff26aa9
FIX: use Redis replica host and port (#11566)
Introduce Redis `replica` config and deprecate `slave`
2020-12-23 13:14:19 +11:00
Sam 758e160862
FEATURE: explicitly ban outlier traffic sources in robots.txt (#11553)
Googlebot handles no-index headers very elegantly. It advises to leave as many routes as possible open and uses headers for high fidelity rules regarding indexes.

Discourse adds special `x-robot-tags` noindex headers to users, badges, groups, search and tag routes.

Following up on b52143feff we now have it so Googlebot gets special handling.

Rest of the crawlers get a far more aggressive disallow list to protect against excessive crawling.
2020-12-23 08:51:14 +11:00
Penar Musaraj 3c5d91afae
DEV: Add "before-manage-group-tags" plugin outlet (#11560) 2020-12-22 15:35:55 -05:00
Roman Rizzi 8a7fe3b276
FIX: Don't enqueue imported users when there're multiple custom fields. (#11559)
My initial implementation didn't consider this case. We should skip imported users if the "imported_id" field is present, even if there're other custom fields.
2020-12-22 14:28:07 -03:00
Arpit Jalan c9381beb9c
FIX: handle badge grant for deleted badge (#11558) 2020-12-22 20:24:51 +05:30
Krzysztof Kotlarek 07bf7a91f4
Revert "FIX: use Redis replica host and port (#11543)" (#11552)
This reverts commit b0e1210b0c.
2020-12-22 16:16:50 +11:00
Krzysztof Kotlarek b0e1210b0c
FIX: use Redis replica host and port (#11543)
* FIX: use Redis replica host and port

Introduce Redis `replica` config and deprecate `slave`

* FIX: move deprecations to separate file
2020-12-22 15:52:00 +11:00
Guo Xiang Tan 8336c2235e FIX: Missing PG topic title headline when pg headlines is enabled. 2020-12-22 09:09:00 +08:00
David Taylor d25fd34b44
DEV: Remove with_deleted workarounds for old Rails version (#11550)
* DEV: Remove with_deleted workarounds for old Rails version

These workarounds using private APIs are no longer required in the latest version of Rails. The referenced issue (https://github.com/rails/rails/issues/4306) was closed in 2013. The acts_as_paranoid workaround which this was based on was removed for rails > 5.

Switching to using a scope also allows us to use it within a `belongs_to` relation (e.g. in the Poll model). This avoids issues which can be caused by unscoping all `where` clauses.

Predicates are not necessarily strings, so calling `.join(" AND ")` can sometimes cause weird errors. If we use `WhereClause#ast`, and then `.to_sql` we achieve the same thing with fully public APIs, and it will work successfully for all predicates.
2020-12-22 10:38:59 +11:00
Rafael dos Santos Silva 32e7ee4867
FEATURE: Adds support for the WEBP image format (#11532)
Adds support for both still and animated webp images.
Animated images won't be optimized or get thumbnails.

Depends on https://github.com/discourse/discourse_docker/pull/506
and https://github.com/discourse/discourse_docker/pull/507
2020-12-21 20:09:00 -03:00
Rafael dos Santos Silva c4552e9c10
FIX: Autoplay videos must always be muted (#11533)
This automatically adds the muted attribute if it's missing in a video
tag.

Co-authored-by: David Taylor <david@taylorhq.com>
2020-12-21 14:55:00 -03:00
Bianca Nenciu 38950840e0
FIX: Show restricted tags in bulk select (#11531)
Navigating to a category and tag page, selecting topics and attempting
to bulk append a tag showed all but the tags restricted to the category.
2020-12-21 12:26:51 +02:00
Mark VanLandingham d8e2b497f7
DEV: Move rerender on 'do not disturb' change to mixin (#11529) 2020-12-18 10:35:43 -06:00
Mark VanLandingham 649ed24bb4
FEATURE: Do not disturb (#11484) 2020-12-18 09:03:51 -06:00
Bianca Nenciu 806f05f851
FIX: Make find_by_slug_path work with default slugs (#11501)
Default slugs are generated by adding '-category' to category ID.
2020-12-18 16:05:01 +02:00
Roman Rizzi 142e0ae062
Revert "Revert "DEV: Wrap `Ember.run.debounce`. (#11352)"" (#11509)
* Revert "Revert "DEV: Wrap `Ember.run.debounce`. (#11352)" (#11465)"

This reverts commit aa0d4ea764.

* Correctly debounce onScroll function
2020-12-18 10:18:52 -03:00
Arpit Jalan f296ca4b4a
FEATURE: allow plugins to show custom HTML via renderTags (#11520)
This commit allows discourse-assign plugin to show custom HTML via
renderTags even if topic has no tags.
2020-12-18 09:42:42 +05:30
Penar Musaraj 2b8b252249
UX: Move reply filter button on mobile (#11524) 2020-12-18 14:51:13 +11:00
Sam 4558d91bbb
UX: adjust default menu width (#11526)
The notification panel gets resized and the JS uses maxWidth of 320.

This tends to fight with the CSS causing notifications to "jump" a bit when a new one lands.
2020-12-18 14:50:50 +11:00
Joe 4b1d98e878
DEV: Adds raw plugin outlets to topic list headers (#11519) 2020-12-17 23:08:38 +08:00
David Taylor c54217f33d
FIX: Clear in-process theme cache after clearing DB cache (#11517)
If we clear the in-process cache first, it might get re-filled from the
DB before we clear the DB cache. This would be more likely on high-traffic
sites.
2020-12-17 11:02:41 +11:00
Penar Musaraj 9870a0b6a1
FIX: missing default notification level on group creation (#11512) 2020-12-16 15:52:34 -05:00
Bmorrical e7b837e7e1 Have doubled the size of the Watched Words Per Action Limit 2020-12-16 13:37:10 -05:00
Roman Rizzi 4d1bc3a491
FIX: Scroll to the last position when navigating back to the tag topic list. (#11496)
Scrolling was not working as expected after clicking the browser back button and navigating back to the tag topic list. We need to wrap the scroll inside a debounce function to ensure that the "window.pageYOffset" property is populated before our function runs.
2020-12-16 15:23:12 -03:00
Penar Musaraj 230fe0427e
DEV: More events for filtered replies (#11511) 2020-12-16 12:11:01 -05:00
Penar Musaraj d1058f4e4c
UX: Blend header colors (#11422) 2020-12-16 09:38:51 -05:00
Arpit Jalan 1e7d6ebb0f
DEV: no need to iterate through each tag for rendering (#11508)
This commit allows discourse-assign plugin to show assigned user next to
tags.
2020-12-16 18:40:58 +05:30
Penar Musaraj 89bf64c0bf
DEV: Trigger events when filtering replies (#11498) 2020-12-16 16:46:40 +11:00
Kris d870c80516
UX: Don't wrap menu text under icon (#11502) 2020-12-16 16:43:47 +11:00
Kris 9a66f24703
UX: Add title attribute to watched word input (#11505) 2020-12-16 16:43:01 +11:00
Kris f450ab6b5d
UX: Make theme install modal more responsive (#11503)
* UX: Make theme install modal more responsive

* chrome fix
2020-12-16 16:41:36 +11:00
Kris 407591719c
UX: When input placeholders are too long, truncate with ellipsis (#11504) 2020-12-16 16:40:30 +11:00
Krzysztof Kotlarek 6dd3f986b2
FIX: no email when the category is muted and mailing list is on (#11490)
When `mute_all_categories_by_default` setting is enabled we should not send mailing list until category, tag or topic is explicitly watched.
2020-12-16 09:30:21 +11:00
Kris 7588910ee6
UX: remove timeline from print view, fix header in crawler view (#11489) 2020-12-15 16:12:46 -05:00
Robin Ward 745a5d84d2
FEATURE: Allow IP anonymization via admin user controller API (#11497)
* FEATURE: Allow IP anonymization via admin user controller API

Co-authored-by: Penar Musaraj <pmusaraj@gmail.com>
2020-12-15 15:48:16 -05:00
Penar Musaraj 31fe0e91ad
UX: Tweaks to filtered replies (#11485)
Include the enable_filtered_replies_view site setting in the admin UI
Adds title label to in-reply-to widget
Invokes the filtered UI when using replies_to_post_number as a query
parameter
Replaces the "Show All" button icon
Fixes grammar for "Viewing 1 reply to..." label
2020-12-15 11:23:44 -05:00
Kane York 55292cfce1
FIX: Do not forbid tags in /new-topic on mobile (#11486)
Now that mobile has a UI for tags, there is no longer any reason to forbid setting them via URL.
2020-12-14 15:51:40 -08:00
Kris e02c47c4f3
UX: Show required indication consistently on signup (#11477) 2020-12-14 16:35:32 -05:00
Penar Musaraj 0e210df79a
FIX: Show correct avatar in post stream bar (#11481)
Also fixes the displayed count of posts when filtered by user.
2020-12-14 15:24:15 -05:00
Roman Rizzi b45a30c40f
FIX: Users without shared drafts access can still have access to the category. (#11476)
This is an edge-case of 9fb3629. An admin could set the shared draft category to one where both TL2 and TL3 users have access but only give shared draft access to TL3 users. If something like this happens, we need to make sure that TL2 users won't be able to see them, and they won't be listed on latest.

Before this change, `SharedDrafts` were lazily created when a destination category was selected. We now create it alongside the topic and set the destination to the same shared draft category.
2020-12-14 16:08:20 -03:00
Roman Rizzi c7b9f044a4
FEATURE: Automatically disable slow mode. (#11461)
Staff and TL4 users can decide the slow mode duration. We'll internally set a topic timer to disable it.
2020-12-14 14:06:50 -03:00
jbrw 773c51a633
FEATURE: Allow category group moderators to list/unlist topics (#11470)
* FEATURE: Allow categroy group moderators to list/unlist topics

If enabled via SiteSettings, a user belonging to a group which has been granted category group moderator privileges should be able to list/unlist topics belonging to the appropraite category.
2020-12-14 11:01:22 -05:00
Sam cfb81b7895
FIX: show retina avatars on Chrome (#11480)
chromium may report float device pixel ratio below 1.5 that is still clearly retina:

```
window.devicePixelRatio
1.4999998807907104
```

We used to round this down to 1 and not provide these browsers with retina avatars.

New algorithm is much more forgiving, anything over 1.1 gets 2x images, anything over 2.1 gets 3x images.
2020-12-14 09:39:10 +11:00
Kris ae114a6ee8
Revert "UX: When requiring user fields at signup, also mark default fields as required (#11356)" (#11475)
This reverts commit 3ef60686ed.
2020-12-11 12:09:56 -05:00
Robin Ward a51a06115a FIX: Posts with Staff Colors were excluded from the group activity
Now they are included, with the correct color applied.
2020-12-11 11:52:03 -05:00
Penar Musaraj 820b3e672a
DEV: Remove jquery.ba-resize (#11457) 2020-12-11 11:36:32 -05:00
Bianca Nenciu c4319b7b55
FIX: Show 'New' filter when 'none' subcategory set (#11474)
When set to 'none' it did not count topics from any category, but it
should count from the current one.

Follow up to df26d2e72a.
2020-12-11 18:24:32 +02:00
Robin Ward 3b81c2d470 FIX: Normalize links by converting them to lower case
The server side does this so the same link on the client side with any
upper case letters does not warn as a duplicate.
2020-12-11 11:16:51 -05:00
Bianca Nenciu df26d2e72a
FIX: Build correct topic list filter (#11473)
* FIX: 'false' value was treated as a truthy value

For example, latest.json?no_subcategories=false used to have set
no_subcategories to the string value of 'false', which is not false.

* DEV: Remove dead code

* FIX: Redirect to /none under the right conditions

These conditions are:
 - neither /all or /none present
 - only for default filter

* FIX: Build correct topic list filter

/none was never added to the topic list filter

* FIX: Do not show count for subcategories if 'none' category

* FIX: preload_key must contain /none if no_subcategories
2020-12-11 14:20:48 +02:00
David Taylor 36b4712349
FIX: Logout redirect should only be `/login` for login_required sites (#11466)
25563357 moved the logout redirect logic from the client-side to the server-side. Unfortunately the login_required check was lost during the refactoring which meant that non-login-required sites would redirect to `/login` after redirect, and immediately restart the login process. Depending on the SSO implementation, that can make it impossible for users to log out cleanly.

This commit restores the login_required check, and prevents the potential redirect loop.
2020-12-11 09:44:16 +00:00
Kris 236749add2
bulk select posts popup needs a higher z-index (#11472) 2020-12-10 21:32:52 -05:00
Krzysztof Kotlarek 3ea4f36f26
FIX: use sql_fragment instead of sanitize_sql_array (#11460)
This is a follow up to comment under this PR https://github.com/discourse/discourse/pull/11441

Sam suggested using sql_fragment instead of sanitize_sql_array
2020-12-11 10:56:26 +11:00