Commit Graph

42740 Commits

Author SHA1 Message Date
Alan Guo Xiang Tan
b47a4d0207 PERF: Improve query perf when fetching unread for PM topic tracking state. (#14237)
This change helps the planner to use the
index_topics_on_timestamps_private index on topics.

Follow-up to f66007ec83
2021-09-03 15:12:13 +08:00
Martin Brennan
c401d6411b A11Y: Improve create account modal for screen readers (#14234)
Improves the create account modal for screen readers by doing the following:

* Making the `modal-alert` section into an `aria-role="alert"` region and making it show and hide using height instead of display:none so screen readers pick it up. Made a change so the field-related error messages are always shown beneath the field.
* Add `aria-invalid` and `aria-describedby` attributes to each field in the modal, so the screen reader will read out the error hint on error. This necessitated an Ember component extension to allow both the `aria-*` attributes to be bound and to render on `{{input}}`.
* Moved the social login buttons to the right in the HTML structure so they are not read out first.
* Added `aria-label` attributes to the login buttons so they can have different content for screen readers.
* In some cases for modals, the title that should be used for the `aria-labelledby` attribute is within the modal content and not the discourse-modal-title title. This introduces a new titleAriaElementId property to the d-modal component that is then used by the create-account modal to read out the title

------

This is the same as e0d2de73d8 but
fixes the Ember-input-component-extension to use the public
Ember components TextField and TextArea instead of the private
TextSupport so the extension works in both normal Ember and
Ember CLI.
2021-09-03 13:04:24 +10:00
Martin Brennan
a0fbccf612 Revert "A11Y: Improve create account modal for screen readers (#14204)" (#14233)
This reverts commit e0d2de73d8.
2021-09-03 09:42:56 +10:00
Martin Brennan
e0d2de73d8 A11Y: Improve create account modal for screen readers (#14204)
Improves the create account modal for screen readers by doing the following:

* Making the `modal-alert` section into an `aria-role="alert"` region and making it show and hide using height instead of display:none so screen readers pick it up. Made a change so the field-related error messages are always shown beneath the field.
* Add `aria-invalid` and `aria-describedby` attributes to each field in the modal, so the screen reader will read out the error hint on error. This necessitated an Ember component extension to allow both the `aria-*` attributes to be bound and to render on `{{input}}`.
* Moved the social login buttons to the right in the HTML structure so they are not read out first.
* Added `aria-label` attributes to the login buttons so they can have different content for screen readers.
* In some cases for modals, the title that should be used for the `aria-labelledby` attribute is within the modal content and not the discourse-modal-title title. This introduces a new titleAriaElementId property to the d-modal component that is then used by the create-account modal to read out the
2021-09-03 08:59:22 +10:00
Kris
75041dbbeb UX: Remove :empty on topic-statuses, clean up (#14227) 2021-09-02 15:35:35 -04:00
Penar Musaraj
90a23c6fc8 FEATURE: Enable auto dark mode on new instances (#14208) 2021-09-02 14:55:38 -04:00
Robin Ward
ea84c66fe0 DEV: This constructs a pluginId for modifyClass when dispatching events
It also helpfully adds the `ignoreMissing` option which was causing
logging issues on optional modifications before.
2021-09-02 14:50:31 -04:00
Neil Lalonde
f0d2b0f2f0 Version bump to v2.8.0.beta6 (#14228)
v2.8.0.beta5 can cause segfaults due to the oj gem v3.13.3.
v2.8.0.beta6
2021-09-02 14:25:33 -04:00
Joffrey JAFFEUX
d00bd626d8 DEV: re-enable ember-cli tests on CI (#14189) 2021-09-02 19:27:31 +02:00
Joffrey JAFFEUX
8bb331e63f DEV: prevents uppy to act on destroyed object (#14224) 2021-09-02 18:38:36 +02:00
Joffrey JAFFEUX
d2eef423c3 DEV: prevents broken tests due to focus bubbling (#14223) 2021-09-02 18:30:52 +02:00
Andrei Prigorshnev
074bce77f0 FIX: bug with navigation to the activity/topics and the activity/read pages (#14182) 2021-09-02 19:49:26 +04:00
Robin Ward
09764291b1 FIX: In test mode, initializers were modifying classes over and over
This adds a new property, `pluginId` which you can pass to `modifyClass`
which prevent the class from being modified over and over again.

This also includes a fix for polls which was leaking state between tests
which this new functionality exposed.
2021-09-02 11:22:01 -04:00
Martin Brennan
fa66d1fa82 FIX: Make bindMobileUploadButton explicit for upload mixins (#14220)
When using ComposerUpload and/or ComposerUploadUppy, we were
always calling bindMobileUploadButton. However with more composer-like
interfaces being developed, we need this to be optional, as not
everywhere will have a separate mobile upload button to bind to.

Also makes it so the composer extending the ComposerUpload mixins is
responsible for explicitly unbinding the mobile upload button if
it needs to.
2021-09-02 17:31:15 +10:00
Alan Guo Xiang Tan
6e812f30ec DEV: Don't clear sidekiq default error handlers in development. (#14205)
Restores error logs in the development environment.
2021-09-02 15:09:55 +08:00
dependabot[bot]
43f40c3cf5 Build(deps): Bump ffi from 1.15.3 to 1.15.4 (#14214)
Bumps [ffi](https://github.com/ffi/ffi) from 1.15.3 to 1.15.4.
- [Release notes](https://github.com/ffi/ffi/releases)
- [Changelog](https://github.com/ffi/ffi/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ffi/ffi/compare/v1.15.3...v1.15.4)

---
updated-dependencies:
- dependency-name: ffi
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-02 11:19:35 +08:00
dependabot[bot]
43c05ef172 Build(deps): Bump aws-eventstream from 1.1.1 to 1.2.0 (#14215)
Bumps [aws-eventstream](https://github.com/aws/aws-sdk-ruby) from 1.1.1 to 1.2.0.
- [Release notes](https://github.com/aws/aws-sdk-ruby/releases)
- [Changelog](https://github.com/aws/aws-sdk-ruby/blob/version-3/gems/aws-eventstream/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-ruby/compare/1.1.1...1.2.0)

---
updated-dependencies:
- dependency-name: aws-eventstream
  dependency-type: indirect
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-02 11:19:19 +08:00
Joshua Rosenfeld
823354d177 DEV: Update Plugin Release Notes heading format (#14218) 2021-09-02 11:08:31 +08:00
Alan Guo Xiang Tan
6a5b44be53 DEV: Pin oj gem to 3.13.2. (#14219)
Follow-up to 0183d51070
2021-09-02 11:01:54 +08:00
Sam
0183d51070 FIX: downgrade oj (#14217)
We appear to be having memory issues with oj leading to stuck proccesses

see: https://github.com/ohler55/oj/pull/695#issuecomment-911012672

not certain this will fix the issue, but worth a shot
2021-09-02 11:49:08 +10:00
Rafael dos Santos Silva
ef0471d7ae DEV: Allow passing cook_method to TopicEmbed.import to override default (#14209)
DEV: Allow passing cook_method to TopicEmbed.import to override default

This will be used in the rss-polling plugin when we want to have
oneboxes on feed content, like youtube for example.
2021-09-01 15:46:39 -03:00
Neil Lalonde
c6f1818b85 Version bump to v2.8.0.beta5 (#14210) v2.8.0.beta5 2021-09-01 13:29:36 -04:00
Penar Musaraj
4f3a7c6f07 FIX: Visible "skip navigation" link on some themes (#14211) 2021-09-01 12:53:53 -04:00
Blake Erickson
0e62602fbf FIX: Use named params correctly with dir-span (#14203) 2021-09-01 07:58:26 -06:00
Joffrey JAFFEUX
a2ca430068 DEV: prevents hooks to create leaks on widgets (#14207)
Before this, mounted widgets were not correctly unhooked and would keep a reference to a custom widget object.
2021-09-01 14:34:20 +02:00
Joffrey JAFFEUX
55739fd3c9 DEV: cards were leaking mousedown event listener (#14206) 2021-09-01 13:01:37 +02:00
dependabot[bot]
1a65f0bfbb Build(deps): Bump oj from 3.13.2 to 3.13.3 (#14202)
Bumps [oj](https://github.com/ohler55/oj) from 3.13.2 to 3.13.3.
- [Release notes](https://github.com/ohler55/oj/releases)
- [Changelog](https://github.com/ohler55/oj/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/ohler55/oj/compare/v3.13.2...v3.13.3)

---
updated-dependencies:
- dependency-name: oj
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-01 12:32:54 +08:00
Mark VanLandingham
eba317b74e DEV: Extract textarea text manipulation to mixin (#14201) 2021-08-31 14:36:26 -05:00
Kris
2bf81592ec UX: Comma separate public custom field lists (#14200) 2021-08-31 14:08:04 -04:00
Penar Musaraj
8f06528bb2 A11Y: Add "skip to main content" link (#14190) 2021-08-31 13:43:30 -04:00
Kris
94085d0996 UX: Select-kit update alignment fixes (#14199) 2021-08-31 17:44:11 +02:00
Discourse Translator Bot
59975d7433 Update translations (#14197) 2021-08-31 16:10:59 +02:00
Joffrey JAFFEUX
499c69c827 DEV: prevents _lastKeyTimeout to leak after component lifecycle (#14194) 2021-08-31 15:22:25 +02:00
Vinoth Kannan
49b2bb294e FEATURE: option to update default notification level of existing users. (#14084)
Previously, a group's `default_notification_level` change will only affect the users added after it.

Co-authored-by: Alan Guo Xiang Tan <gxtan1990@gmail.com>
2021-08-31 16:11:26 +05:30
Blake Erickson
a2ccf0a9ff DEV: Use named parameters for dir-span helper (#14195)
* DEV: Use named parameters for dir-span helper

Follow up to: e50a5c0c73

In order to improve code clarity this change introduces named parameters
for the dir-span helper. This is specifically for the new `htmlSafe`
parameter which you can use instead of just passing in a boolean if the
strings you are passing in have already been escaped.

Before: `{{dir-span category.description false}}`
After: `{{dir-span category.description htmlSafe=true}}`

* Set default value for params arg
2021-08-31 13:51:08 +08:00
Osama Sayegh
45a166b6ef FIX: Jump to reply button in post stream was not working (#14123) 2021-08-31 15:18:45 +10:00
Alan Guo Xiang Tan
c2f87e0a36 PERF: Make TopicViewSerializer#requested_group_name more efficient. (#14196)
* Avoid executing a query when the custom field doesn't exist
* Avoid generating an ActiveRecord when all we need is the name.
2021-08-31 12:05:32 +08:00
dependabot[bot]
7a604215e0 Build(deps): Bump faraday from 1.7.0 to 1.7.1 (#14191)
Bumps [faraday](https://github.com/lostisland/faraday) from 1.7.0 to 1.7.1.
- [Release notes](https://github.com/lostisland/faraday/releases)
- [Changelog](https://github.com/lostisland/faraday/blob/main/CHANGELOG.md)
- [Commits](https://github.com/lostisland/faraday/compare/v1.7.0...v1.7.1)

---
updated-dependencies:
- dependency-name: faraday
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-31 09:25:51 +08:00
dependabot[bot]
28f71e64a8 Build(deps): Bump rack-mini-profiler from 2.3.2 to 2.3.3 (#14192)
Bumps [rack-mini-profiler](https://github.com/MiniProfiler/rack-mini-profiler) from 2.3.2 to 2.3.3.
- [Release notes](https://github.com/MiniProfiler/rack-mini-profiler/releases)
- [Changelog](https://github.com/MiniProfiler/rack-mini-profiler/blob/master/CHANGELOG.md)
- [Commits](https://github.com/MiniProfiler/rack-mini-profiler/compare/v2.3.2...v2.3.3)

---
updated-dependencies:
- dependency-name: rack-mini-profiler
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-31 09:25:33 +08:00
dependabot[bot]
7163b0273a Build(deps-dev): Bump test-prof from 1.0.6 to 1.0.7 (#14193)
Bumps [test-prof](https://github.com/test-prof/test-prof) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/test-prof/test-prof/releases)
- [Changelog](https://github.com/test-prof/test-prof/blob/master/CHANGELOG.md)
- [Commits](https://github.com/test-prof/test-prof/compare/v1.0.6...v1.0.7)

---
updated-dependencies:
- dependency-name: test-prof
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-31 09:25:17 +08:00
Penar Musaraj
ba91041b35 UX: Better login/signup styling for small desktop windows (#14185)
This aims to fix UI issues when authenticating sites on DiscourseHub in
iPadOS, which uses a special dialog-like window that is about 650px wide.
2021-08-30 15:22:05 -04:00
Blake Erickson
70eca1dc4e DEV: Update api docs for search endpoint (#14181) 2021-08-30 11:25:34 -06:00
Blake Erickson
e50a5c0c73 DEV: Add default on encoding to dir-span (#14183) 2021-08-30 11:25:12 -06:00
David Taylor
ed688bec8c FIX: Ensure id sequences are not reset during db:migrate (#14184)
The seed-fu gem resets the sequence on all the tables it touches. In some situations, this can cause primary keys to be re-used. This commit introduces a freedom patch which ensures seed-fu only touches the sequence when it is less than the id of one of the seeded records.
2021-08-30 12:31:22 +01:00
Vinoth Kannan
08dce4f477 UX: use existing guardian method to check messageable group. (#14174)
We should display "Message" button only if personal messages are enabled. Currently, it's not respecting that site setting.
2021-08-30 10:38:33 +05:30
Vinoth Kannan
465774cf2c UX: display correct replies count in embedded comments view. (#14175)
Previosuly, the reply count included the "small_action" posts too. It also caused the broken embed HTML issue.
2021-08-30 10:37:53 +05:30
dependabot[bot]
55b22af3b6 Build(deps): Bump nokogiri from 1.12.3 to 1.12.4 (#14187)
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.12.3 to 1.12.4.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.12.3...v1.12.4)

---
updated-dependencies:
- dependency-name: nokogiri
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-30 10:19:39 +08:00
dependabot[bot]
ffced30a25 Build(deps): Bump bootsnap from 1.8.0 to 1.8.1 (#14186)
Bumps [bootsnap](https://github.com/Shopify/bootsnap) from 1.8.0 to 1.8.1.
- [Release notes](https://github.com/Shopify/bootsnap/releases)
- [Changelog](https://github.com/Shopify/bootsnap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Shopify/bootsnap/compare/v1.8.0...v1.8.1)

---
updated-dependencies:
- dependency-name: bootsnap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-30 10:19:21 +08:00
David Taylor
b47f288b13 FIX: Update PresenceChannel#present to work for redis 6.0 (#14180)
The `LT` parameter was only added in redis 6.2. We can make do with `NX` instead
2021-08-27 19:44:28 +01:00
David Taylor
01e2836071 FIX: Allow PresenceChannel to work on Redis 6.0 (#14178)
The `ZRANGE ... BYSCORE` syntax was only added in 6.2. We can use the older `ZRANGEBYSCORE` instead
2021-08-27 18:55:54 +01:00