Commit Graph

16487 Commits

Author SHA1 Message Date
Martin Brennan
bcd6efa98c
FIX: Never display the invite show page form if DiscourseConnect enabled (#12466)
This form does not need to show if discourse connect is enabled
because generally the fields that would be filled in here are
filled in by the SSO provider. There is also an issue right now
where enable_local_logins and enable_discourse_connect can be
true at the same time which is not right.
2021-03-23 09:02:07 +10:00
Bianca Nenciu
437c9a554b
FEATURE: Import and export watched word (#12444)
Find & Replace and Autotag watched words were not completely exported
and import did not work with these either. This commit changes the
input and output format to CSV, which allows for a secondary column.

This change is backwards compatible because a CSV file with only one
column has one value per line.
2021-03-22 22:32:18 +02:00
Roman Rizzi
ccc44baa10
FEATURE: Add a typographer rule to replace (pa) with ¶. (#12478) 2021-03-22 15:04:08 -03:00
Jarek Radosz
3e586ab25a
FIX: Don't attempt to delete non-existent bookmark (#12473)
Could happen when using the keyboard shortcut. ("d d")
2021-03-22 18:25:34 +01:00
Roman Rizzi
e4ec0da714
FIX: Anons should see the Topic slow mode notice. (#12460) 2021-03-22 13:55:45 -03:00
Bianca Nenciu
ec7415ff49
FEATURE: Check email availability in signup form (#12328)
* FEATURE: Check email availability on focus out

* FIX: Properly debounce username availability
2021-03-22 17:46:03 +02:00
Joffrey JAFFEUX
4fb2d397a4
FIX: ensures popper's autocomplete instance is destroyed (#12476) 2021-03-22 16:19:36 +01:00
Joffrey JAFFEUX
15a9a85f0a
FIX: ensures invisible link is not interfering with UI/tab order (#12472) 2021-03-22 12:51:18 +01:00
Joffrey JAFFEUX
2b5046af19
FIX: a never created listener was removed (#12469) 2021-03-22 09:58:59 +01:00
Joffrey JAFFEUX
c3e76da90a
DOC: document addShortcut click option (#12467) 2021-03-22 09:51:45 +01:00
Joffrey JAFFEUX
4857891ecf
DEV: correctly defines focusComposer shortcut as shift+c (#12468) 2021-03-22 09:46:38 +01:00
Kris
9526c1a27b
FEATURE: Add admin-area class to HTML tag (#12459) 2021-03-22 11:36:26 +11:00
Robin Ward
942ee1e218
FIX: Tests were broken in Firefox (#12456)
There are a lot of little fixes to tests here, but the biggest issue was
too much recursion because we kept replacing the helpers over and over
again. I assume Chrome has tail recursion or something to speed this up
but Firefox hated it.

Otherwise, we can't rely on the order of attributes in rendered HTML so
I simplified most of those tests to just look for key strings in the
HTML that are rendered.
2021-03-22 11:35:51 +11:00
Penar Musaraj
d898e00242
FIX: Clear draft modal correctly when switching topics (#12458)
Fixes an issue where the "Keep editing" button in the discard draft
modal wouldn't work when switching to a new topic with an open composer
and clicking Reply.

Followup to d470e4f
2021-03-22 11:32:19 +11:00
Martin Brennan
49f4c548ef
FEATURE: Bookmark pinning (#12431)
Users can now pin bookmarks from their bookmark list. This will anchor the bookmark to the top of the list, and show a pin icon next to it. This also applies in the nav bookmarks panel. If there are multiple pinned bookmarks they sort by last updated order.
2021-03-22 09:50:22 +10:00
Roman Rizzi
e3d86c4e35
FIX: Only refresh the review count when the user can see the review queue. (#12453)
We currently make an AJAX request every time someone opens the hamburger menu, resulting in a forbidden response when a user can't see the review queue.
2021-03-19 16:20:41 -03:00
Dan Ungureanu
534008ba24
FIX: Improve handling when email is obfuscated (#12450)
This commit ensures that email validation is skipped when the email is
obfuscated, that the email is no longer send when it is not an invite
link and no username is suggested if the email is hidden as it may
reveal the first part of the email.

Follow up to commit 033d6b6437.
2021-03-19 17:15:46 +02:00
Osama Sayegh
c9923a3e3e
UX: Composer actions menu header should display the icon of selected action (#12449)
See a video of the change in the PR: https://github.com/discourse/discourse/pull/12449.
2021-03-19 17:48:43 +03:00
Robin Ward
5b02aad9c1
Support for Testem in Ember CLI (#12442)
* DEV: Use custom tags rather than handlebars server side

These will be skipped if they are ever rendered in a document. The
handlebars really messes stuff up.

* DEV: Build our own locale file for testing purposes

We can't practically proxy everything in test mode, but we can
approximate the logic and build our own locale file for testing purposes
that works quite well. This allows us to run tests without a proxy.

* DEV: Support for testem runner for ember cli tests
2021-03-19 09:32:46 -04:00
Penar Musaraj
d470e4fade
FEATURE: Allow users to save draft and close composer (#12439)
We previously included this option conditionally when users were replying
or creating a new topic while they had content already in the composer.

This makes the dialog always include three buttons:
  - Close and discard
  - Close and save draft for later
  - Keed editing

This also changes how the backend notifies the frontend when there is
a current draft topic. This is now sent via the `has_topic_draft`
property in the current user serializer.
2021-03-19 09:19:15 -04:00
Robert
4dcdbd7801
REFACTOR: break search results in multiple sub components
This change will introduce:
- search-result-entries
- search-result-entry

making the full-page-search template easier and less risky to override.
2021-03-19 10:49:14 +01:00
Martin Brennan
355d51afde
FEATURE: Allow using invites when DiscourseConnect SSO is enabled (#12419)
This PR allows invitations to be used when the DiscourseConnect SSO is enabled for a site (`enable_discourse_connect`) and local logins are disabled. Previously invites could not be accepted with SSO enabled simply because we did not have the code paths to handle that logic.

The invitation methods that are supported include:

* Inviting people to groups via email address
* Inviting people to topics via email address
* Using invitation links generated by the Invite Users UI in the /my/invited/pending route

The flow works like this:

1. User visits an invite URL
2. The normal invitation validations (redemptions/expiry) happen at that point
3. We store the invite key in a secure session
4. The user clicks "Accept Invitation and Continue" (see below)
5. The user is redirected to /session/sso then to the SSO provider URL then back to /session/sso_login
6. We retrieve the invite based on the invite key in secure session. We revalidate the invitation. We show an error to the user if it is not valid. An additional check here for invites with an email specified is to check the SSO email matches the invite email
7. If the invite is OK we create the user via the normal SSO methods
8. We redeem the invite and activate the user. We clear the invite key in secure session.
9. If the invite had a topic we redirect the user there, otherwise we redirect to /

Note that we decided for SSO-based invites the `must_approve_users` site setting is ignored, because the invite is a form of pre-approval, and because regular non-staff users cannot send out email invites or generally invite to the forum in this case.

Also deletes some group invite checks as per https://github.com/discourse/discourse/pull/12353
2021-03-19 10:20:10 +10:00
Penar Musaraj
aee7ef0dc9
DEV: Fix build due to highlight.js branch issue (#12441)
Highlight.js changed their default branch from master to main. This switches to the @highlightjs/cdn-assets package, thus sidestepping the problem. It's a slightly cleaner integration though (no need to build locally anymore).
2021-03-18 18:21:23 -04:00
jbrw
aaf96edee0
FIX: all staff members (regardless of TL) should be able to pin/unpin topics (#12435) 2021-03-18 15:32:42 -04:00
Joffrey JAFFEUX
67e1ae3f7d
A11Y: makes search results count readable by screen reader (#12437) 2021-03-18 18:44:26 +01:00
Dan Ungureanu
da1e37d2ce
FIX: browser-update should work with old browsers (#12436)
This caused issues in IE10 / IE11 with compatibility mode.
2021-03-18 19:09:01 +02:00
Dan Ungureanu
5024ea72d2
UX: Show first unique letters in invite link (#12434) 2021-03-18 19:05:38 +02:00
Roman Rizzi
da210b6d77
FEATURE: Replace markdown-it replacements rule. (#12417)
We override the default replacements rule to no longer replace "(c)", "(p)", and "(p)". Additionally, we merged the custom arrows rule into the replacement function.
2021-03-18 10:55:41 -03:00
Bianca Nenciu
1a433193d1
FIX: Do not treat code tag as block level element (#12432)
When syncing code elements, the inner text used to be escaped, which
rendered the actual HTML code instead. This commit overwrites default
parser settings to fix the way code tags are handled.
2021-03-18 15:30:15 +02:00
Joffrey JAFFEUX
cf703ccf66
A11Y: improves avatar menu focus/active states (#12422) 2021-03-18 13:29:27 +01:00
Kris
7e470bf8ae
UX: Improve topic footer alignment and layout (#12420) 2021-03-17 22:42:52 -04:00
Jordan Vidrine
74dbf2b1dc
UX: Move modal footer into better container (#12429)
* UX: Move modal footer into better container

This commit moves the modal footer under the sign-up form for a more cohesive feel between the login + create account modals.
2021-03-17 14:10:49 -05:00
Robin Ward
11e6e9cca2
FIX: Tests in admin/tests were not running (#12391)
Since we want to run them in the core app they've been moved into the
`tests` directory for discourse, and updated to the latest format.
2021-03-17 13:02:12 -04:00
Joffrey JAFFEUX
482bcc8726
A11Y: associates lists with labels on interface page (#12426) 2021-03-17 16:03:09 +01:00
Joffrey JAFFEUX
cb0427ffdf
A11Y: links change username input to its label (#12424) 2021-03-17 15:47:27 +01:00
Bianca Nenciu
9b4b2149ff
FIX: Allow group owners manage group flair (#12415)
Follow up to commit 901cee55cd.
2021-03-17 16:35:51 +02:00
Osama Sayegh
d56b2e85aa
FIX: Escape Font Awesome icons (#12421)
This is not a security issue because regular users are not allowed to insert FA icons anywhere in the app. Admins can insert icons via custom badges, but they do have the ability to create themes with JS.
2021-03-17 16:11:40 +03:00
Osama Sayegh
a23d0f9961
UX: Add image uploader widget for uploading badge images (#12377)
Currently the process of adding a custom image to badge is quite clunky; you have to upload your image to a topic, and then copy the image URL and pasting it in a text field. Besides being clucky, if the topic or post that contains the image is deleted, the image will be garbage-collected in a few days and the badge will lose the image because the application is not that the image is referenced by a badge.

This commit improves that by adding a proper image uploader widget for badge images.
2021-03-17 08:55:23 +03:00
Kris
26bfb5d6b9
UX: reduce opacity of code copy button (#12418) 2021-03-16 19:22:35 -07:00
Robin Ward
37c42a57b0
DEV: Make dockcontainer and hidepassed the defaults (#12416)
This makes running qunit tests in a browser much simpler
2021-03-16 14:34:59 -04:00
Dan Ungureanu
eda8a839d4
UX: Show Topic column in invites pending tab (#12413) 2021-03-16 16:29:41 +02:00
Robin Ward
1c82ed9f3e
REFACTOR: Use a <script src> tag to start the app (#12401)
This is to help with potential CSP issues.
2021-03-16 09:36:11 -04:00
Roman Rizzi
dc3af285b2
UX: Show the Dismiss New button at the top of the topics. (#12403)
We want to be consistent across desktop and mobile.
2021-03-16 10:07:04 -03:00
Dan Ungureanu
790c4ad4a7
FEATURE: Improve expired invites tab (#12392)
This commit extends functionality of the expired invites tab, making
it more similar to the pending tab. It also implements a different
layout for mobile.
2021-03-15 11:52:58 +02:00
Kris
01babeccdf
FEATURE: Add above-timeline plugin outlet (#12373) 2021-03-12 18:40:51 -05:00
Blake Erickson
85870225f2
FIX: Allow additional valid theme .git url formats (#12385)
Some git repos have a different ssh url scheme than github and we should
support them.

This change updates our regex format to account for repos that don't
start with "git", but are still valid ssh urls.

Also I added some tests to account for the various formats and to ensure
we don't show the public key when using https urls.

See: https://meta.discourse.org/t/182668
2021-03-12 13:24:55 -07:00
Dan Ungureanu
53158c0542
FIX: Show link in invite panel (#12378) 2021-03-12 17:09:05 +02:00
Robin Ward
c60cdab1fe
FIX: Invite acceptance tests were broken in Ember CLI (#12367)
* FIX: Invite acceptance tests were broken in Ember CLI

They relied on old Ember behavior where the app does not boot until
`visit` is called and this is no longer true.

This refactors the test to DRY stuff up a bit, and modify the DOM where
necessary in `needs.hooks.beforeEach`.

* Update app/assets/javascripts/discourse/tests/acceptance/invite-accept-test.js

Co-authored-by: Jarek Radosz <jradosz@gmail.com>

Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2021-03-12 09:00:39 -05:00
Jordan Vidrine
f1c1f9e0e7
UX: Add class to body on first unread notification (#12362)
* UX: Add class to body on first unread notification

This commit adds `first-notification` class to the body element when there is a first unread notification. This will fix any issues with certain themes who use custom headers where z-index issues sometimes cause those custom headers to not be hidden by the transparent shadow over the page.
2021-03-11 16:10:40 -06:00
Neil Lalonde
b42ee6e296
DEV: add classes to invite modal fields so they can be targeted (#12366) 2021-03-11 15:56:02 -05:00