Commit Graph

49892 Commits

Author SHA1 Message Date
Kyle
9515bb5add
Fix structural problems with the openapi spec (#22256)
* Fix structural problems with the openapi spec

* Fix array issue for items
2023-06-23 11:06:45 -06:00
Mark VanLandingham
36b9572bb1
FIX: Attempt to reconnect to server when browser visibilty changes (#22259) 2023-06-23 11:32:34 -05:00
Penar Musaraj
a984a807fd
A11Y: Don't output aria-labelledby when card is empty (#22247)
The user card is always present in the DOM. Therefore we only need to
add the `aria-labelledby` attribute when there is a user (and a title)
to point to.
2023-06-23 09:25:03 -04:00
dependabot[bot]
4e5575c065
Build(deps): Bump sass-embedded from 1.63.5 to 1.63.6 (#22249) 2023-06-23 15:03:22 +02:00
chapoi
a2a31eb420
UX: adding max height to image in chat blockquote (#22255)
* UX: adding max height to  blockquote image in chat
2023-06-23 10:33:12 +02:00
Alan Guo Xiang Tan
303fcf303c
FEATURE: Add dropdown to filter by selected in edit nav menu modal (#22251)
What does this change do?

This change adds a dropdown filter that allows a user to filter by
selected or unselected categories/tags in the edit navigation menu
modal.

For the categories modal, parent categories that do not match the
dropdown filter will be displayed as disabled since those parent
categories need to be displayed to maintain the hieracy of the child
child categories.
2023-06-23 10:29:00 +08:00
Alan Guo Xiang Tan
2dd9ac6277
DEV: Improve PageObjects::Components::Sidebar#has_tag_section_links? (#22250)
Why this change?

Predicate matchers are poor at providing good error messages when it
fails if all the predicate matcher does is to return a boolean. Prior to
this change, we were using `has_css? && all?` to assert for the tag
section links. There are two problems here. Firstly, when one of the matchers
fail, the error message does not provide any indication of which matcher
failed making it hard to debug failures. Secondly, the matchers were not
able to assert for the ordering of the tag section links which is an
important behaviour to assert for.

This commit changes `PageObjects::Components::Sidebar#has_tag_section_links?`
such that we make use of assertions to ensure ordering. The usage of
`all` will also provide a clear error message when things go wrong.
2023-06-23 08:39:37 +08:00
Alan Guo Xiang Tan
6e3f3dff86
DEV: Refactor edit tags/categories modal to reduce duplication (#22240)
Why this change?

There was alot of duplication between the edit navigation menu tags/categories modal which
was making it hard to introduce new changes as the work had to be
duplicated into multiple places.

This commit mainly extracts the duplicated code into common components
such that it is easier to make styling changes across both modals.
2023-06-23 08:28:55 +08:00
Penar Musaraj
92389e5475
UX: Fix overridden setting highlight color (#22245) 2023-06-22 18:01:48 -04:00
Penar Musaraj
808c6ad1cd
A11Y: Adjust contrast and font size for mini profiler widget (#22246) 2023-06-22 18:01:21 -04:00
Jarek Radosz
ba62d20f71
DEV: Update ember-template-lint (#22242) 2023-06-22 22:54:46 +02:00
Daniel Waterworth
6f8056572e
DEV: Refactor updating parent/child relationships between themes (#22244)
The prior add_relative_themes! method was confusing and cleared the
cache repeatedly instead of once for the whole operation.
2023-06-22 13:57:39 -05:00
Jan Cernik
24c90534fb
FIX: Use Twitter API v2 for oneboxes and restore OpenGraph fallback (#22187) 2023-06-22 14:39:02 -03:00
Osama Sayegh
b27e12445d
FEATURE: Split navigation preference for count and behavior of sidebar links (#22203)
This PR splits up the preference that controls the count vs dot and destination of sidebar links, which is really hard to understand, into 2 simpler checkboxes:

The new preferences/checkboxes are off by default, but there are database migrations to switch the old preference to the new ones so that existing users don't have to update their preferences to keep their preferred behavior of sidebar links when this changed is rolled out.

Internal topic: t/103529.
2023-06-22 19:04:13 +03:00
Mark VanLandingham
fcaa9757f3
DEV: Use online/offline window events to track network connectivity (#22243) 2023-06-22 09:09:28 -05:00
tshenry
dccdbd52a3
DEV: Add plugin outlet to latest-topic-list-item component (#22238)
Introduces a new above-latest-topic-list-item-post-count outlet, providing a clean way to add other useful elements to the topic-stats section of the latest-topic-list-item template.
2023-06-22 01:24:00 -07:00
Alan Guo Xiang Tan
d875e6e998
UX: Fix edit tags/categories navigation menu modal has no focus on input (#22237)
What this change?

When a user opens the modal to edit tags or categories for the
navigation menu, we want to input filter to have focus. This commit
fixes that by doing the following:

1. Changes <DModal> component such that it prioritises elements with the
   autofocus attribute first.
2. Adds `autofocus` to the input elements on the edit tags/categories
   modal form.
2023-06-22 09:56:12 +08:00
dependabot[bot]
b25225f704
Build(deps): Bump sass-embedded from 1.63.4 to 1.63.5 (#22234)
Bumps [sass-embedded](https://github.com/ntkme/sass-embedded-host-ruby) from 1.63.4 to 1.63.5.
- [Commits](https://github.com/ntkme/sass-embedded-host-ruby/compare/v1.63.4...v1.63.5)

---
updated-dependencies:
- dependency-name: sass-embedded
  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>
2023-06-22 09:45:32 +08:00
dependabot[bot]
f8b631cba6
Build(deps): Bump webpack from 5.87.0 to 5.88.0 in /app/assets/javascripts (#22235)
Bumps [webpack](https://github.com/webpack/webpack) from 5.87.0 to 5.88.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.87.0...v5.88.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:production
  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>
2023-06-22 09:45:20 +08:00
dependabot[bot]
d6ef268d5a
Build(deps-dev): Bump sass from 1.63.4 to 1.63.6 in /app/assets/javascripts (#22236)
Bumps [sass](https://github.com/sass/dart-sass) from 1.63.4 to 1.63.6.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.63.4...1.63.6)

---
updated-dependencies:
- dependency-name: sass
  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>
2023-06-22 09:45:07 +08:00
Mark VanLandingham
6d9568a9a2
DEV: Remove network_disconnected_spec.rb (#22233) 2023-06-21 14:58:31 -05:00
Jarek Radosz
876ff17cc2
DEV: Update eslint/prettier (#22226) 2023-06-21 20:59:03 +02:00
Blake Erickson
1948063f9f
DEV: Cleanup unused chat route (#22231)
The `chat/chat#update_user_last_read` route no longer has corresponding
controller action so we should remove it.
2023-06-21 12:45:28 -06:00
Blake Erickson
30ce8df7c8
DEV: Cleanup several unused routes (#22229)
This commit removes these these routes that do not have a corresponding
controller action:

```
admin/groups#show
admin/groups#show
post_actions#users
post_actions#defer_flags
list#categories_feed
```
2023-06-21 12:17:44 -06:00
Daniel Waterworth
50bded7b47
FIX: Force ordering to make things more consistent and fix flaky test (#22228) 2023-06-21 13:16:10 -05:00
Penar Musaraj
47ab7eb49a
FIX: Staged user creation loses user custom field data (#22206)
Don't cache user_fields on users separately from custom_fields, since they can get out of sync.

---------

Co-authored-by: Daniel Waterworth <me@danielwaterworth.com>
2023-06-21 12:35:24 -05:00
Mark VanLandingham
114a9a10b7
DEV: Add spec for notification data modifier (#22223) 2023-06-21 08:57:25 -05:00
Sam
0de3b279ce
FEATURE: add db:resize:notification_id task for growing table (#20505)
Under exceptional cases people may need to resize the notification table.
This only happens on forums with a total of more than 2.5 billion notifications.

This rake task can be used to convert all the notification columns to
bigint to make more room.
2023-06-21 09:57:16 -04:00
Andrei Prigorshnev
3ea31f443c
FEATURE: Export chat messages to CSV file (#22113)
To export chat messages, go to `/admin/plugins/chat` and click the Create export 
button in the _Export chat messages_ section. You'll receive a direct message 
when the export is finished.

Currently, this exports all messages from the last 6 months, but not more than 
10000 messages.

This exports all chat messages, including messages from private channels and 
users' direct conversations. This also exports messages that were deleted.
2023-06-21 16:13:36 +04:00
Joffrey JAFFEUX
720c0c6e4d
UX: adds small delay before making message active (#22221)
This should prevent the message to show as active on mobile when making a touch to start scrolling.

This commit also makes naming of touch lifecycle functions coherent.
2023-06-21 13:07:12 +02:00
dependabot[bot]
530c9aa7c6
Build(deps-dev): Bump terser in /app/assets/javascripts (#22193)
Bumps [terser](https://github.com/terser/terser) from 5.18.0 to 5.18.1.
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/compare/v5.18.0...v5.18.1)

---
updated-dependencies:
- dependency-name: terser
  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>
2023-06-21 11:35:50 +02:00
Alan Guo Xiang Tan
f5af4936d4
FIX: Site's top tags not shown for anonymous user (#22219)
When a site does not have `default_navigation_menu_tags`
site setting set, anonymous users should be shown the site's top tags as
a default in the tags section. However, this regressed in 9fad71809c
and we ended up showing anonymous users a tags section with only the
`All Tags` section link.

As part of this commit, I have also refactored the QUnit acceptance
tests to system tests which are much easier to work with.
2023-06-21 14:37:40 +08:00
Alan Guo Xiang Tan
547b520261
FEATURE: Add deslect all and reset to defaults btn edit nav menu modal (#22218)
What does this change do?

This change adds the deselect all and reset to defaults buttons to the
edit navigation menu tags modal. The deselect all button when
clicked deselects all the selected tags in the modal. If the user
saves with no tags selected, the user's tags section in the
navigation menu will be set to the site's top tags.

The reset to defaults button is only shown when the
`default_navigation_menu_tags` site setting has been configured.
When clicked, the user's tags section in the navigation menu is
automatically set to the tags defined by the
`default_navigation_menu_tags` site setting.
2023-06-21 12:45:48 +08:00
Alan Guo Xiang Tan
53d2e44e14
UX: Display spinner while loading tags for edit nav menu tags modal (#22217)
What does this change do?

This change adds a loading spinner to the edit navigation menu tags
modal when the request to fetch all the tags for a site is in progress.
This mainly to improve the user experience such that we indicate that
something is being loaded instead of just displaying a large empty
space.

What are there no tests for this change?

This change is kind of hard to test and since it is mostly a UX change,
we can live with such regressions in the future. It is still bad to
regress UX wise but impact of such a regression is likely to be low.
2023-06-21 12:45:37 +08:00
Emmanuel Ferdman
722180edba
DEV: Typo in an output message of uploads.rake (#22209)
Signed-off-by: emmanuel-ferdman <emmanuelferdman@gmail.com>
2023-06-21 12:00:26 +08:00
Krzysztof Kotlarek
a64cb948ed
FIX: update unread and new count for categories (#22145)
There is a problem that unread and new count is not updated to reflecting topicTrackingState.

It is because discourseComputed on Category is not working properly with topicTrackingState. Moving it to component level is making counter reliable.
2023-06-21 13:42:30 +10:00
Alan Guo Xiang Tan
609562be3e
FEATURE: Add input filter for editing tags in navigation menu modal (#22216)
What does this change do?

This commit adds an input filter to filter through the tag checkboxes in the
modal to edit tags that are shown in the user's navigation menu. The
filtering is a simple matching of the given filter term against the
names of the tags.
2023-06-21 10:59:56 +08:00
Alan Guo Xiang Tan
08d8bd9f43
FEATURE: Add modal for editing tags in navigation menu (#22214)
What does this change do?

This change is a first pass for adding a modal used to edit tags that appears in
the navigation menu. As the feature is being worked on in phases, it is
currently hidden behind the `new_edit_sidebar_categories_tags_interface_groups` site setting.

The following features will be worked on in future commits:

1. Input filter to filter through the tgas
2. Button to reset tag selection to default navigation menu tags site
   settings
3. Button to deselect all current selection
2023-06-21 09:09:56 +08:00
Alan Guo Xiang Tan
1987fce018
DEV: Improve skip test comment (#22215)
Why this change?

The comment consists of an output that was copied from RSpec's default
output. This has the potential to mess with systems that are parsing
RSpec's output to fetch the spec failures as those systems are usually
looking for the first occurence of `Failures:`
2023-06-21 08:09:39 +08:00
dependabot[bot]
d6f2b9c72c
Build(deps-dev): Bump sinon from 15.1.2 to 15.2.0 in /app/assets/javascripts (#22211)
Bumps [sinon](https://github.com/sinonjs/sinon) from 15.1.2 to 15.2.0.
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/main/docs/changelog.md)
- [Commits](https://github.com/sinonjs/sinon/compare/v15.1.2...v15.2.0)

---
updated-dependencies:
- dependency-name: sinon
  dependency-type: direct:development
  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>
2023-06-21 07:23:39 +08:00
dependabot[bot]
36a830047c
Build(deps): Bump faraday from 2.7.6 to 2.7.7 (#22210)
Bumps [faraday](https://github.com/lostisland/faraday) from 2.7.6 to 2.7.7.
- [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/v2.7.6...v2.7.7)

---
updated-dependencies:
- dependency-name: faraday
  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>
2023-06-21 07:23:27 +08:00
Keegan George
75e711284a
DEV: Add custom error messages to form template forms (#22169) 2023-06-20 13:45:58 -07:00
Mark VanLandingham
762dd971d6
DEV: Add plugin modifier for notification_data manipulation (#22208) 2023-06-20 14:07:02 -05:00
Isaac Janzen
e1561bc459
FIX: 'in all topics' should search in all topics (#22207)
When searching in the context of a topic the <kbd>in all topics</kbd> link would not search globally for the given term and instead it would always search within the current topic. This PR fixes the link to properly update the search context and search globally for the given term.

This fix reveals some _secretly_ broken tests. Update these as well.
2023-06-20 11:59:15 -05:00
Andrei Prigorshnev
f4add0ef6a
DEV: store user ids for different types of notifications in different hashes (#22049)
We had a bug in this code recently, sometimes users saw weird notifications 
like:

User mentioned all_mentioned_user_ids in the help chat channel

We fixed that bug in b85d057.

This refactoring is a follow-up to that fix. As that bug showed, it’s quite easy 
to introduce a key that may end up being sent to the `NotifyMentioned` job, 
which can lead to such weird notifications. This refactoring makes sure that 
the `to_notify` hash contains only IDs of users that should be notified about 
mentions.
2023-06-20 20:47:00 +04:00
Discourse Translator Bot
a4594b925b
Update translations (#22204) 2023-06-20 17:27:36 +02:00
Andrei Prigorshnev
c5c043d9e2
DEV: support nil values in the eq_time matcher (#22116)
We use it like this:

    expect(message.created_at).to eq_time(created_at)

The problem is that if one of the values or both of them are `nil` the matcher fails 
with this error:

    NoMethodError: undefined method `-' for nil:NilClass

This commit adds support for `nil` values. If both time values are `nil` they are equal, 
if only one value is `nil` they aren't.
2023-06-20 19:06:40 +04:00
Jan Cernik
e51bbfa4e8
FEATURE: Scroll to first message when clicking date in chat (#21926)
This PR adds a new parameter to fetch chat messages: `target_date`.

It can be used to fetch messages by a specific date string. Note that it does not need to be the `created_at` date of an existing message, it can be any date. Similar to `target_message_id`, it retrieves an array of past and future messages following the query limits.
2023-06-20 15:58:38 +02:00
Osama Sayegh
cee15d4177
FIX: Don't error when clicking on a custom link in community section (#22174) 2023-06-20 16:35:33 +08:00
Martin Brennan
fc199d42fa
FIX: Add aria-label attribute to cooked hashtags (#22182)
This commit adds an aria-label attribute to cooked hashtags using
the post/chat message decorateCooked functionality. I have just used
the inner content of the hashtag (the tag/category/channel name) for
the label -- we can reexamine at some point if we want something
different like "Link to dev category" or something, but from what I
can tell things like Twitter don't even have aria-labels for hashtags
so the text would be read out directly.

This commit also refactors any ruby specs checking the HTML of hashtags
to use rspec-html-matchers which is far clearer than having to maintain
the HTML structure in a HEREDOC for comparison, and gives better spec
failures.

c.f. https://meta.discourse.org/t/hashtags-are-getting-a-makeover/248866/23?u=martin
2023-06-20 15:47:17 +10:00