Commit Graph

24455 Commits

Author SHA1 Message Date
Joffrey JAFFEUX
f14e898f6f
A11Y: makes replies count a button and not a link (#12570) 2021-04-06 08:27:43 +02:00
Kris
80be6e6949
Overflow on user controls breaks select-kit (#12592) 2021-04-05 23:42:44 -04:00
Kris
6f79c452c2
FIX: bulk select on full-page search (#12593) 2021-04-05 23:11:57 -04:00
Kris
f8e5df393d
UX: better position for search bulk select button (#12594) 2021-04-05 23:11:43 -04:00
Joffrey JAFFEUX
89f1bb7d2a
FIX: with vanilla js .href and getAttribute("href") are not equal (#12609)
With a link having an empty href: `<a href>foo</a>` doing
`element.href` will give you the URL of the document, to get the same behavior than `$(element).attr("href")` and get "" you need to do `element.getAttribute("href")`
2021-04-06 00:36:28 +02:00
Jeff Wong
1ceefc22d5
FIX: rake themes:install error if theme cannot be updated (#12605)
Count errors on updating themes in the error bucket. Otherwise,
there was a chance that this could hide errors eg, if a deploy key to a
private repo were to be deleted. Admins probably would like to know about this.
2021-04-05 14:52:50 -07:00
Kris
3a18dd5681
Revert "A11Y: Do not use positive tabindex in composer (#12563)" (#12603)
This reverts commit af879b7851.
2021-04-05 14:36:43 -04:00
Joffrey JAFFEUX
8a36b91c2c
DEV: removes jquery usage from intercept-click (#12600) 2021-04-05 11:59:58 +02:00
Arpit Jalan
b230c30249
FIX: downloading watched words was broken (#12578) 2021-04-02 23:04:35 +05:30
Dan Ungureanu
bfd0c00944
FEATURE: Copying invite link triggers a save (#12581)
Changing the invite type from link to email and then copying it was
confusing because it gave user the impression that the invite was
updated and the invite link will reflect the latest changes, but it
did not.
2021-04-02 11:19:30 +03:00
Dan Ungureanu
81e5352e01
FIX: Better error message for redeemed invite (#12580)
This commit improves the error message when a user tries to redeem a
completely redeemed invite link.
2021-04-02 11:11:07 +03:00
Kris
42fb806f43
A11Y: make th keyboard accessible + aria attribs (#11895) 2021-04-01 14:19:59 -04:00
Mark VanLandingham
1d2ddbfebf
DEV: Pass editFirstPost action to plugin outlet in topic.hbs (#12582) 2021-04-01 12:20:10 -05:00
Kane York
5d2cd15548
FEATURE: Use appEvents instead of jQuery for composer resizing progress (#12574)
Additionally, add a composer:resize-started event to complement composer:resize-ended.
2021-04-01 13:00:57 -04:00
Arpit Jalan
3db08c073b
FIX: "confirm new email" emails were failing for EmailChangeRequest records with blank requested_by_user_id field (#12579) 2021-04-01 16:39:28 +05:30
Arpit Jalan
61860098d9
UX: move logs/watched_words to customize/watched_words in admin section (#12571)
https://meta.discourse.org/t/where-is-auto-tag-and-auto-replace/184261
2021-04-01 11:44:17 +05:30
Arpit Jalan
c478ffc662
FIX: post merging was failing silently (#12566)
https://meta.discourse.org/t/merging-very-long-posts-removes-them/183597
2021-04-01 06:46:18 +05:30
Martin Brennan
28d67b4583
FEATURE: Show an educational message in the quick access menu for personal messages when there are none (#12564)
If the user has not been sent any messages, show a message in the quick access menu with an educational message. If the user can send private messages, also show a link to open the "new message" composer:

This also adds a general improvement to the quick-access-panel, to be able to show an `emptyStateWidget` instead of just a message if there is nothing to show in the panel, as well as initial general styles for empty state.
2021-04-01 10:22:40 +10:00
Krzysztof Kotlarek
b317962fe2
FIX: title when YouTube is pasted as the title to composer (#12565)
When the YouTube link is passed to the composer, it should extract the title.

https://meta.discourse.org/t/youtube-link-not-generate-title/183776
2021-04-01 10:16:14 +11:00
Kris
af879b7851
A11Y: Do not use positive tabindex in composer (#12563) 2021-03-31 17:33:14 -04:00
Dan Ungureanu
e704f0a541
FIX: Autocorrect values for dropdown imported user fields (#12572)
When bulk inviting, the uploaded CSV file may contain wrong values for
the user fields. This tries to automatically correct them by finding
the most similar option (by ignoring the case).
2021-03-31 19:19:57 +03:00
Bianca Nenciu
27b297472a
FIX: Reload messages after a bulk operation (#12569)
It did not show the updated state of the topic until user refreshed the
page.
2021-03-31 16:08:12 +03:00
David Taylor
198c960b52
FIX: Handle staged users as unregistered users for external auth (#12567)
For 'local logins', the UX for staged users is designed to be identical to unregistered users. However, staged users logging in via external auth were being automatically unstaged, and skipping the registration/invite flow. In the past this made sense because the registration/invite flows didn't work perfectly with external auth. Now, both registration and invites work well with external auth, so it's best to leave the 'unstage' logic to those endpoints.

This problem was particularly noticeable when using the 'bulk invite' feature to invite users with pre-configured User Fields. In that situation, staged user accounts are used to preserve the user field data.
2021-03-31 13:40:58 +01:00
Dan Ungureanu
e8c576cca9
FIX: User fields are case insensitive in bulk CSV (#12559)
The CSV column title had to be case sensitive match with the name of
the user field which was unnecessary complex.
2021-03-31 13:42:53 +03:00
Dan Ungureanu
dce48d8aa7
FIX: Redirect to provided origin after auth (#12558)
It used to redirect to the destination_url cookie which sometimes is set
incorrectly.
2021-03-31 10:23:12 +01:00
Régis Hanol
c847f5e8a1
DEV: small refactor of the category_moderators method (#12550)
* DEV: small refactor of the category_moderators method

Used `index_by(&:id)` instead of `map { |u| [u.id, u] }.to_h` thanks to @cvx's recommendation.

Also renamed the `moderators` variable to not clash with method of the same name.
2021-03-30 23:12:53 +02:00
Kris
44587cc4b4
UX: more consistent user control button width (#12553) 2021-03-30 14:18:38 -04:00
Kris
9c8ec372f1
UX: remove reference to contact form in settings (#12554) 2021-03-30 14:18:06 -04:00
Kris
6d65320aae
UX: login modal adjustments (#12552) 2021-03-30 14:16:50 -04:00
Penar Musaraj
524890c5e4
DEV: Clear filters when navigating to a post (#12557) 2021-03-30 13:55:15 -04:00
Penar Musaraj
65ad8750c7
DEV: Remove draft attributes from topic lists (#12525) 2021-03-30 11:42:26 -04:00
Bianca Nenciu
52a5c7e438
FIX: Improve error messages if user cannot send PM emails (#12547) 2021-03-30 12:18:57 +03:00
Penar Musaraj
2579127091
UX: Fix tab list alignment in emoji popup (#12548) 2021-03-29 16:30:20 -04:00
Faizaan Gagan
ff814dcfc1
FIX: additionalOpts update and change to function (#12546)
* FIX: additionalOpts should be added outside conditional

* FIX: changed the computed property to function
2021-03-29 15:27:55 -04:00
Daniel Waterworth
70970bb791
FIX: Show error messages when adding permalinks in the admin UI (#12545)
Also, check for uniqueness of permalinks before attempting to save.
2021-03-29 13:36:59 -05:00
Daniel Waterworth
330c831ba4
FIX: Prevent UniqueViolation exceptions when syncing group mentions (#12543) 2021-03-29 12:43:24 -05:00
Roman Rizzi
1a3c5f55d6
FIX: Set the "hasTargetGroups" attribute in the composer when clicking the group message button. (#12536)
After clicking the message button on the group page, the composer shouldn't display the "official warning" checkbox. The discourse-bcc plugin also relies on this attribute to display an option in the composer.
2021-03-29 14:43:00 -03:00
Jarek Radosz
f0b2e77abb
FIX: Isolate modal and global key-binds (#12477)
This change makes is so that when a time-picking modal (e.g.  "Add bookmark" modal) is visible, **all** global key bindings are paused.

1. Fixes an issue where opening and closing a time-picking modal would break global single-key keybinds, so for example, <kbd>L</kbd> would no longer like posts, but <kbd>L</kbd> <kbd>L</kbd> would
2. Fixes a related issue, where doing the above would also override custom keybinds provided by plugins (e.g. <kbd>L</kbd> shortcut that discourse-reactions uses)

Included:

* DEV: Reset Mousetraps instead of unbinding
* FIX: Make unbind use unbind
* DEV: Don't check for keyTrapper twice
* DEV: Use an instance of Mousetrap
* DEV: Remove an invalid `for` attribute (`set_reminder` doesn't exist)
* DEV: Add ability to pause all KeyboardShortcuts
* FIX: Pause all keybinds when in a time-picking modal
* DEV: Move bookmark keybind resets to willDestroyElement
* DEV: Fix shortcuts-related tests
2021-03-29 13:58:03 +02:00
Dan Ungureanu
8335c8dc1a
FEATURE: Allow admins to pre-populate user fields (#12361)
Admins can use bulk invites to pre-populate user fields. The imported
CSV file must have a header with "email" column (first position) and
names of the user fields (exact match).

Under the hood, the bulk invite will create staged users and populate
the user fields of those.
2021-03-29 14:03:19 +03:00
Dan Ungureanu
3c53d4d2d8
DEV: Add tests for create-invite modal (#12535) 2021-03-29 11:52:21 +03:00
Martin Brennan
2d686191b5
FIX: Bookmark topics were not being updated when the post moved (#12542)
Because bookmarks have both topic and post ID, when the post was moved into another topic the bookmark was still attached to the post but did not show in the UI. This PR makes it so the all topic IDs for bookmarks attached to a post are updated when a post is moved.

Also included is a migration to fix affected records (e.g. on Meta there are 20 affected records).

See: https://meta.discourse.org/t/improved-bookmarks-with-reminders/144542/203
2021-03-29 11:25:48 +10:00
Régis Hanol
e8cad4bbf3
PERF: improve category moderators query (#12538)
In the about page, we list a certain number of category moderators.

This rewrites the SQL query used to retrieve the most recent category moderators in order
to perform better with a large number of users/categories/category moderators.

TIL: you can ORDER BY inside an ARRAY_AGG in postgres
TIL: you can slide ARRAYS in postgres
2021-03-28 10:25:30 +02:00
Penar Musaraj
db7be947df
FIX: Allow dismissing Discard Drafts modal via ESC (#12532) 2021-03-26 13:07:19 -04:00
Penar Musaraj
edc0f61920
UX: Emoji popup layout adjustments (#12533) 2021-03-26 13:07:04 -04:00
Penar Musaraj
5096920500
FEATURE: Implement nonces for Google Tag Manager integration (#12531) 2021-03-26 11:19:31 -04:00
Faizaan Gagan
3bd482c6bd
IMPR: improved topic timer component's code structure (#12519)
This PR improves the code structure of the topic-timer-info component while retaining all the functionality and making it extensible for theme/plugin devs.
2021-03-26 09:12:16 +10:00
Neil Lalonde
eb25d3a954
FIX: add all the keys that should be allowed in user_notifications (#12526) 2021-03-25 14:00:05 -04:00
Dan Ungureanu
dffc3a2f8e
DEV: Add tests for invite system (#12524) 2021-03-25 18:26:22 +02:00
Roman Rizzi
4505951d32
UX: Display a tooltip when trying to delete an automatic group. (#12493) 2021-03-25 11:07:38 -03:00
Jarek Radosz
50c23304ac
DEV: Move incorrectly placed topic tests (#12513)
The diff is confusing but the gist is that there are some topic acceptance tests that were incorrectly placed in "Topic featured links" group. This moves them into "Topic".

Moved tests:
* Converting to a public topic
* Unpinning unlisted topic
* selecting posts
* select below
* View Hidden Replies
* Quoting a quote keeps the original poster name
* Quoting a quote of a different topic keeps the original topic title
* Quoting a quote with the Reply button keeps the original poster name
* Quoting a quote with replyAsNewTopic keeps the original poster name
* Quoting by selecting text can mark the quote as full
2021-03-25 15:04:51 +01:00