Commit Graph

52300 Commits

Author SHA1 Message Date
Penar Musaraj
092633c14f
FIX: Modal flash tracking (#24923)
Super minor, without tracking, these error messages weren't being shown.
2023-12-18 09:34:19 -05:00
Jarek Radosz
6d7dd658a4
DEV: Update rubocop-discourse to 3.6.0 (#24945) 2023-12-18 13:44:36 +01:00
Jarek Radosz
157a2fce1b
DEV: Update actions/upload-artifact to v4 (#24943) 2023-12-18 11:47:22 +01:00
Jarek Radosz
8207e59c00
DEV: Remove unused code (#24915)
`input:focus + label.alt-placeholder` css is used for styling active input's label
2023-12-18 11:26:38 +01:00
chapoi
7fe5a6986b
UX: fullscreen modal > add missing modifier + sticky header (#24920)
* UX: table builder add missing modal modifier

* UX: fullscreen-table sticky header fix

* UX: fullscreen table > autosize width
2023-12-18 11:18:54 +01:00
David Taylor
31c2a4717b
DEV: Allow plugins/themes to add global notices at any time (#24922)
Previously, `addGlobalNotice` would have to be called before the GlobalNotice component was rendered. By using a TrackedArray, we can improve that so that plugins can call the function at any time and the notice will be rendered immediately
2023-12-18 09:56:23 +00:00
Natalie Tay
e24c015b9c
FIX: Correct urls to account for subfolder setup (#24941) 2023-12-18 16:49:06 +08:00
dependabot[bot]
ecdad60e47
Build(deps-dev): Bump parallel from 1.23.0 to 1.24.0 (#24929)
Bumps [parallel](https://github.com/grosser/parallel) from 1.23.0 to 1.24.0.
- [Commits](https://github.com/grosser/parallel/compare/v1.23.0...v1.24.0)

---
updated-dependencies:
- dependency-name: parallel
  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>
2023-12-18 09:34:53 +01:00
dependabot[bot]
54097498ef
Build(deps-dev): Bump hashdiff from 1.0.1 to 1.1.0 (#24931)
Bumps [hashdiff](https://github.com/liufengyun/hashdiff) from 1.0.1 to 1.1.0.
- [Changelog](https://github.com/liufengyun/hashdiff/blob/master/changelog.md)
- [Commits](https://github.com/liufengyun/hashdiff/compare/v1.0.1...v1.1.0)

---
updated-dependencies:
- dependency-name: hashdiff
  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>
2023-12-18 09:34:36 +01:00
dependabot[bot]
e0e31d1e4a
Build(deps): Bump excon from 0.106.0 to 0.108.0 (#24932)
Bumps [excon](https://github.com/excon/excon) from 0.106.0 to 0.108.0.
- [Changelog](https://github.com/excon/excon/blob/master/changelog.txt)
- [Commits](https://github.com/excon/excon/compare/v0.106.0...v0.108.0)

---
updated-dependencies:
- dependency-name: excon
  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-12-18 09:26:01 +01:00
Alan Guo Xiang Tan
fc8075c169
DEV: Fix flaky tests report artifacts not using the right job_id (#24939)
Why this change?

`github.job` returns the `job_id` per the docs but it doesn't actually
return the id of the job but instead returns the job's name strangely.

Per https://github.com/orgs/community/discussions/8945, there is no way
to get the `job_id` from the existing contexts in the actions run.
Therefore, we have to hit Github's API to fetch it. Not ideal but no
way around this.
2023-12-18 15:59:41 +08:00
Ted Johansson
0edf39409c
DEV: Convert min_trust_level_to_allow_ignore to groups (#24894)
We're changing the implementation of trust levels to use groups. Part of this is to have site settings that reference trust levels use groups instead. It converts the min_trust_level_to_allow_ignore  site setting to ignore_allowed_groups.

This PR maintains backwards compatibility until we can update plugins and themes using this.
2023-12-18 13:04:37 +08:00
Ted Johansson
6ab1a19e93
DEV: Convert min_trust_level_to_allow_invite to groups (#24893)
We're changing the implementation of trust levels to use groups. Part of this is to have site settings that reference trust levels use groups instead. It converts the min_trust_level_to_allow_invite  site setting to invite_allowed_groups.

Nothing much of note. This is used in one place and there's no fallout.
2023-12-18 12:07:36 +08:00
Alan Guo Xiang Tan
ac21d8af50
DEV: Set Capybara.default_max_wait_time to 4 as default (#24934)
Why this change?

By default, `Capybara.default_max_wait_time` is set to `2`. However,
this is not a high enough default for Discourse as certain requests like
creating a post can take upwards of 2 seconds even on a high end desktop
CPU like the Ryzen 5950x. Therefore, we have decided to double the default max wait time.
2023-12-18 11:51:59 +08:00
Kelv
1f6d778561
DEV: enable grant badge utils test and force boolean type return value for isBadgeGrantable (#24928) 2023-12-18 10:47:13 +08:00
Krzysztof Kotlarek
1f72152e47
DEV: Remove usage of min_trust_to_create_topic SiteSetting (#24887)
Using min_trust_to_create_topic and create_topic_allowed_groups together was part of #24740

Now, when plugins specs are fixed, we can safely remove that part of logic.
2023-12-18 13:39:53 +11:00
Martin Brennan
6de00f89c2
FEATURE: Initial admin sidebar navigation (#24789)
This is v0 of admin sidebar navigation, which moves
all of the top-level admin nav from the top of the page
into a sidebar. This is hidden behind a enable_admin_sidebar_navigation
site setting, and is opt-in for now.

This sidebar is dynamically shown whenever the user enters an
admin route in the UI, and is hidden and replaced with either
the:

* Main forum sidebar
* Chat sidebar

Depending on where they navigate to. For now, custom sections
are not supported in the admin sidebar.

This commit removes the experimental admin sidebar generation rake
task but keeps the experimental sidebar UI for now for further
testing; it just uses the real nav as the default now.
2023-12-18 11:48:25 +10:00
Martin Brennan
194c84b217
FIX: Sort plugin list by name properly (#24839)
Some plugins have discourse- prefixed on their name
and some don't, so sorting in the list was inconsistent.

---------

Co-authored-by: Ted Johansson <ted@discourse.org>
2023-12-18 11:42:55 +10:00
Alan Guo Xiang Tan
a390dc0360
DEV: Fix path for flaky test report when uploading artifact (#24933)
This regressed in b2c27a8c60
2023-12-18 08:06:00 +08:00
marstall
6f3c498b83
FIX: when showing edit invite form, display saved invite data in fields (#24907)
https://meta.discourse.org/t/lets-talk-suggestion-for-improvement-invite-feature/284655/11?u=yigit
2023-12-16 09:49:21 -05:00
Ty Correll
e30da10486
UX: fix overlap obstructed anon topic reply (#24927) 2023-12-15 17:15:38 -05:00
Mark VanLandingham
fe06a76cab
REVERT: "UX: fix overlap obstructed anon topic reply (#24921)" (#24925)
This reverts commit 368f4ef24d.
2023-12-15 15:08:34 -06:00
Blake Erickson
7a7c53894d
FIX: Excessive video data downloading from service worker (#24924)
This bug appears to only be on Chrome due to the service worker fetching
the video content on page load instead of on play. For some reason
though the service worker would fetch around 4x more than the size of
the video resulting in excessive data being downloaded especially for
larger videos.

meta https://meta.discourse.org/t/287817
internal /t/111387/52
2023-12-15 13:29:50 -07:00
Andrei Prigorshnev
6e2201135f
DEV: Introduce plugin API for getting stats (#24829)
Before, when needed to get stats in a plugin, we called Core classes directly. 
Introducing plugin API will decouple plugins from Core and give as more freedom 
in refactoring stats in Core. Without this API, I wasn't able to do all refactorings 
I wanted when working on d91456f.
2023-12-15 23:47:20 +04:00
Ty Correll
368f4ef24d
UX: fix overlap obstructed anon topic reply (#24921)
This commit addresses the overlap between the anonymous reply button in a topic and the related or new and unread topics component.
2023-12-15 13:24:33 -06:00
Keegan George
388a2c5274
DEV: Add outlets and actions to move topic modal (#24913) 2023-12-15 08:50:29 -08:00
Kelv
2477bcc32e
DEV: lint against Layout/EmptyLineBetweenDefs (#24914) 2023-12-15 23:46:04 +08:00
David Taylor
15fc2a289a
DEV: Restore chat system spec job in GitHub CI (#24918)
Accidentally removed in c9cf3f5a52
2023-12-15 14:33:04 +00:00
Penar Musaraj
8a4ab79be2
DEV: Improve header offset calculation (#24910) 2023-12-15 15:29:17 +01:00
Jan Cernik
437c2c5552
FIX: Do not display chat replies as threads in transcripts (#24768)
* FIX: Do not display chat replies as threads in transcripts

* specs
2023-12-15 09:50:43 -03:00
chapoi
ed4840200b
UX: revert icon colour change in alerts (#24916) 2023-12-15 13:32:35 +01:00
Osama Sayegh
eff6e4b405
FIX: Position Float Kit elements correctly in RTL mode (#24908)
Float-kit elements (menus/tooltips) are positioned where they should be by setting an inline `left` property in JavaScript when they're rendered. For some reasons, we also set `left: 0` on float-kit elements here:

25d9927785/app/assets/stylesheets/common/float-kit/d-menu.scss (L11-L15)

This property is overridden by the inline property that the library sets in JavaScript. However, in RTL mode, all of our scss files are flipped where everything left becomes right and vice versa. In this case, the `left: 0` property in the scss file above becomes `right: 0`.

This results in a conflict specific to RTL mode where both the `left` and `right` properties are defined on the same absolute-positioned element; the `right` property will always be set to 0 because it comes from the (flipped) scss file above, and the inline `left` property will be set to some px amount determined in JavaScript.

The `right` property will take precedence over the inline `left` property due to the page being right-to-left (source: https://developer.mozilla.org/en-US/docs/Web/CSS/right#description) and this causes float-kit elements to incorrectly always stick to the right.

This commit removes the `left: 0` property altogether for float-kit elements from our scss files. It's not clear from git history why the property was added, and removing it doesn't seem to cause any issues.

Meta topic: https://meta.discourse.org/t/positioning-issues-with-rtl-locales-after-recent-updates/280220?u=osama
2023-12-15 13:16:31 +03:00
Keegan George
46eec95719
DEV: Add outlet and changes to support AI proofread (#24909) 2023-12-14 19:30:30 -08:00
Jarek Radosz
9f00c16a7a
DEV: Make DatePicker placeholder customizable (#24911) 2023-12-15 03:28:57 +01:00
Mark VanLandingham
25d9927785
DEV: Remove DefaultNotificationItem widget (#24906)
These are no longer used anymore because we use glimmer notification items everywhere 🎉
2023-12-14 13:45:59 -06:00
Blake Erickson
7aeb5d6012
FIX: Unable to move pm to public topic (#24903)
* FIX: guard against empty category_ids when creating small action post for changing of category

Co-authored-by: Kelvin Tan <kelv@discourse.org>
2023-12-14 12:31:38 -07:00
Leonardo Mosquera
5417c4fac0
FIX: discourse remap: fix output to avoid UX issue (#24905)
Before this commit, this output is possible:

```
Rewriting all occurrences of STRING1 to STRING2

THIS TASK WILL REWRITE DATA, ARE YOU SURE (type YES)
WILL RUN ON ALL 1 DBS
```

Which, when run from a script, might lead one to believe that YES was
automatically inserted into STDIN and the script is continuing.

Turns out this isn't the case so the obvious expectation is broken.

This commit swaps the order of those last lines to make it clear that
the script is blocked on input.
2023-12-14 16:30:14 -03:00
Jan Cernik
ca3792221a
FIX: Do not notify users for quoted mentions in chat (#24902) 2023-12-14 15:39:28 -03:00
Daniel Waterworth
d7a09fb08d
DEV: Add true_fields method for CustomFields (#24876)
This is useful for plugins that might otherwise rely on the
CUSTOM_FIELD_TRUE constant.
2023-12-14 11:06:21 -06:00
Mark VanLandingham
74f964f2b4
DEV: Add current menu-panel tab ID as data attribute to panel (#24901) 2023-12-14 10:36:51 -06:00
David Taylor
f51f467030
DEV: Throw error if renderInOutlet component has no template (#24900) 2023-12-14 15:51:47 +00:00
Jarek Radosz
057778b710
DEV: Update content-tag to 1.2.1 (#24888) 2023-12-14 12:00:36 +01:00
Alan Guo Xiang Tan
b2c27a8c60
DEV: Flaky test report should be differentiated between job runs (#24895)
Why this change?

The `tests` workflow runs many jobs. Each job when ran is given a unique
id. Since a job can be re-run, we do not want the test reports to
override each other so we differentiate it further by the `job_id` given
by `${{ github.job }}`.
2023-12-14 12:12:14 +08:00
Alan Guo Xiang Tan
c437b9f5f2
DEV: Include exception details for each test in flaky tests report (#24892)
Why this change?

The exception message and name is useful when analyzing why a test
failed.
2023-12-14 11:11:11 +08:00
Ted Johansson
53d40672a7
DEV: Convert min_trust_level_to_allow_user_card_background to groups (#24891)
We're changing the implementation of trust levels to use groups. Part of this is to have site settings that reference trust levels use groups instead. It converts the min_trust_level_to_allow_user_card_background site setting to user_card_background_allowed_groups.

Nothing of note here. This is used in exactly one place, and there's no fallout.
2023-12-14 10:57:58 +08:00
Ted Johansson
f029d8142b
DEV: Validate that passed in groups exist in AtLeastOneGroupValidator (#24890)
This validator is used for site settings where one or more groups are to be input.

At the moment this validator just checks that the value isn't blank. This PR adds a validation for the existence of the groups passed in.
2023-12-14 10:00:53 +08:00
Ted Johansson
48116186af
DEV: Convert tl4_delete_posts_and_topics to groups (#24866)
We're changing the implementation of trust levels to use groups. Part of this is to have site settings that reference trust levels use groups instead. It converts the tl4_delete_posts_and_topics  site setting to delete_all_posts_and_topics_allowed_groups.

This one is a bit different from previous ones, as it's a boolean flag, and the default should be no group. Pay special attention to the migration during review.
2023-12-14 09:56:42 +08:00
Alan Guo Xiang Tan
2a1952d9ba
DEV: Only retry and log flaky tests on the main branch (#24889)
Why this change?

Pull requests can introduce flaky tests into the mix and we do not want
to be hiing that during the pull request process. While this does mean
builds for PR will be less stable than the `main` branch without
retries, we do not foresee this to be a problem long term since the
monitoring of flaky tests on the `main` branch will mean that the number
of flaky tests will eventually be reduced.

What does this change do?

1. Introduce the `DISCOURSE_TURBO_RSPEC_RETRY_AND_LOG_FLAKY_TESTS` env
   variable which will initialize `TurboTest::Runner` with the `retry_and_log_flaky_tests`
   kwarg set to true when set.

2. Change the tests workflow run to set `DISCOURSE_TURBO_RSPEC_RETRY_AND_LOG_FLAKY_TESTS` only when
   the build type is `backend` or `system` and the `github.ref_name` is
   `main`.
2023-12-14 09:41:30 +08:00
Blake Erickson
00209f03e6
DEV: Add file_size_restriction site setting type (#24704)
This change will allow admins to configure file sizes in mb instead of
having to convert to kb.

Co-authored-by: Ella <ella.estigoy@gmail.com>
2023-12-13 16:22:48 -07:00
dependabot[bot]
89826ef56d
Build(deps): Bump bigdecimal from 3.1.4 to 3.1.5 (#24885)
Bumps [bigdecimal](https://github.com/ruby/bigdecimal) from 3.1.4 to 3.1.5.
- [Release notes](https://github.com/ruby/bigdecimal/releases)
- [Changelog](https://github.com/ruby/bigdecimal/blob/master/CHANGES.md)
- [Commits](https://github.com/ruby/bigdecimal/compare/v3.1.4...v3.1.5)

---
updated-dependencies:
- dependency-name: bigdecimal
  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-12-13 22:55:57 +01:00