Commit Graph

23953 Commits

Author SHA1 Message Date
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