Commit Graph

24323 Commits

Author SHA1 Message Date
Bianca Nenciu
dc7e3fab50
FIX: Pass ajax function to loadOneboxes (#12199)
When enable_diffhtml_preview is true, oneboxes failed to load because a
wrong parameter was passed.

This commit also unhides enable_diffhtml_preview.
2021-02-24 21:42:09 +02:00
Jarek Radosz
daf34ae7e2
DEV: Fix settings/interface UI breaking on Ember CLI (#12154)
Fixes failures in user-preferences-interface-test on Ember CLI.

Included:
* DEV: User themes have `theme_id` not `id`
* FIX: `themeId` could point to a non-existent theme
* DEV: Add request stub

Co-authored-by: Penar Musaraj <pmusaraj@gmail.com>
2021-02-24 16:14:06 +01:00
David Taylor
d22ab6fe22
FIX: Ensure badge description is updated when routing without loading state (#12196) 2021-02-24 10:16:47 +00:00
Joffrey JAFFEUX
de32fa299d
DEV: adds DiscourseEvent - topic_first_visited_by_user (#12195)
This event would mostly allow plugins to create workflows once users have visited a specific topic.
2021-02-24 10:50:02 +01:00
Martin Brennan
f2126acf5a
FIX: Allow entering blank values in relative-time-picker (#12193)
In certain cases such as the category auto-close hours setting, it makes sense to blank out the relative time picker duration so 
`null` is sent to the server to clear the value.

Meta example: https://meta.discourse.org/t/how-do-i-disable-topic-auto-close/180487
2021-02-24 13:25:26 +10:00
Bianca Nenciu
845987ce23
FIX: Improve error message when login_required sites are under load
Previously a confusing message would pop up making private communities thing that anonymous access is granted.
2021-02-24 13:25:55 +11:00
Penar Musaraj
c0fd4ab9d6
DEV: Remove deprecated plugins variables importer (#12168) 2021-02-23 16:20:59 -05:00
Penar Musaraj
bd679b95a7
UX: Remove redundant focus style (#12192)
This style is unnecessary because text inputs and textareas have
focus styles set elsewhere (lines 228 and 288 respectively) and we don't
have any `select` elements.
2021-02-23 16:20:39 -05:00
Penar Musaraj
76967ee788
UX: use default browser focus styling for checkbox and radio inputs (#12173) 2021-02-23 14:01:02 -05:00
Penar Musaraj
e58922e1e3
UX: Styling adjustments for admin new features (#12189)
- 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. (#12175)
* 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. (#12131)
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 (#12182) 2021-02-23 16:47:54 +05:30
David Taylor
1844bde57c
FIX: Allow mobile-nav to work without loading transitions (#12184)
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 (#12183)
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 (#12156) 2021-02-22 19:02:47 -05:00
Roman Rizzi
e485e95792
FIX: Adding a custom scope should not modify the original ones. (#12178)
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 (#12176) 2021-02-22 17:17:03 -05:00
Penar Musaraj
9063520d89
FIX: Avoid Safari service worker error on back navigation (#12171) 2021-02-22 14:11:20 -05:00
David Taylor
8cd7c9b259
DEV: Support setting deprecated site settings via the API (#12172) 2021-02-22 18:10:54 +00:00
Penar Musaraj
0620f6298e
UX: Remove emoji step in wizard (#12169) 2021-02-22 12:14:18 -05:00
Jarek Radosz
3ba0a47e61
UX: Tweak group layout to fix button alignment (#12167)
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 (#12166)
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 (#12153)
`: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 (#12152)
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 (#12165) 2021-02-22 14:34:31 +01:00
Arpit Jalan
f75e1867ff
FIX: do not send rejection emails to auto-deleted reviewable users (#12160)
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 (#11556)
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 (#11338)
- 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 (#12164)
s/discourse/discourse-search
2021-02-22 12:11:06 +01:00
Joffrey JAFFEUX
b7dbdec6fb
A11Y: makes other and color, fieldset/legend elements (#12163) 2021-02-22 12:10:51 +01:00
Joffrey JAFFEUX
0b14eb6ab1
A11Y: makes edit username and avatar accessible (#12162)
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 (#12155)
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 (#12161) 2021-02-22 11:09:18 +01:00
Kris
47ef83505f
UX: make tag input full width for PMs (#12158) 2021-02-22 16:49:12 +11:00
Roman Rizzi
4e716e9ce5
FIX: Reduce the time_read threshold to one minute. (#12159)
* 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 (#12150)
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 (#12135)
* 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 (#12143) 2021-02-19 11:22:24 -05:00
Roman Rizzi
95fb363c2a
FEATURE: Use the "time_read" stat to flag users as suspicious. (#12145)
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 (#12146) 2021-02-19 11:03:36 -05:00
Roman Rizzi
aac9e6cb0a
FIX: Don't require a rejection reason if the user is a spammer. (#12141) 2021-02-19 12:57:01 -03:00
Joffrey JAFFEUX
47835ade9a
UX: implements a new tags-intersection-chooser (#12139) 2021-02-19 13:46:02 +01:00
Martin Brennan
11f28e3eb3
FIX: Do not allow bookmarks to use post date in past for reminder (#12138)
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 (#12120) 2021-02-18 18:47:37 -05:00
Kris
77c8f0c864
UX: Show bullets for some composer lists (#12122) 2021-02-18 18:47:27 -05:00
Jordan Vidrine
de119afec5
UX: Adjust padding on create account modal (#12133)
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 (#12130) 2021-02-18 17:24:44 -03:00
Penar Musaraj
916e1d85cf
FEATURE: Quick theme installs via query parameters (#12128) 2021-02-18 12:51:44 -05:00
Joffrey JAFFEUX
e175e17ebb
UX: publishes page, on public change, only when page is published (#12123) 2021-02-18 17:34:50 +01:00
Osama Sayegh
69017298e8
FIX: Limit post read time to the max integer value (#12126)
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 (#12121) 2021-02-18 08:12:28 -06:00
Jordan Vidrine
2aab306665
UX: Remove margin from security key login button (#12115)
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 (#11237)
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 (#12124) 2021-02-18 10:35:10 +00:00
Krzysztof Kotlarek
2f4630742c
FIX: remove unnecessary OR from dismiss service (#12117)
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 (#12107)
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 (#12103)
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 (#12105) 2021-02-17 16:28:52 -05:00
Penar Musaraj
4739bdac0a
UX: Adjustments to admin theme editor (#12112) 2021-02-17 13:00:34 -05:00
Roman Rizzi
07cf0f9460
FIX: Allow plugins to correctly extend API key scopes. (#12113)
Adding a scope from a plugin was broken. This commit fixes it and adds a test.

It also documents the instance method and renames the serialized "id" attribute to "scope_id" to avoid a conflict when the scope also has a parameter with the same name.
2021-02-17 14:42:44 -03:00
Arpit Jalan
a174c8b8d4
FIX: hide sso payload behind a button click and log views (#12110) 2021-02-17 21:27:51 +05:30
Penar Musaraj
431c6de480
UX: Add editing guidance for remote themes (#12111) 2021-02-17 10:24:34 -05:00
David Taylor
9d7dc89d79
DEV: Replace deprecated sso site settings with discourse_connect (#12099) 2021-02-17 09:31:20 +00:00
Joffrey JAFFEUX
237d172fd9
DEV: flexify post-controls and stop relying on clearfix (#12098) 2021-02-17 09:58:17 +01:00
Simon Cossar
71904277e2
Add bad_destination_address template to email_templates_controller (#12102)
Add bad_destination_address template to email_templates_controller;
Update bad_destination_address email copy
2021-02-17 09:57:38 +01:00
Kris
933dde9419
A11Y: Add rowheader to topic title TDs (#12092) 2021-02-17 00:00:34 -05:00
Kris
355b8f69af
UX: Fix excess line breaks in login modal alerts (#12104) 2021-02-16 21:22:49 -05:00
Martin Brennan
fb83757edb
FIX: Auto close topic from category settings based on topic created_at (#12082)
Previously when inheriting category auto-close settings for a topic, those settings were disrupted if another topic timer was assigned or if a topic was closed then manually re-opened.

This PR makes it so that when a topic is manually re-opened the topic auto-close settings are inherited from the category. However, they will now be based on the topic created_at date. As an example, for a topic with a category auto close hours setting of 72 (3 days):

* Topic was created on 2021-02-15 08:00
* Topic was closed on 2021-02-16 10:00
* Topic was opened again on 2021-02-17 06:00

Now, the topic will inherit the auto close timer again and will close automatically at **2021-02-18 08:00**, which is based on the creation date. If the current date and time is greater than the original auto-close time (e.g. we were at 2021-02-20 13:45) then no auto-close timer is created.

Note, this will not happen if the topic category auto-close setting is "based on last post".
2021-02-17 07:51:39 +10:00
Arpit Jalan
94036a6f49
FIX: force refresh staff action logs when transitioning from site settings (#12096) 2021-02-17 00:18:39 +05:30
Bianca Nenciu
fa3eb1f7fc
FIX: Category redirect to correct slug should not loop (#11772)
The server responds with a redirect to URLs with wrong slugs, even when
the slug was the correct but in the encoded form (if it contained
special characters).
2021-02-16 17:54:50 +02:00
Bianca Nenciu
d89c5aedbe
FIX: Fix subcategory, tag drops and none values (#11934)
* FIX: Generate correct URLs for category and tag drops

* DEV: Remove unused properties

* FIX: No subcategory and tag filter did not work
2021-02-16 17:54:24 +02:00
Bianca Nenciu
fad1fac196
FIX: Update topic_count when updating visibility (#11946)
Updating a topic's visibility did not increase or decrease the
topic_count of a category, but Category.update_stats does ignore
unlisted topics which resulted in inconsistencies when deleting
such topics.
2021-02-16 17:45:12 +02:00
Osama Sayegh
277eae97e1
FIX: Use autocomplete=discourse in select-kit to disable autocomplete in Chrome (#12094)
Chrome ignores `autocomplete="off"` on input fields, but as a workaround we can supply a nonsensical value (`discourse` or anything else) to the `autocomplete` attribute and it'll disable autocomplete.

Context: https://meta.discourse.org/t/-/107484/66?u=osama and https://meta.discourse.org/t/-/140884/13?u=osama.
2021-02-16 12:46:46 +03:00
Martin Brennan
0cba1fafe4
DEV: debug: false for service workers to stop log spam via workbox (#12093) 2021-02-16 14:01:19 +10:00
Martin Brennan
9f0f801ae3
FIX: Do not mark group_flair images as secure on upload (#12081)
See https://meta.discourse.org/t/secure-media-uploads-breaks-group-flair-image/173671/4

Group flair image uploads definitely do not need to be secure.
2021-02-16 12:34:03 +10:00
Martin Brennan
c0c7c237aa
FIX: Clean up topic-timer-info CSS classes, add edit button, and improve UI (#12080)
This PR adds an edit button to the topic timer info message which opens the modal.

Also, I have cleaned up a few more places where we were referencing "topic status update" which is what these were called prior to being called topic timers.

The category settings for auto-close topic hours has now also been modified to use the new relative-time-picker component.

Finally, the relative-time-picker input step and min is dynamic based on mins/other intervals selected, see https://review.discourse.org/t/feature-relative-time-input-for-timers-and-bookmarks-and-promote-auto-close-after-last-post-timer-12063/19204/7?u=martin
2021-02-16 12:07:30 +10:00
Joffrey JAFFEUX
f80e6a2357
FIX: adds google tracking to page publishing (#12090) 2021-02-15 19:00:35 +01:00
Joffrey JAFFEUX
323a5f22e7
A11Y: makes select-kit header a listbox (#12078)
Note that for now pressing enter doesn’t make anything, this is awaiting another change.
2021-02-15 18:22:10 +01:00
Arpit Jalan
85c4e8fd32
FEATURE: support mark tag (#12088)
This commit adds support for `mark` tag for highlighting text content.
2021-02-15 21:47:30 +05:30
Joffrey JAFFEUX
c5d0a33cc5
A11Y: adds support for aria-current through d-navigation-item (#12079) 2021-02-15 15:34:25 +01:00
Gerhard Schlager
f71ff2c34b
UX: relative-time-picker should use pluralized strings (#12086) 2021-02-15 14:15:22 +01:00
Joffrey JAFFEUX
467b075ef7
A11Y: makes aria-owns an ID and not a data attribute (#12075) 2021-02-15 12:32:09 +01:00
Joffrey JAFFEUX
71e9c2e50b
A11Y: sets has-popup as menu for select-kit components (#12074) 2021-02-15 12:31:51 +01:00
Joffrey JAFFEUX
79d7c4a3c2
A11Y: makes quote controls accessible (#12073) 2021-02-15 12:31:35 +01:00
David Taylor
d8705ee0ad
UX: Fix local-dates styling (#12085)
Renames the new `relative-time` component to `relative-time-picker` to
avoid CSS class conflict with local-dates.
2021-02-15 10:44:30 +00:00
Arpit Jalan
c256b94ae0
UX: when auto-selecting topic make sure the focus is on selected topic (#12083) 2021-02-15 16:12:45 +05:30
Arpit Jalan
901d6080df
FIX: do not show SSO last payload to moderators (#12084) 2021-02-15 16:12:06 +05:30
Martin Brennan
84c7b2c404
FEATURE: Relative time input for timers and bookmarks and promote auto-close after last post timer (#12063)
This PR adds a new relative-time component, that is an input box with a SK dropdown of minutes, hours, days, and months which outputs the duration selected in minutes. This new component is used in the time shortcuts list (used by bookmarks and topic timers) as a new Relative Time shortcut.

Also in this PR, I have made the "Auto-Close After Last Post" timer into a top level timer type in the UI, and removed the "based on last post" custom time shortcut.
2021-02-15 12:49:57 +10:00
Krzysztof Kotlarek
ad3ec5809f
FIX: Dismiss new with better migration (#12062)
Original PR was reverted because of broken migration https://github.com/discourse/discourse/pull/12058

I fixed it by adding this line
```
          AND topics.id IN(SELECT id FROM topics ORDER BY created_at DESC LIMIT :max_new_topics)
```

This time it is left joining a limited amount of topics. I tested it on few databases and it worked quite smooth
2021-02-15 08:50:33 +11:00
Jordan Vidrine
7fe5368718
UX: Second Factor + Alert Display (#12071)
* UX: Second Factor + Alert Display

This commit removes JS edits of the modal-alert and uses CSS instead. This commit also adds some styling to the 2FA login when using a key instead of a 2FA authenticator.
2021-02-12 16:24:13 -06:00
Arpit Jalan
46e7d303b1
FEATURE: when moving posts to existing topic auto-select single topic (#12064) 2021-02-12 23:11:20 +05:30
Neil Lalonde
cc0d2b623f UX: show plugin descriptions on admin plugins page 2021-02-12 11:38:50 -05:00
David Taylor
ae64490162
FIX: Allow all tags in site/theme settings, ignore tag group restrictions (#12067) 2021-02-12 14:59:21 +00:00
Vinoth Kannan
834388dbe0
UX: trim @ char from start of the username string in search. (#12060)
Currently, we're unable to search users by their username with the `@` symbol in "Posted by" filter on advanced search page.
2021-02-12 19:38:13 +05:30
Penar Musaraj
900d4187ef
DEV: Prevents rate limits for new feature checks on multisite (#12053) 2021-02-12 08:52:59 -05:00
Osama Sayegh
293fd1f743
DEV: Deprecate {{user-selector}} and replace it with {{email-group-user-chooser}} (#12042)
`{{user-selector}}` is now deprecated and it will be removed from core in Discourse 2.8. All instances of `{{user-selector}}` has been replaced with `{{email-group-user-chooser}}`.
2021-02-12 13:51:36 +03:00
Martin Brennan
ff1ac57feb
FIX: Validate duration minutes values for topic timer (#12040)
Add server and client side validations to ensure topic timer durations cannot exceed 2 years and cannot be less than or equal to 0.
2021-02-12 09:05:14 +10:00
Krzysztof Kotlarek
a696cc07d2
Revert "FEATURE: Ability to dismiss all new topics (#12018)" (#12058)
This reverts commits 7426764af4 and f5b18e2a31
2021-02-12 08:50:25 +11:00
Blake Erickson
395a903cf6
DEV: Show warning message when using ember css selectors (#12036)
* DEV: Show warning message when using ember css selectors

When editing the theme css via the admin UI a warning message
will be displayed if it detects that the `#emberXXX` or `.ember-view`
css selectors are being used. These are dynamic selectors that ember
generates, but they can change so they should not be used.

* Update error message text to be more helpful

* Display a warning instead of erroring out

This allows the theme to still be saved, but a warning is displayed.

Updated the tests to check for the error message.

Updated the pre tags css so that it wraps for long messages.
2021-02-11 13:48:57 -07:00
Jordan Vidrine
80bcebb71f
UI: Specify social button styling (#12054)
This commit adds more specificity to the social buttons styling.
2021-02-11 14:32:33 -06:00
Kris
fcf674f106
UX: Prevent badges on usercards from overflowing (#12037) 2021-02-11 13:41:58 -05:00
Kris
04d0bf9c4a
UX: Improve tag and assign display in search (#12039) 2021-02-11 13:41:43 -05:00
Kris
eec093918f
FIX: adjust width to avoid horizontal overflow (#12038) 2021-02-11 13:41:34 -05:00
Penar Musaraj
578f753a13
UX: Adjust focus styles for autocomplete input (#12051) 2021-02-11 13:11:21 -05:00
Robin Ward
2068780493
FIX: When adding a quote when the composer is closed, add a newline (#12049)
Normally we look at where the cursor is, but when the composer is closed
we don't have a cursor and just append at the end. This fix adds a new
line to make sure quotes will always work when inserted when the
composer is closed.
2021-02-11 12:45:20 -05:00
Arpit Jalan
12b57c0dee
FEATURE: Add "Recently read topics" tab to user activity page (#12047) 2021-02-11 22:36:50 +05:30
David Taylor
49affb0542
UX: Hide external login column when account creation in progress (#12048) 2021-02-11 16:26:29 +00:00
Jordan Vidrine
5e1c8111d3
UI: Adjust gradient, icon hover, capitalizations (#12045)
This commit adjusts the scroll gradient on the login modal, changes `email / username` to `Email / Username` and adjusts the color of social button icons on hover in the login modal.
2021-02-11 10:08:01 -06:00
David Taylor
830797a9c3
FEATURE: Allow post/topic thumbnails to be prioritized via markdown (#12044)
Previously we would always take the first image in a post to use as the
thumbnail. On media-heavy sites, users may want to manually select a
specific image as the topic thumbnail. This commit allows this to be
done via a `|thumbnail` attribute in markdown.

For example, in this case, bbb would be chosen as the thumbnail:

```
![alttext|100x100](upload://aaa)
![alttext|100x100|thumbnail](upload://bbb)
```
2021-02-11 15:44:41 +00:00
Penar Musaraj
a6bb7e6d25
DEV: Live reload styles in Ember CLI (#12043) 2021-02-11 10:36:34 -05:00
Krzysztof Kotlarek
f5b18e2a31
FEATURE: Ability to dismiss all new topics (#12018)
Follow up https://github.com/discourse/discourse/pull/11968

Dismiss all new topics using the same DismissTopicService. In addition, MessageBus receives exact topic ids which should be marked as `seen`.
2021-02-11 13:35:09 +11:00
Jordan Vidrine
47574e5985
FIX: Login UI Fixes (#12034)
This commit adjusts the height of the left side of the login modal, and changes the scroll gradient positioning.
2021-02-10 20:32:44 -05:00
Penar Musaraj
f188091a55
UX: Remove Convert option for system themes (#12033) 2021-02-10 19:20:13 -05:00
Krzysztof Kotlarek
a1aa37758c
FIX: do not notify when the hidden tag is added or removed (#12025)
The bug was mentioned on meta https://meta.discourse.org/t/users-are-seeing-handling-of-unhandled-tag-again/155367

It was related to users who are watching a specific topic. In that case, when the hidden tag was added or removed to the topic they were notified by `NotifyTagChangeJob`.

That job should take hidden tags into consideration. If all changed tags are in a hidden group, it should exclude user not belong to that group.

At the same time, if visible to anyone tag is added or removed users watching topic should be notified.
2021-02-11 10:03:45 +11:00
Jordan Vidrine
4580595bd8
Login signup zazz (#11957)
This PR re-styles the login and create account modals.
2021-02-10 14:53:18 -06:00
Mark VanLandingham
50c3cc7d75
DEV: Trigger appEvent when topic progress component moves (#12030) 2021-02-10 14:07:10 -06:00
Penar Musaraj
544a4e4b48
UX: Changes to new features section in admin dashboard (#12029) 2021-02-10 13:12:04 -05:00
Penar Musaraj
f2de7842bb
FEATURE: Support keyboard back/forward navigation on DiscourseHub (#12028) 2021-02-10 11:25:32 -05:00
Joffrey JAFFEUX
ad7ca46231
A11Y: sets the html lang to user's locale when possible (#12007) 2021-02-10 16:12:09 +01:00
Vinoth Kannan
7354636502
FIX: return 404 not found error if a topic is deleted. (#11987)
Currently, it's returning 403 invalid access error which causes issue in Google webmaster tools.
2021-02-09 16:47:06 +11:00
Bianca Nenciu
f4db1675f3
FIX: Check if post.topic exists before publishing topic updates (#11900) 2021-02-09 16:41:22 +11:00
Kris
fcdf7ef019
UX: Remove 2px border from some select-kit buttons (#12016) 2021-02-09 16:35:10 +11:00
Ahmed Gagan
45403e57b6
DEV: Plugin-outlet for adding new item in user-notifications filter navigation bar (#12000) 2021-02-09 16:34:09 +11:00
Krzysztof Kotlarek
354ec6694a
FEATURE: Ability to dismiss new topics in a specific tag (#11968)
* FEATURE: Ability to dismiss new topics in a specific tag

Follow up of https://github.com/discourse/discourse/pull/11927

Using the same mechanism to disable new topics in a tag.

* FIX: respect when category and tag is selected
2021-02-09 10:39:30 +11:00
Jarek Radosz
3e1a293554
DEV: Don't skip tests that run fine in legacy env (#12011)
We didn't run some of the plugin tests since #11899. I'd file that under "whoops".
2021-02-08 18:41:32 +01:00
Gerhard Schlager
9ce7ec24e2
FIX: Some error messages used wrong translation key (#12012) 2021-02-08 17:57:59 +01:00
Rafael dos Santos Silva
ceab1c9fdf
FEATURE: Handle user agent push subscription change events (#11994)
A user browser may rotate a user subscription endpoint/keys
anytime.

Currently, Discourse will receive a 4XX response while trying to
deliver a push notification and silently unsubscribe the device.

With this change, we will gracefully handle desativating the old
subscription and the replacement creation with the need for the user
to resubscribe manually every time it breaks.

https://meta.discourse.org/t/-/125179?u=falco
2021-02-08 12:09:52 -03:00
David Taylor
7e6cb1ff2e
FIX: Correct server error for starting SSO login, and add spec (#12010)
Followup to 821bb1e8cb
2021-02-08 10:59:43 +00:00
Joffrey JAFFEUX
6d31ead050
A11Y: correctly sets a name on combo-boxes for single selects (#12009) 2021-02-08 11:24:42 +01:00
Joffrey JAFFEUX
898772787c
DEV: makes aria-expanded boolean check strict (#12008)
{{d-button ariaExpanded=xxx}} only accepts Boolean now.
2021-02-08 11:18:39 +01:00
David Taylor
821bb1e8cb
FEATURE: Rename 'Discourse SSO' to DiscourseConnect (#11978)
The 'Discourse SSO' protocol is being rebranded to DiscourseConnect. This should help to reduce confusion when 'SSO' is used in the generic sense.

This commit aims to:
- Rename `sso_` site settings. DiscourseConnect specific ones are prefixed `discourse_connect_`. Generic settings are prefixed `auth_`
- Add (server-side-only) backwards compatibility for the old setting names, with deprecation notices
- Copy `site_settings` database records to the new names
- Rename relevant translation keys
- Update relevant translations

This commit does **not** aim to:
- Rename any Ruby classes or methods. This might be done in a future commit
- Change any URLs. This would break existing integrations
- Make any changes to the protocol. This would break existing integrations
- Change any functionality. Further normalization across DiscourseConnect and other auth methods will be done separately

The risks are:
- There is no backwards compatibility for site settings on the client-side. Accessing auth-related site settings in Javascript is fairly rare, and an error on the client side would not be security-critical.
- If a plugin is monkey-patching parts of the auth process, changes to locale keys could cause broken error messages. This should also be unlikely. The old site setting names remain functional, so security-related overrides will remain working.

A follow-up commit will be made with a post-deploy migration to delete the old `site_settings` rows.
2021-02-08 10:04:33 +00:00
Joffrey JAFFEUX
205db66864
A11Y: Adds support for aria-expanded and aria-controls to btn (#11846)
This commit also uses this new feature for the expand/collapse control of the user activity page.
2021-02-08 08:45:37 +01:00
Joffrey JAFFEUX
8957e4d9d0
A11Y: makes user notifications list more accessible (#11992)
Previous markup used to be

```
<div>
  <div>
    <li>
```

Instead we will now have:

```
<ul>
  <li>
    <div>
```

Note this commit also adds two things:
- ability to override tagName of a widget when attaching it
- ability to pass opts and otherOpts to {{attach}}, it could be useful in templates but is mostly useful to test `tagName` for now
2021-02-08 08:45:14 +01:00
Osama Sayegh
dbb015f03e
FIX: Topic progress bar should be on the left in RTL layouts (#11999) 2021-02-08 17:42:55 +11:00
Osama Sayegh
f700e318a4
DEV: Add CSRF meta tags to pages served by Ember CLI server (#11993)
Signed-off-by: OsamaSayegh <asooomaasoooma90@gmail.com>
2021-02-06 01:18:29 +03:00
Kris
ded0f5b4e5
UX: Remove Helvetica from our font stack (#11876)
Arial is more consistently available across operating systems and aligns better.
2021-02-05 17:01:21 -05:00
Penar Musaraj
015ea28778
UX: Small fix for Chrome focus style on replies button (#11996) 2021-02-05 14:02:30 -05:00
Kris
a2946b0728
Move category dropdown changes to desktop only (#11995)
follow-up to 615a091
2021-02-05 11:30:08 -05:00
Kris
3ed6747bf2
UX: Show caret icon on user notification dropdown (#11991) 2021-02-05 10:30:36 -05:00
David Taylor
d1b289daaa
DEV: Cleanup detection of user summary route for header collapsing (#11985)
Previously it was using various willTransition and didTransition hooks
which can be quite fragile, especially when removing the
intermediate loading state.
2021-02-05 09:16:18 +00:00
Ahmed Gagan
f6e6ae5e24
DEV: Allows widgets to extend post-controls (#11897) 2021-02-05 09:27:47 +01:00
Vinoth Kannan
792c2b94f6
UX: don't display tag notification menu on category page. (#11989)
If both category and tag are selected then we shouldn't display a notification menu.
2021-02-05 09:19:00 +05:30
Kris
13dba16e7b
UX: Fix reply where modal layout (#11990) 2021-02-05 14:37:02 +11:00
Martin Brennan
4af77f1e38
FEATURE: Allow durations < 1 hour and < 1 day for topic timers where duration is specified (auto delete replies, close based on last post) (#11961)
This PR allows entering a float value for topic timers e.g. 0.5 for 30 minutes when entering hours, 0.5 for 12 hours when entering days. This is achieved by adding a new column to store the duration of a topic timer in minutes instead of the ambiguous both hours and days that it could be before.

This PR has ommitted the post migration to delete the duration column in topic timers; it will be done in a subsequent PR to ensure that no data is lost if the UPDATE query to set duration_mintues fails.

I have to keep the old keyword of duration in set_or_create_topic_timer for backwards compat, will remove at a later date after plugins are updated.
2021-02-05 10:12:56 +10:00
Kris
0fb1c122f4
UX: Clarify user rejection modal (#11967) 2021-02-04 15:20:07 -05:00
Joe
c307604d7f
DEV: adds below-suggested-topics plugin outlet (#11980) 2021-02-05 03:41:12 +08:00
Kris
6d6436e9e7
UX: Fix & clarify bulk notification change modal (#11969) 2021-02-04 14:35:47 -05:00
Kris
c40c858233
REFACTOR: Remove d-button block helpers (#11970) 2021-02-04 14:35:23 -05:00
Penar Musaraj
2bc739eaa5
UX: Use bright color for primary button hover on dark schemes (#11979) 2021-02-04 13:31:09 -05:00