Commit Graph

16264 Commits

Author SHA1 Message Date
Martin Brennan 4af4d36175
FIX: IMAP allow unknown senders to reply to group topics via email (#11877)
Adds a new column/setting to groups, allow_unknown_sender_topic_replies, which is default false. When enabled, this scenario is allowed via IMAP:

* OP sends an email to the support email address which is synced to a group inbox via IMAP, creating a group topic
* Group user replies to the group topic
* An email notification is sent to the OP of the topic via GroupSMTPMailer
* The OP has several email accounts and the reply is sent to all of them, or they forward their reply to another email account
* The OP replies from a different email address than the OP (gloria@gmail.com instead of gloria@hey.com for example)
* The a new staged user is created, the new reply is accepted and added to the topic, and the staged user is added to the topic allowed users

Without allow_unknown_sender_topic_replies enabled the new reply creates an entirely new topic (because the email address it is sent from is not previously part of the topic email chain).
2021-01-29 09:59:10 +10:00
Kris 0990112d80
UX: fix bulk select top positioning (#11888) 2021-01-28 16:44:54 -05:00
Kris 598c7d2fcb
fix topic entrance button layout (#11887) 2021-01-28 15:44:01 -05:00
Penar Musaraj ce904dc765
DEV: Remove tabindex property from selected name template (#11882) 2021-01-28 13:42:59 -05:00
Bianca Nenciu 8e53c2a2c3
FIX: Invisible is not the opposite of visible (#11881)
If visible is undefined, then invisible should be too.
2021-01-28 20:17:46 +02:00
Jarek Radosz 8881ae4af4
DEV: Remove dead code (`latestTopicOnly`) (#11833)
Background: I wanted to see `categories.latest_by` translation in context in a live app but couldn't find it, so I traced it throughout the code.

My step-by-step reasoning for the removal is:

1. `categories-only` does not use `latestTopicOnly`, so there's no need to call it with that argument
2. `parent-category-row` is never called with `latestTopicOnly` argument, so the reference to that arg can be removed from its template
3. after that, `featured-topic` is now no longer ever called with `latestTopicOnly` argument (except in the `ghost` theme, but that's because its override of `categories-only` template 4e2fba963c/common/header.html (L119) is based on the old version of that template from core), so it seems safe to remove it there too (`categories.latest_by` i18n string is also no longer needed)
4. then, nothing is using `latestTopicOnly` anymore so it can be removed from `categories` hbs/js

I checked in each step that there are no plugins or themes (in all-the-plugins/all-the-themes) using those properties/arguments/strings.
2021-01-28 11:48:51 +01:00
Gerhard Schlager 5a6baa7c46
FIX: Translated button title didn't work (#11872)
Follow-up to 6f13d2b039
2021-01-28 08:32:02 +01:00
Kris 9ae067164d
ensure topic footer buttons are the same height (#11875)
follow-up to f1d5d2b
2021-01-27 21:40:45 -05:00
Kris d3febe5e86
Fix post edit icon color (#11873) 2021-01-27 20:38:15 -05:00
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
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
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
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
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
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
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
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
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
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
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 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
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
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
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 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 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
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
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
Penar Musaraj 26337408a9
FIX: Safari iOS page title and url regression when sharing (#11699) 2021-01-13 11:10:43 -05: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
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
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
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
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