Commit Graph

24004 Commits

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