Commit Graph

24778 Commits

Author SHA1 Message Date
Robin Ward b9053c5e77
UX: Add auto focus to hamburger and user menu dropdowns (#13165) 2021-05-27 06:45:52 +10:00
Penar Musaraj ea68bab135
FIX: Close hyperlink modal on ESC key (#13166) 2021-05-26 15:11:12 -04:00
Roman Rizzi 83dd47f0b4
FEATURE: Navigate to an approved queued topic from the review queue. (#12841)
Admins can visit an approved queued topic from the review queue by clicking their title. We no longer store the created post and topic ids in the reviewable's payload object. Instead, we set the `topic_id` and `target_id` attributes.
2021-05-26 15:43:18 -03:00
Penar Musaraj 787f989fb9
FIX: add body class and remove jQuery usage in footer-nav component (#13162) 2021-05-26 13:03:34 -04:00
David Taylor ea61bcaf13
DEV: Define theme test modules under a `/test` subdirectory (#13158) 2021-05-26 11:49:51 +01:00
Jarek Radosz 96f3f15f38
UX: Align list-controls & topic-title top margins (#13150) 2021-05-26 11:12:32 +02:00
David Taylor f25eda13fa
FIX: Make UI match server behavior for external-auth invites (#13113)
There are two methods which the server uses to verify an invite is being redeemed with a matching email:
  1) The email token, supplied via a `?t=` parameter
  2) The validity of the email, as provided by the auth provider

Only one of these needs to be true for the invite to be redeemed successfully on the server. The frontend logic was previously only checking (2). This commit updates the frontend logic to match the server.

This commit does not affect the invite redemption logic. It only affects the 'show' endpoint, and the UI.
2021-05-26 09:47:44 +01:00
Kris d0dfd0c73f
UX: Consistent padding on mobile/desktop `.wrap` (#13155) 2021-05-26 17:33:08 +10:00
Jarek Radosz 494fe7f2f6
UX: Adjust list and onebox margins (#13131)
Lists – made the indent smaller (helps on mobile), added vertical margin
Onebox – added top margin
2021-05-25 23:52:33 -04:00
Dan Ungureanu a5273b37f7
FIX: Show inviter name in email's from field (#13141)
'From' field of the email contained the name of the user who posted the
shared post. Instead, it should contain the name of the inviter.
2021-05-26 12:55:07 +10:00
Kris f78fa76847
UX: change categories page dropdown to a wrench (#13154) 2021-05-26 12:53:52 +10:00
Sam 759abb3206
UX: Improve navigation on topic lists for screen readers (#13153)
Previously we had no role set for various topic links, nor did we have any
headers.

This teaches screen readers that topic links in topic lists are to be treated
as H2. We opted for this less radical change cause a change of the element
type would probably result in many broken themes.

Confirmed on NVDA you can very quickly breeze through topic lists now. Minor
edge case is pinned topics which can be a bit annoying due to multiple links.
2021-05-26 12:53:14 +10:00
Sam 293877237d
UX: provide a region for various topic actions (#13152)
This makes it much easier to reply to topics / bookmark topics and so on

Previously topic buttons had no region
2021-05-26 11:05:35 +10:00
Dan Ungureanu 197e3f24ce
FEATURE: Show stale reviewable to other clients (#13114)
The previous commits removed reviewables leading to a bad user
experience. This commit updates the status, replaces actions with a
message and greys out the reviewable.
2021-05-26 09:47:35 +10:00
David Taylor 8c83803109
DEV: Remove unused `disabled_plugins` checks (#13144)
We now bundle Javascript for each theme/plugin separately, and only ship bundles for enabled plugins to the client. Therefore, these disabled_plugins checks are now redundant, and can be removed.
2021-05-26 09:44:58 +10:00
Martin Brennan 7a79bd7da3
FEATURE: Allow selective dismissal of new and unread topics (#12976)
This PR improves the UI of bulk select so that its context is applied to the Dismiss Unread and Dismiss New buttons. Regular users (not just staff) are now able to use topic bulk selection on the /new and /unread routes to perform these dismiss actions more selectively.

For Dismiss Unread, there is a new count in the text of the button and in the modal when one or more topic is selected with the bulk select checkboxes.

For Dismiss New, there is a count in the button text, and we have added functionality to the server side to accept an array of topic ids to dismiss new for, instead of always having to dismiss all new, the same as the bulk dismiss unread functionality. To clean things up, the `DismissTopics` service has been rolled into the `TopicsBulkAction` service.

We now also show the top Dismiss/Dismiss New button based on whether the bottom one is in the viewport, not just based on the topic count.
2021-05-26 09:38:46 +10:00
Roman Rizzi de0f2b9546
UX: Users can postpone discobot's tutorial. (#13060) 2021-05-25 16:30:16 -07:00
Rafael dos Santos Silva 9118bb2076
FEATURE: Normalize the service worker route (#12343)
Re-lands the change initially proposed on #8359 but without a new nginx
location block, so it has less change surface.

Co-authored-by: Jeff Wong <awole20@gmail.com>

Co-authored-by: Jeff Wong <awole20@gmail.com>
2021-05-25 19:39:31 -03:00
Jordan Vidrine b0b23a969f
UX: Search result link title color change (#13149) 2021-05-26 08:08:34 +10:00
Nolan Darilek 549e100d8c
A11Y: Add heading role for post titles. (#13143)
Not all screen readers treat articles as navigable roles when moving between landmarks. To help with this, we use a `heading` role on the title, with an arbitrary depth of 2 chosen as to not conflict with the main `<h1/>`. Because ARIA roles are used, this change should be entirely non-visual.

While this introduces minor navigation challenges in posts where headers are included, the vast majority of posts don't, and as screen reader users, we're used to mixed headers in longer-form content.
2021-05-25 22:43:09 +02:00
Robin Ward 681a129ec0
FIX: Better focus support for modals (#13147) 2021-05-25 16:33:46 -04:00
Penar Musaraj 452ea7e32e
FIX: Properly break overflowing long links in topic map (#13146) 2021-05-25 15:43:58 -04:00
Mark VanLandingham 72950e051c
Add category breadcrumbs to edit category page (#13126) 2021-05-25 13:40:11 -05:00
Jarek Radosz 3f5d868219
DEV: Add peer dependencies (#13132)
Fixes yarn warnings.

* DEV: Add `eslint` peer dependency
* DEV: Add `@babel/core` peer dependency
* DEV: `npx yarn-deduplicate` & `yarn`
2021-05-25 18:39:40 +02:00
Jarek Radosz 9b9b601e2f
DEV: Remove unused `offscreen-content` (#13133)
Looks like a vestige of Ember 1.x?
2021-05-25 18:39:06 +02:00
Jarek Radosz 61cf34c09d
DEV: Don't resetSite() more often than needed (#13138)
Avoid calling resetSite() twice per test in certain situations.

Included:
* DEV: Import `exists` helper
2021-05-25 18:38:41 +02:00
Jarek Radosz 51b360916c
DEV: Use `import { inject as controller}` Ember idiom (#13140) 2021-05-25 18:37:32 +02:00
Jarek Radosz 5c3c2b8d31
FEATURE: Change "Preformatted text" shortcut (#13137)
Cmd/Ctrl+Shift+C was conflicting with browsers' "inspect element" keyboard shortcuts. Cmd/Ctrl-E was chosen because it's the same one that GitHub is now using: https://github.blog/changelog/2021-04-09-new-codeblock-shortcut/
2021-05-25 15:57:29 +02:00
Sam 6e2ecf40c7
UX: add ARIA region role to posts (#13130)
NVDA does not detect HTML5 articles as regions. This explicitly sets a
region with an aria-label denoting post numbers making it much easier to
know where you are in a topic.

Note role: article which is more semantically correct is not respected by
NVDA d/D shortcut, hence the much more generic "region" role.
2021-05-25 20:58:13 +10:00
Andrei Prigorshnev f21d50ebb6
UX: show Update button instead of Enable button when slow mode is already enabled (#13077)
When slow mode is enabled it's possible to open the slow mode dialog again to disable it or to update slow mode settings. The problem is that in this case, the button for saving still has the label "Enable" which is confusing.

This changes the text on the button from "Enable" to "Update" when slow mode is already enabled.
2021-05-25 13:33:39 +04:00
Jeff Atwood 50926f6143
FIX: Simplify post and topic deletion language (#13128)
Based on feedback from Matt Haughey, we don't need to use so many words when describing a deleted topic or post.

Co-authored-by: Martin Brennan <martin@discourse.org>
2021-05-25 12:04:10 +10:00
Jeff Wong b66802ccf1
DEV: add plugin hook to add topic participant classes (#13125)
Allow plugins to add custom css classes to topic participants
2021-05-24 12:33:21 -07:00
David Taylor fc6e7dd3f1
DEV: Add `session` to `before_auth` and `after_auth` hooks (#13123)
This allows plugins to store/modify things in the session (e.g. the destination_url). This change is backwards compatible with existing plugins. If they do not specify a third argument, they will just be passed the first two.
2021-05-24 17:35:51 +01:00
Kris 567f9caf75
A11Y: Fix post control and user-menu focus styles (#13118) 2021-05-24 18:10:01 +10:00
Andrei Prigorshnev a5dd24c445
DEV: fix warnings 'Hbs template must be compiled and not a string' in tests (#13116)
These warnings appeared only when running tests using Ember CLI.
2021-05-21 19:58:18 +04:00
Bianca Nenciu f700f3ef00
FEATURE: Support tag and replace in watched words in test modal (#13100)
The modal showed only the matches, without the replacement or tags.
2021-05-21 17:50:24 +03:00
Andrei Prigorshnev 0df6b0bc47
FIX: slow mode dialog doesn't remember Enabled Until value (#13076)
If reload a page after enabling slow mode and open the slow mode dialog again it would show a slow mode interval but wouldn't show Enabled Until value. This PR fixes it.
2021-05-21 18:13:14 +04:00
Bianca Nenciu 38af28d58b
FIX: Allow add email to group if user can invite (#13097)
It used to allow adding email addresses to a group even if invites were
disabled for the site. This does not allow user to input email address
if they cannot invite.

The second thing this commit improves is the message that is displayed
to the user when they hit the invite rate limit.
2021-05-21 11:34:17 +03:00
Josh Soref 13d40ead97
DEV: Correct spelling mistakes in comments 2021-05-21 13:37:17 +10:00
Josh Soref 59097b207f
DEV: Correct typos and spelling mistakes (#12812)
Over the years we accrued many spelling mistakes in the code base. 

This PR attempts to fix spelling mistakes and typos in all areas of the code that are extremely safe to change 

- comments
- test descriptions
- other low risk areas
2021-05-21 11:43:47 +10:00
Joe 6421fabb02
UX: Improve positioning of controls in lightboxes (#13108)
This commit fixes an issue where controls scroll in lightboxes with large images (after zooming in)

Before:

05024730b3.mp4

Notice how controls like the close button, the next and previous button, and the image metadata also scroll? This is an undesired behavior.

After:

8047bab735.mp4

This is the desired behavior; only the image should scroll.

The changes in this PR apply to both desktop and mobile.
2021-05-21 09:18:22 +08:00
Robin Ward e1b99d3cad
FIX: Review Queue Query parameters were not refreshing in Ember CLI builds (#13101)
The problem was we were setting the properties then immediately calling
`refreshRoute` which was being executed before the properties were
settled via the runloop.
2021-05-20 14:00:25 -04:00
Kris db7038e6c2
UX: Fix theme upload width, remove class clash, prettier (#13071)
* UX: fix width & theme upload modal class clash

* remove unneeded class

* unprettier hbs

* add back unicode emoji

* add newline
2021-05-20 17:10:40 +10:00
Sam 058b5310c1
FIX: Correctly publish messages unconditionally to admins (#13053)
Under certain conditions admins would miss messages when posting action in
topics where they have permission.

This also fixes an error where we would sometimes explode when publishing to
an empty group.
2021-05-20 16:58:27 +10:00
Kris f1b14a7f71
FIX: Specificity and other fixes for WCAG colors (#13082) 2021-05-20 16:28:03 +10:00
Andrei Prigorshnev 28e201f391
DEV: add timezone to user fixtures (#13095) 2021-05-20 16:06:38 +10:00
Kris a532e64389
DEV: Some select-box headers don't need a class (#12992)
* DEV: Some select-box headers don't need a class

* remove duplicate class
2021-05-20 16:00:45 +10:00
Sam 1a620cb01f
FEATURE: allow for notification of up to 20 group owners (#13081)
The 5 limit appears to be too low. Limiting to 20 group owners, though high
seems like a fairer limit.

Also... spec cleanup
2021-05-20 15:28:36 +10:00
Andrei Prigorshnev 6d3c975519
FIX: backtracking re-render" assertion in future-date-input (#13075)
> Backtracking re-render refers to a scenario where, in the middle of the rendering process, you have modified something that has already been rendered.

See more details from the Ember team here https://github.com/emberjs/ember.js/issues/13948.

We call _updateInput from init. _updateInput triggers onChangeInput which mutates a date that was given to future-date-input just a moment ago and a rendering cycle wasn't finished yet.
2021-05-19 14:01:23 +04:00
Arpit Jalan f96f534f3e
FIX: do not include contact url & email in client site settings payload (#13004) 2021-05-19 16:15:24 +10:00