Commit Graph

24214 Commits

Author SHA1 Message Date
Penar Musaraj e58922e1e3
UX: Styling adjustments for admin new features ()
- Fixes an alignment issue when emojis have varying widths
- Adjusts mobile alignment
2021-02-23 11:58:20 -05:00
Roman Rizzi 4bc3a64982
A11Y: Improve the header menu "view all" title. ()
* A11Y: Improve the header menu "view all" title.

The title attribute has been used to attempt to provide the link with an accessible name, but the value of the title attribute is “view all” for the link in each of the tabs, and so their purpose is not uniquely identified.
2021-02-23 12:24:42 -03:00
Roman Rizzi 95d3877709
FIX: Don't update `posts_read_count` when the post is from a PM. ()
We don't want TL0 users doing the discobot tutorial to increase their read count.
2021-02-23 11:36:00 -03:00
Arpit Jalan 73fa4263fb
FIX: log warning when context is missing when a user is destroyed () 2021-02-23 16:47:54 +05:30
David Taylor 1844bde57c
FIX: Allow mobile-nav to work without loading transitions ()
Previously, the `{{mobile-nav}}` component required a `currentRouteName` property, passed from the router service. It would observe changes in this property, and update the UI accordingly.

If we change between routes which have the same `currentRouteName` (e.g. two different group message inboxes), then the `currentRouteName` does not change and does not trigger the observer. Currently in core, we are relying on the fact that currentRouteName temporarily enters a `.loading` substate during a transition. This will change when we remove the loading substate in the near future.

This commit refactors `{{mobile-nav}}` to inject the router directly, and use the `routeDidChange` event instead of an observer. The change is backwards compatible, but plugins passing the old `currentPath` property will be shown a deprecation notice.
2021-02-23 11:16:40 +00:00
Osama Sayegh 0f807ba85b
UX: Allow select-kit to have an autofocus option ()
On some modals the main/primary input field is a select-kit component (like `{{email-group-user-chooser}}` on the assign modal), so it makes sense to allow select-kit to steal focus on modals like these. This PR adds an `autofocus` option (default false) that allows select-kit to steal focus when it's rendered.
2021-02-23 13:20:32 +03:00
Kris 477930683b
UX: More consistent group mention style () 2021-02-22 19:02:47 -05:00
Roman Rizzi e485e95792
FIX: Adding a custom scope should not modify the original ones. ()
Default scopes are stored inside a class variable, which shouldn't be modified when a custom scope is added. If this happens, we're no longer to remove the scope when the plugin is disabled.
2021-02-22 20:10:53 -03:00
Neil Lalonde 9a72876863
DEV: add plugin outlets above and below discovery-categories () 2021-02-22 17:17:03 -05:00
Penar Musaraj 9063520d89
FIX: Avoid Safari service worker error on back navigation () 2021-02-22 14:11:20 -05:00
David Taylor 8cd7c9b259
DEV: Support setting deprecated site settings via the API () 2021-02-22 18:10:54 +00:00
Penar Musaraj 0620f6298e
UX: Remove emoji step in wizard () 2021-02-22 12:14:18 -05:00
Jarek Radosz 3ba0a47e61
UX: Tweak `group` layout to fix button alignment ()
Included:

* DEV: Span can't contains divs
* DEV: Drop extra elements
* UX: Tweak `group` layout to fix button alignment
* UX: Add space between "Members" and "(N)"
2021-02-22 16:06:52 +01:00
Jarek Radosz b693bf8ca0
FIX: Don't show "bulk" icon on group-index for unauthorized users ()
Closes https://meta.discourse.org/t/group-management-tools-show-up-for-all-users/179259/9

Includes:
* DEV: Add missing <tr>
2021-02-22 15:29:04 +01:00
Jarek Radosz 858436b17c
DEV: Fix group-index-test under Ember CLI ()
`:nth()` and `:first` are jQuery-only selectors and fail when used with `querySelector`/`querySelectorAll`.
2021-02-22 15:27:01 +01:00
Jarek Radosz 24f828c467
DEV: Scope `query` to the testing container ()
We don't want it to find QUnit UI elements… This fixes some Ember CLI test failures.
2021-02-22 15:26:50 +01:00
Joffrey JAFFEUX d0d54bbead
A11Y: deselect focused choice when using enter in multi-select () 2021-02-22 14:34:31 +01:00
Arpit Jalan f75e1867ff
FIX: do not send rejection emails to auto-deleted reviewable users ()
FIX: add context when user is deleted via auto handle queued reviewable
FIX: do not delete email_log when a user is deleted
2021-02-22 18:37:47 +05:30
David Taylor a040f72f96
FIX: Make email_valid handling consistent ()
Previously we were checking truthiness in some places, and `== true` in
others. That can lead to some inconsistent UX where the interface says
the email is valid, but account creation fails.

This commit ensures values are boolean when set, and raises an error for
other value types.

If this safety check is triggered, it means the specific auth provider
needs to be updated to pass booleans.
2021-02-22 12:05:36 +00:00
David Taylor ef19431e44
DEV: Improve User#email= behavior ()
- Only apply the change after `save` is called on the record
- Automatically remove matching secondary emails
2021-02-22 11:42:37 +00:00
Joffrey JAFFEUX 74d83abcc7
A11Y: gives autocomplete in search a more accessible name ()
s/discourse/discourse-search
2021-02-22 12:11:06 +01:00
Joffrey JAFFEUX b7dbdec6fb
A11Y: makes other and color, fieldset/legend elements () 2021-02-22 12:10:51 +01:00
Joffrey JAFFEUX 0b14eb6ab1
A11Y: makes edit username and avatar accessible ()
This commit also adds name as a bindable attribute of link-to
2021-02-22 12:10:44 +01:00
David Taylor 863c7919d7
FIX: Close navigation dropdown when item selected ()
This `if` statement was backwards, such that it was a no-op. This hasn't
caused a problem because clicking an item triggers a page load, which
destroys and recreates the component.

However, we are soon planning to remove the intermediate loading screen,
which means the component will not be removed/recreated.

https://meta.discourse.org/t/177939/202
2021-02-22 10:41:09 +00:00
Joffrey JAFFEUX 72258c663b
A11Y: ensures avatar image in site header has alt attribute () 2021-02-22 11:09:18 +01:00
Kris 47ef83505f
UX: make tag input full width for PMs () 2021-02-22 16:49:12 +11:00
Roman Rizzi 4e716e9ce5
FIX: Reduce the time_read threshold to one minute. ()
* FIX: Reduce the time_read threshold to one minute.

Five minutes is too much and could fill the queue with false positives.

* Update spec/jobs/enqueue_suspect_users_spec.rb

Co-authored-by: Arpit Jalan <arpit@techapj.com>

Co-authored-by: Arpit Jalan <arpit@techapj.com>
2021-02-20 08:25:32 -03:00
Neil Lalonde da8b0818ef
DEV: add classes to sections in category settings ()
Some had them, most didn't.
2021-02-19 15:28:19 -05:00
Rafael dos Santos Silva 5117f0a3e8
FIX: Subfolder replace should only affect URL prefix ()
* FIX: Subfolder replace should only affect URL prefix

Issue was reported in https://meta.discourse.org/t/-/179504

* DEV: Test subfolder handling in get-url when called twice on the same path
2021-02-19 16:06:18 -03:00
Penar Musaraj 5604ce70d4
DEV: More refactoring of SCSS importers () 2021-02-19 11:22:24 -05:00
Roman Rizzi 95fb363c2a
FEATURE: Use the "time_read" stat to flag users as suspicious. ()
Completing the discobot tutorial gives you ~3m of reading time, so we set the limit at 5m. Additionally, we use an "OR" clause to cover the case when you just scroll through a single topic.
2021-02-19 13:10:19 -03:00
Penar Musaraj 7ee660a017
FIX: Sort admin dashboard new updates by latest () 2021-02-19 11:03:36 -05:00
Roman Rizzi aac9e6cb0a
FIX: Don't require a rejection reason if the user is a spammer. () 2021-02-19 12:57:01 -03:00
Joffrey JAFFEUX 47835ade9a
UX: implements a new tags-intersection-chooser () 2021-02-19 13:46:02 +01:00
Martin Brennan 11f28e3eb3
FIX: Do not allow bookmarks to use post date in past for reminder ()
See https://meta.discourse.org/t/bookmark-reminder-date-in-post-in-the-past/180128
2021-02-19 13:57:27 +10:00
Kris c3f6eb17a5
UX: On very short screens switch quick-access-profile to 2-columns () 2021-02-18 18:47:37 -05:00
Kris 77c8f0c864
UX: Show bullets for some composer lists () 2021-02-18 18:47:27 -05:00
Jordan Vidrine de119afec5
UX: Adjust padding on create account modal ()
This commit adds padding to the top and bottom of the form on the create account modal.
2021-02-18 16:03:55 -06:00
Rafael dos Santos Silva d86cb7d1c3
FIX: Use the S3 CDN for the Group flair () 2021-02-18 17:24:44 -03:00
Penar Musaraj 916e1d85cf
FEATURE: Quick theme installs via query parameters () 2021-02-18 12:51:44 -05:00
Joffrey JAFFEUX e175e17ebb
UX: publishes page, on public change, only when page is published () 2021-02-18 17:34:50 +01:00
Osama Sayegh 69017298e8
FIX: Limit post read time to the max integer value ()
Some users somehow manage to keep a topic open for a very long time that it causes the post read time to exceed the max integer value (2^31 - 1) which causes errors when we try to update the read time in the database to values above the integer limit.

This PR will cap posts read time at 2^31 - 1 to prevent these errors.
2021-02-18 17:48:15 +03:00
Kris c6a9142dbb
FIX: remove top gradient from signup modal () 2021-02-18 08:12:28 -06:00
Jordan Vidrine 2aab306665
UX: Remove margin from security key login button ()
This commit removes the right margin from the security key button in the login with security key screen.
2021-02-18 08:12:03 -06:00
Bianca Nenciu 08acf51be0
FEATURE: Use diffhtml to update composer preview ()
Displaying videos, animated GIFs or any kind of rich content in preview
used to refresh on every keystroke, which could cause performance
problems.
2021-02-18 16:07:26 +02:00
David Taylor 13d2a1f82c
SECURITY: Attach DiscourseConnect (SSO) nonce to current session () 2021-02-18 10:35:10 +00:00
Krzysztof Kotlarek 2f4630742c
FIX: remove unnecessary OR from dismiss service ()
Quick fix after https://github.com/discourse/discourse/pull/12103
2021-02-18 14:55:58 +11:00
Martin Brennan e0f0fe5624
FIX: Bump max topic timer duration to 20 years ()
This way it has some sort of cap, even if it seems pretty
high, and we don't have to worry about requests for increasing
it from 2 to 5 to 10 etc.
2021-02-18 11:52:30 +10:00
Krzysztof Kotlarek 7829558c6d
FIX: dismiss new when topic_user exists without last read ()
The bug was mentioned on meta: https://meta.discourse.org/t/pressing-dismiss-new-doesnt-clear-new-topics/179858

Problem is that sometimes the user has TopicUser records with `last_read_post_number` set as NULL. In that case, the topic is still "new" to them and should be dismissed when they click dismiss button.

In addition, I added that condition to post_migration and bumped the number to fix existing records. Migration is written to be idempotent so it will make no harm to already deployed instances.
2021-02-18 10:39:05 +11:00
Kris c4ff6def8e
UX: change emailLogin to info class when empty () 2021-02-17 16:28:52 -05:00