Commit Graph

53107 Commits

Author SHA1 Message Date
Alan Guo Xiang Tan
a8b4d2e82c
DEV: Drop distributed mutex fromSidebarSiteSettingsBackfiller#backfill! (#25674)
Why this change?

Backfilling can take a long time on a site with many users. As a
result, the `DistriburedMutex` will warn in the logs when the block takes
more than 60 seconds to complete. We can increase the lock validity but
the method is currently only called from a job which has a
`cluster_concurrency` set to `1`. Therefore, it is actually not
necessary for us to hold a `DistributedMutex` here.

What does this change do?

1. Removes the distributed mutex and adds a comment about the risk of
   calling the `SidebarSiteSettingsBackfiller#backfill!` method.a

2. Delete old sidebar category section links in batches for all users
   to avoid a single long running query.
2024-02-15 06:21:03 +08:00
Kris
52fb523bbb
UX: show the full mobile read-state indicator (#25678) 2024-02-14 15:52:02 -05:00
Blake Erickson
bb261094cf
FEATURE: Auto generate and display video preview image (#25633)
This change will allow auto generated video thumbnails to be used
instead of the black video thumbnail that overlays videos.

Follow up to: 2443446e62
2024-02-14 13:43:53 -07:00
Andrei Prigorshnev
e83d8fb3e2
FIX: Allow several chat channels to have an empty slug (#25680)
In certain cases, chat channels may have empty slugs, it happens when:

1. The `slug_generation_method` setting is set to `None`
2. `slug_generation_method` is set to `ASCII` and a channel with 
a Unicode name and an empty slug is created (in this case, the code 
that creates channels tries to generate a slug and fallbacks to an empty slug)

At the moment, we have a unique index on the `chat_channels.slug` column 
which leads to errors when creating several channels with empty slugs 
(Discourse is able to create one such channel, but when trying to create 
the second one fails because of the unique constraint). This PR fixes that 
by adding a `where` condition to the index. Slugs still have to be unique, 
but now many channels may have empty slugs.

This fix is similar to the one we made to the category slugs – 7ba914f1e1.
2024-02-15 00:39:39 +04:00
Keegan George
10b33bc601
DEV: API extra markup to image wrapper (#25575) 2024-02-14 12:20:53 -08:00
Shane Scanlon
53a198ad55
FIX: Hide timer info on topic status toggle (#25596)
Use topic.topic_status_update value to hide timer info after status
change.
2024-02-14 11:40:40 -05:00
Kris
2323f09eb0
A11Y: change composer role to dialog, improve aria-labels (#25666) 2024-02-14 11:09:54 -05:00
Ella E
acca39036b
Update INSTALL-cloud.md screenshots and copy when landed on the forum homepage (#25671) 2024-02-14 07:31:44 -07:00
Ted Johansson
7522957aaa
FIX: Touch up illegal flag type translations (#25670)
When we launched the new illegal flag type, there were a few problems with the translations:

The translation for the message in the e-mail was missing and in the review queue, the message read: "Is this it's illegal?"

In this PR the missing translation key has been added. For the review queue there was a coupling of the name rendering to whether the flag is of "custom" type, but this is also used for deciding whether we render the textbox for additional details. I think these two things should not be coupled together. For now I have instead hard-coded the existing "custom" types when formatting the name. We can potentially improve this later.
2024-02-14 18:44:32 +08:00
David Taylor
915f7cdb27
FIX: Do not add "tag-" class to pages with no tag filter (#25677) 2024-02-14 10:24:02 +00:00
David Taylor
02177bb46d
UX: Add loading indicator to 'new or updated' PM banner (#25676)
Same as 9883e6a0c8, but for lists of PMs
2024-02-14 10:08:31 +00:00
Krzysztof Kotlarek
c03d22f633
FIX: serialize can_ignore_users (#25672)
Bug introduced in this PR https://github.com/discourse/discourse/pull/25585/files#diff-55dea7dea5b8655da575a2f23156240686c956d081d36ea9976d38b29b72b5d2R130

`can_ignore_users` method was created but not added to attributes and therefore it was not serialized.
2024-02-14 15:17:19 +11:00
Tobias Eigen
709bed5d1c
removed broken link and comments from no_index.erb (#25648)
We intend to move guidance about how to configure robots.txt to the admin interface and a documentation topic on meta.
2024-02-14 12:09:24 +08:00
Jeff Wong
cd99e20fd1
DEV: Add conflict resolution to migration min trust level for here mention to group (#25667) 2024-02-13 17:19:17 -08:00
Kris
037def8624
UX: clarify old dates with YYYY instead of 'YY (#25661)
* UX: clarify old dates with YYYY instead of 'YY

* update formatter test
2024-02-14 10:32:50 +11:00
Mark VanLandingham
4f75cee6d2
FIX: Don't unnecessarily scrub query params from homepage (#25665)
Seems like an accident that the homepage route will always strip all query params from the URL.. This fixes that :)
2024-02-13 14:50:27 -06:00
Daniel Waterworth
d1ebca90ff
DEV: Convert sidebar edit navigation modal/categories modal to gjs (#25662) 2024-02-13 13:22:31 -06:00
Bianca Nenciu
9a6406d4bb
FIX: Preload user-specific category fields (#25663)
This is used when lazy_load_categories is enabled to fetch more info
about the category.
2024-02-13 20:00:44 +02:00
Ella E
1f50e7e38f
UX: Set width for the new feature items (#25657) 2024-02-13 10:17:17 -07:00
Kris
faf0807b37
FIX: email category badges shouldn't use category text color (#25655) 2024-02-13 10:18:36 -05:00
Discourse Translator Bot
8eab06cb2f
Update translations (#25659) 2024-02-13 16:11:30 +01:00
David Taylor
061e79297f
DEV: Convert User model to native class syntax (#25628)
This commit was created with a combination of the ember-native-class-codemod and manual cleanup.

User-status-related functionality was previously encapsulated in its own `User.reopen` call, which is essentially an 'inline mixin'. This commit refactors it into a utility class, with an instance accessible on `User#statusManager`
2024-02-13 10:49:18 +00:00
David Taylor
9883e6a0c8
UX: Add loading indicator when loading 'new or updated topics' (#25649)
Also improves error handling so that the action can be retried if the network request fails
2024-02-13 10:41:22 +00:00
Joffrey JAFFEUX
06bbed69f9
DEV: allows a context when creating a message (#25647)
The service `Chat::CreateMessage` will now accept `context_post_ids` and `context_topic_id` as params. These values represent the topic which might be visible when sending a message (for now, this is only possible when using the drawer).

The `DiscourseEvent` `chat_message_created` will now have the following signature:

```ruby
on(:chat_message_created) do | message, channel, user, meta|
  p meta[:context][:post_ids]
end
```
2024-02-13 11:37:15 +01:00
chapoi
2bd0a8f432
UX: Onebox container sizing (#25658)
* UX: scope onebox container size to not images

* UX: increase max-width for onebox img
2024-02-13 10:06:29 +01:00
chapoi
7cd5d646d2
UX: set zindex of chat action menu higher (#25645) 2024-02-13 09:25:42 +01:00
David Battersby
d7dd871d9f
FIX: quoted private topic url respects subfolder install (#25643)
Fixes an issue where private topics that are quoted have an incorrectly formatted url when using a subfolder install.

This update returns a relative url that includes the base_path rather than a combination of base_url + base_path.
2024-02-13 13:20:24 +08:00
David Battersby
85001a27e9
FIX: sort chat channels by slug (#25656)
Channels can include emojis in front of the channel title which causes problems when sorting.

Using the channel slug is a more reliable way to sort and avoid these kind of issues.
2024-02-13 12:59:46 +08:00
Krzysztof Kotlarek
949b5f3fa9
FIX: no reply as a new topic without permission (#25641)
`create topic allowed groups` site setting controls permission to create a new topic.

If a user cannot create a topic, a reply as a new topic button should not be visible as well.
2024-02-13 09:26:13 +11:00
Penar Musaraj
021a02c3d8
FIX: Webauthn origin was incorrect for subfolder setups (#25651) 2024-02-12 16:27:24 -05:00
dependabot[bot]
7eb1215cb1
Build(deps-dev): Bump @floating-ui/dom from 1.6.2 to 1.6.3 in /app/assets/javascripts (#25653)
* Build(deps-dev): Bump @floating-ui/dom in /app/assets/javascripts

Bumps [@floating-ui/dom](https://github.com/floating-ui/floating-ui/tree/HEAD/packages/dom) from 1.6.2 to 1.6.3.
- [Release notes](https://github.com/floating-ui/floating-ui/releases)
- [Changelog](https://github.com/floating-ui/floating-ui/blob/master/packages/dom/CHANGELOG.md)
- [Commits](https://github.com/floating-ui/floating-ui/commits/@floating-ui/dom@1.6.3/packages/dom)

---
updated-dependencies:
- dependency-name: "@floating-ui/dom"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

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

* Update lockfiles for ember version flag

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: discoursebuild <build@discourse.org>
2024-02-12 22:20:12 +01:00
Isaac Janzen
6acc203786
DEV: Only autocomplete search result when suggestion keyword present (#25652) 2024-02-12 13:54:03 -07:00
Mark VanLandingham
d4fb6e1437
DEV: Use PosterSerializer for SuggestedTopicSerializer posters (#25650)
The only addition is PosterSerializer is this:

discourse/app/serializers/poster_serializer.rb

Line 4 in 4a5616f

Which allows themes to check the posters' primary group!
2024-02-12 14:04:02 -06:00
David Taylor
4a5616fe86
UX: Make refresh notice copy more friendly (#25646)
'please refresh, or you may experience unexpected behavior' sounds quite threatening to me. 'please refresh to to keep things working smoothly' conveys the same information in a more friendly way
2024-02-12 15:54:44 +00:00
Mark VanLandingham
9c36d6ec48
UX: Don't display empty state while changing notification filter (#25631) 2024-02-12 08:23:46 -06:00
dependabot[bot]
a48bf1aaec
Build(deps): Bump request_store from 1.5.1 to 1.6.0 (#25636)
Bumps [request_store](https://github.com/steveklabnik/request_store) from 1.5.1 to 1.6.0.
- [Release notes](https://github.com/steveklabnik/request_store/releases)
- [Commits](https://github.com/steveklabnik/request_store/compare/v1.5.1...v1.6.0)

---
updated-dependencies:
- dependency-name: request_store
  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>
2024-02-12 13:55:38 +01:00
dependabot[bot]
c650f41acf
Build(deps-dev): Bump @floating-ui/dom from 1.6.1 to 1.6.2 in /app/assets/javascripts (#25635)
* Build(deps-dev): Bump @floating-ui/dom in /app/assets/javascripts

Bumps [@floating-ui/dom](https://github.com/floating-ui/floating-ui/tree/HEAD/packages/dom) from 1.6.1 to 1.6.2.
- [Release notes](https://github.com/floating-ui/floating-ui/releases)
- [Changelog](https://github.com/floating-ui/floating-ui/blob/master/packages/dom/CHANGELOG.md)
- [Commits](https://github.com/floating-ui/floating-ui/commits/@floating-ui/dom@1.6.2/packages/dom)

---
updated-dependencies:
- dependency-name: "@floating-ui/dom"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

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

* Update lockfiles for ember version flag

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: discoursebuild <build@discourse.org>
2024-02-12 13:55:22 +01:00
Bianca Nenciu
11e322abbf
DEV: Fix tests (#25644)
Follow up to commit 1403217ca4.
2024-02-12 14:29:23 +02:00
Ted Johansson
beea8215d7
DEV: Drop deprecated columns (#25640)
Since we just released 3.2, this is a good time to drop deprecated columns. This is a two-phase process. First we drop the columns, then we remove the ignored_columns declarations. Because of that I'm batching all deprecated columns for dropping here first. Once a full deploy is done we remove the declarations.
2024-02-12 19:35:14 +08:00
David Battersby
aac28b9048
FIX: sort chat channels by mentions, unread and channel title (#25565)
This change will sort channels by activity on mobile, with preference to those with urgent or unread messages.

Channels with mentions will appear first, followed by channels with unread messages, then finally everything else sorted by the channel title (alphabetically).
2024-02-12 18:19:16 +08:00
Bianca Nenciu
1403217ca4
FEATURE: Async load of category and chat hashtags (#25526)
This commit includes several changes to make hashtags work when "lazy
load categories" is enabled. The previous hashtag implementation use the
category colors CSS variables, but these are not defined when the site
setting is enabled because categories are no longer preloaded.

This commit implements two fundamental changes:

1. load colors together with the other hashtag information

2. load cooked hashtag data asynchronously

The first change is implemented by adding "colors" to the HashtagItem
model. It is a list because two colors are returned for subcategories:
the color of the parent category and subcategory.

The second change is implemented on the server-side in a new route
/hashtags/by-ids and on the client side by loading previously unseen
hashtags, generating the CSS on the fly and injecting it into the page.

There have been minimal changes outside of these two fundamental ones,
but a refactoring will be coming soon to reuse as much of the code
and maybe favor use of `style` rather than injecting CSS into the page,
which can lead to page rerenders and indefinite grow of the styles.
2024-02-12 12:07:14 +02:00
Martin Brennan
6b596151ff
DEV: Change Group.trusted_group_ids to use const (#25639)
We have AUTO_GROUPS, we can use this instead of the
hardcoded 10..19 (not even sure why it goes up to 19,
trust levels previously only went to 5 max).
2024-02-12 12:36:00 +10:00
Martin Brennan
d80345fa83
DEV: Chat hashtag test (#25638)
Followup a2a2785f0b, moving
stuff to an existing test.
2024-02-12 12:32:52 +10:00
Martin Brennan
cf4d92f686
FIX: Change max_image_megapixels logic (#25625)
This commit changes `max_image_megapixels` to be used
as is without multiplying by 2 to give extra leway.
We found in reality this was just causing confusion
for admins, especially with the already permissive
40MP default.
2024-02-12 09:56:43 +10:00
dependabot[bot]
fb83058e9d
Build(deps-dev): Bump crack from 0.4.6 to 1.0.0 (#25637) 2024-02-11 23:56:19 +01:00
Ella E
427e11b177
DEV: move the margin to 'configure more' link on the setup wizard (#25626) 2024-02-09 13:55:50 -07:00
Kris
c49eb373de
FIX: render category badge styles inline for email (#25487) 2024-02-09 15:29:11 -05:00
Bianca Nenciu
a2a2785f0b
FIX: Look up all channel hashtags (#25617) 2024-02-09 19:59:38 +02:00
Daniel Waterworth
6311a80724
FIX: Preload associations on subcategories when lazy loading categories (#25630) 2024-02-09 11:48:26 -06:00
Daniel Waterworth
250ce25ca3
DEV: Clarify site-setting category-list concurrency protection (#25614) 2024-02-09 10:14:00 -06:00