Commit Graph

47263 Commits

Author SHA1 Message Date
Alan Guo Xiang Tan 8b2c2e5c34
UX: Align user page dismiss notifications btn with new navigation (#19235)
This change only affects the redesign user page navigation menu. The
dismiss button was incorrectly positioned below the user notifications
stream. A side effect of this is that it affected our infinite loading
code for the notifications stream.

No tests have been added in this commit as we have yet to quite figure
out how we can reliabily test for behaviours which requires us to scroll
the page.
2022-11-29 10:33:31 +08:00
Martin Brennan 6f0b9bb1c4
FIX: Allow hashtag autocomplete at start of line (#19216)
Back when we introduced hashtag autocomplete in
c1dbf5c1c4 we had to
disallow triggering it using # at the start of the
line because our old markdown engine rendered headers
with `#abc`, but now our new engine does `# abc` so
it is safe to allow hashtag autocompletion straight
away.
2022-11-29 10:56:17 +10:00
Krzysztof Kotlarek 787655e276
FIX: consistent narrow desktop width (#19232)
- use client rect instead of innerWidth to determine if screen is narrow
- disable _animate when exit mobile/narrow view
2022-11-29 11:03:54 +11:00
dependabot[bot] 7c75b5b100
Build(deps): Bump rack-protection from 3.0.3 to 3.0.4 (#19230)
Bumps [rack-protection](https://github.com/sinatra/sinatra) from 3.0.3 to 3.0.4.
- [Release notes](https://github.com/sinatra/sinatra/releases)
- [Changelog](https://github.com/sinatra/sinatra/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sinatra/sinatra/compare/v3.0.3...v3.0.4)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-29 00:35:23 +01:00
dependabot[bot] 2c37251e90
Build(deps): Bump engine.io in /app/assets/javascripts (#19233)
Bumps [engine.io](https://github.com/socketio/engine.io) from 6.2.0 to 6.2.1.
- [Release notes](https://github.com/socketio/engine.io/releases)
- [Changelog](https://github.com/socketio/engine.io/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/engine.io/compare/6.2.0...6.2.1)

---
updated-dependencies:
- dependency-name: engine.io
  dependency-type: indirect
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-29 00:18:05 +01:00
Alan Guo Xiang Tan f14189eb3b
FIX: PMs displaying outdated unread counts when read status is processing (#19217)
When a client "reads" a post, we do no immediately send the data of the
post for processing on the server. Instead, read posts data is batched
together and sent to the server for processing at regular intervals. On
the server side, processing of read posts data is done in the
background. As such, there is a small window of delay before a post is
marked as read by a user on the server side.

If a client reads a topic and loads the messages topic list before the
server has processed the read post, the unread posts count for the topic
which the client just read will appear to be incorrect/outdated.

As part of tracking a post as read, we are already tracking the highest
read post number for the last read topic by the client. Therefore, we
can use this information to correct the highest post read number in the
scenario that was described above. This solution is the same as what
we've been doing for the regular topics list.
2022-11-29 05:55:48 +08:00
dependabot[bot] 07bc3ba139
Build(deps-dev): Bump bullet from 7.0.3 to 7.0.4 (#19229)
Bumps [bullet](https://github.com/flyerhzm/bullet) from 7.0.3 to 7.0.4.
- [Release notes](https://github.com/flyerhzm/bullet/releases)
- [Changelog](https://github.com/flyerhzm/bullet/blob/master/CHANGELOG.md)
- [Commits](https://github.com/flyerhzm/bullet/compare/7.0.3...7.0.4)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-29 05:44:22 +08:00
Joffrey JAFFEUX f7c29d959b
FIX: do not apply hover state to non capable devices (#19228) 2022-11-28 21:33:44 +01:00
Gerhard Schlager 0593e5f7c3
UX: Add instructions for multiple category emails (#19221) 2022-11-28 20:51:50 +01:00
Joffrey JAFFEUX 0291e1bf45
DEV: skip breaking tests (#19226) 2022-11-28 20:33:49 +01:00
chapoi bf9b346b76
UX: chat index UX fixes (#19227) 2022-11-28 20:33:39 +01:00
Leonardo Mosquera bfecbde837
Fixes for vBulletin bulk importer (#17618)
* Allow taking table prefix from env var

* FIX: remove unused column references

The columns `filedata` and `extension` are not present in a v4.2.4
database, and they aren't used in the method anyways.

* FIX: report progress for tables without imported_id

* FIX: effectively check for AR validation errors

NOTE: other migration scripts also have this problem; see /t/58202

* FIX: properly count Posts when importing attachments

* FIX: improve logging

* Remove leftover comment

* FIX: show progress when exporting Permalink file

* PERF: stream Permalink file

The current way results in tons of memory usage; write once per line instead

* Document fixes needed

* WIP - deduplicate category names

* Ignore non alphanumeric chars for grouping

* FIX: properly deduplicate user emails by merging accounts

* FIX: don't merge empty UserEmails

* Improve logging

* Merge users AFTER fixing primary key sequences

* Parallelize user merging

* Save duplicated users structure for debugging purposes

* Add progress logging for the (multiple hour) user merging step
2022-11-28 16:30:19 -03:00
Joffrey JAFFEUX a3abbe07db
FIX: ensures date/time don't linebreak (#19225) 2022-11-28 19:43:36 +01:00
David Taylor 7e504a1489
DEV: Only patch bootbox methods once in tests (#19222)
We were re-patching the deprecated bootbox methods during every app initialization, which would lead to hundreds of deprecation messages being printed for a single invocation.
2022-11-28 18:14:35 +00:00
Keegan George 7a8e018965
UX: reworks channel index (drawer and mobile) (#18892)
- Multiple style improvements
- adds last sent message date to the view

Co-authored-by: chapoi <charlie@discourse.org>
Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2022-11-28 18:38:05 +01:00
Roman Rizzi 07a9163ea8
FEATURE: Deleting a user with their posts also deletes chat messages. (#19194)
This commit introduce a new API for registering callbacks, which we'll execute when a user gets destroyed, and the `delete_posts` opt is true. The chat plugin registers one callback and queues a job to destroy every message from that user in batches.
2022-11-28 13:32:57 -03:00
communiteq 7dfe85fcc7
DEV: Xenforo importer improvements (#18457)
* Fix: make expressions non-greedy
* Feature: import Xenforo avatars
* Feature: import Xenforo likes
* Feature: import Xenforo private messages
* Feature: Xenforo create permalinks
* Feature: Xenforo migrate view counts
* Fix: Xenforo list regexes
* Fix: Xenforo import all attachments
2022-11-28 16:42:39 +01:00
Pierre Ozoux 9e9235ca62
FEATURE: Add import script for Elgg (#19140) 2022-11-28 16:28:08 +01:00
Roman Rizzi 6d9e950cac
FIX: Unsilence users on chat message flag disagree. (#19198)
* FIX: Unsilence users on chat message flag disagree.

We have an auto silence rule in place for chat message flags, so we need to unsilence users if the flag gets rejected.

Additionally, it also fixes the `disagree_and_restore` action, which wasn't recovering a deleted message.

* Update plugins/chat/spec/models/reviewable_chat_message_spec.rb

Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>

Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2022-11-28 11:11:35 -03:00
Joffrey JAFFEUX 0cb6d8c8fc
FIX: prevents audio to play when appended (#19199) 2022-11-28 09:22:13 +01:00
Krzysztof Kotlarek 46c44a3b0f
FIX: toggle sidebar when back from narrow screen (#19215)
When sidebar was enabled before going to narrow screen, it should be brought back when screen is enlarged.

Also, narrow screen value is changed to 1000px instead of 1100px.
2022-11-28 13:13:36 +11:00
Martin Brennan f8d1b794cd
Version bump to v2.9.0.beta13 (#19212) 2022-11-28 10:58:43 +10:00
Martin Brennan 73803cf8f7
Revert "Version bump to v2.9.0.beta13 (#19210)" (#19211)
This reverts commit a71f6cf09b.

The github UI had an error I didn't notice which resulted
in a security commit being merged _after_ the bump, now
I have to redo the bump.
2022-11-28 10:57:06 +10:00
Martin Brennan 3de765c895
SECURITY: Limit chat message char length (#19207)
Only allow maximum of 6000 characters for chat messages when they
are created or edited. A hidden setting can control this limit,
6000 is the default.

There is also a migration here to truncate any existing messages to
6000 characters if the message is already over that and if the
chat_messages table exists. We also set cooked_version to NULL
for those messages so we can identify them for rebake.
2022-11-28 10:48:30 +10:00
Martin Brennan a71f6cf09b
Version bump to v2.9.0.beta13 (#19210) 2022-11-28 10:44:25 +10:00
Martin Brennan c6ee28ec75
SECURITY: Hide notifications for inaccessible topics (#19208)
Filter notifications the user cannot see anymore
via guardian.can_see_topic_ids
2022-11-28 10:41:57 +10:00
dependabot[bot] 6335b2c7ba
Build(deps): Bump parser from 3.1.2.1 to 3.1.3.0 (#19206)
Bumps [parser](https://github.com/whitequark/parser) from 3.1.2.1 to 3.1.3.0.
- [Release notes](https://github.com/whitequark/parser/releases)
- [Changelog](https://github.com/whitequark/parser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/whitequark/parser/compare/v3.1.2.1...v3.1.3.0)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-28 08:08:47 +08:00
dependabot[bot] 3b87825235
Build(deps): Bump bootsnap from 1.14.0 to 1.15.0 (#19203)
Bumps [bootsnap](https://github.com/Shopify/bootsnap) from 1.14.0 to 1.15.0.
- [Release notes](https://github.com/Shopify/bootsnap/releases)
- [Changelog](https://github.com/Shopify/bootsnap/blob/main/CHANGELOG.md)
- [Commits](https://github.com/Shopify/bootsnap/compare/v1.14.0...v1.15.0)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-28 05:46:11 +08:00
dependabot[bot] b0065e2873
Build(deps): Bump jmespath from 1.6.1 to 1.6.2 (#19205)
Bumps [jmespath](https://github.com/trevorrowe/jmespath.rb) from 1.6.1 to 1.6.2.
- [Release notes](https://github.com/trevorrowe/jmespath.rb/releases)
- [Changelog](https://github.com/jmespath/jmespath.rb/blob/main/CHANGELOG.md)
- [Commits](https://github.com/trevorrowe/jmespath.rb/compare/v1.6.1...v1.6.2)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-27 22:37:17 +01:00
dependabot[bot] a4e1b644d7
Build(deps): Bump image_optim from 0.31.1 to 0.31.2 (#19204)
Bumps [image_optim](https://github.com/toy/image_optim) from 0.31.1 to 0.31.2.
- [Release notes](https://github.com/toy/image_optim/releases)
- [Changelog](https://github.com/toy/image_optim/blob/master/CHANGELOG.markdown)
- [Commits](https://github.com/toy/image_optim/compare/v0.31.1...v0.31.2)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-27 22:22:04 +01:00
Joffrey JAFFEUX b032115506
DEV: removes select-kit deprecation (#19200) 2022-11-26 15:17:43 +01:00
Joffrey JAFFEUX 637fb9831b
FIX: ensures chat sidebar is present when core sidebar is disabled (#19197) 2022-11-25 19:28:10 +01:00
Joffrey JAFFEUX 34f4d51238
FIX: prevents drawer error when resizing core composer (#19195)
The drawer is registering events which are expecting the drawer to always be present which was not the case anymore. A previous refactor also changed this component to be tagless.
2022-11-25 18:33:54 +01:00
Joffrey JAFFEUX 9ade68233c
UX: alters chat icon behavior on drawer and mobile (#19192)
Refines the behavior of clicking the chat icon in mobile and when in drawer mode as follows: If chat is open, clicking the icon takes you to the index.
2022-11-25 15:12:32 +01:00
Rafael dos Santos Silva 90411540c7
FIX: Use correct Regexp flag to ignore case (#19184)
Ruby 3.2 started enforcing valid string flags in Regexp constructor.
2022-11-25 10:56:59 -03:00
Joffrey JAFFEUX 84c1cc70d6
REFACTOR: naming and state refactor (#19187)
- better handling of drawer state using chat state manager
- removes various float and topic occurrences to use drawer
- ensures user can chat before doing a lot of chat setup
- fixes a bug which was creating presence errors in tests
- removes dead code
2022-11-25 14:15:38 +01:00
Martin Brennan cad2fe6089
FIX: Push category hashtag slug match to top (#19174)
When searching for categories it is possible for
a child category to have a slug that matches the term
exactly, but will not be found by .lookup since we
don't return these categories unless the ref matches
parent:child.

Introduces a search_sort method to each hashtag data
source so they can provide their custom sort logic of
results, in category's case putting all matching slugs
to the top regardless of parent/child relationship
then sorting by text.
2022-11-25 15:28:49 +10:00
Krzysztof Kotlarek 5b6604f5a7
FEATURE: sidebar for narrow desktop screen (#19160)
When desktop screen is narrow like < 1100px, sidebar should behave similarly to mobile version.
2022-11-25 15:33:26 +11:00
Alan Guo Xiang Tan 20715cd7f0
DEV: Refactor messages code to use `user.groupsWithMessages` function (#19189)
Simplifies the template since we have one less conditional and one less
level of nesting
2022-11-25 11:23:50 +08:00
Martin Brennan bbcb69461f
FIX: Existing users were mistakenly unable to redeem invite (#19191)
Follow up to 40e8912395

In this previous commit I introduced a bug that prevented
a legitimate case for an existing user to redeem an invite,
where the email/domain were both blank and the invite was
still redeemable by the user. Fixes the issue and adds more
specs for that case.
2022-11-25 11:57:04 +10:00
Sam 755ca0fcbb
PERF: stop downloading images from post processor and lean on uploads
Previously we would unconditionally fetch all images via HTTP to grab
original sizing from cooked post processor in 2 different spots.

This was wasteful as we already calculate and cache this info in upload records.

This also simplifies some specs and reduces use of mocks.
2022-11-25 12:40:31 +11:00
Alan Guo Xiang Tan 45f3e9f19e
DEV: Publish reviewable claimed topic message to groups instead of users (#19188)
I'm hesitant to call this a performance improvement since claiming a
reviewable is probably rare. However, this commit cuts out two DB
queries each time we have to publish a reviewable claimed message. More
importantly, publishing to groups scales much better than publishing to
users because we esstentially cap the number ids we have to load into
memory.
2022-11-25 08:07:29 +08:00
Osama Sayegh 498fa14347
UX: Show educational messages for the likes tab when it's empty (#19180)
This commit adds some content to educate the user about the likes tab in the user menu when it's blank.
Internal topic: t/76879.
2022-11-24 22:13:21 +03:00
David Taylor abe2813789
DEV: Add useful error message for hbs register_asset (#19185)
This hasn't been necessary for many years, and is no longer supported following 84bec1cb. Only extremely old plugins might be trying to do this. All the affected open-source plugins I can find have already been updated.
2022-11-24 19:03:06 +00:00
dependabot[bot] c4fdc48164
Build(deps-dev): Bump @embroider/test-setup in /app/assets/javascripts (#19170)
Bumps [@embroider/test-setup](https://github.com/embroider-build/embroider/tree/HEAD/packages/test-setup) from 1.8.3 to 2.0.0.
- [Release notes](https://github.com/embroider-build/embroider/releases)
- [Changelog](https://github.com/embroider-build/embroider/blob/main/CHANGELOG.md)
- [Commits](https://github.com/embroider-build/embroider/commits/HEAD/packages/test-setup)

---
updated-dependencies:
- dependency-name: "@embroider/test-setup"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-24 17:59:18 +01:00
dependabot[bot] 38123228fc
Build(deps): Bump terser in /app/assets/javascripts (#19183)
Bumps [terser](https://github.com/terser/terser) from 5.15.1 to 5.16.0.
- [Release notes](https://github.com/terser/terser/releases)
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/commits)

---
updated-dependencies:
- dependency-name: terser
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-24 17:32:18 +01:00
Jarek Radosz 57a573eee3
DEV: Update terser (#19109)
The `decodedMap` prop comes from https://github.com/terser/terser/pull/1190

> This also exposes a new `decodedMap` property on the result object. Decoded maps are free to create (it's a shallow clone of the `GenMapping` instance), and passing them to `@jridgewell/trace-mapping` is copy-free. With Babel [recently](https://github.com/babel/babel/pull/14497) adding a `decodedMap` field, a dev could pass from the Babel transpilation to Terser without any added memory use for sourcemaps.
2022-11-24 17:15:46 +01:00
Selase Krakani 767e8ec730
FIX: Pass period filter to plugin outlet (#19182)
Pass period filter to `admin-dashboard-moderation-bottom` plugin outlet.

This allows plugins to render period filtered moderation data/report
2022-11-24 15:40:02 +00:00
David Taylor aac3f15236
DEV: Add hint about Rails-generated `<head>` to ember-cli HTML (#19181) 2022-11-24 15:31:10 +00:00
Andrei Prigorshnev 6357a3ce33
FEATURE: User Status API (#19149)
This adds API scope for the user status. This also adds a get method to the user status controller. We didn't need a dedicated method that returns status before because the server returns status with user objects, but I think we need to provide this method for API clients.
2022-11-24 19:16:28 +04:00