Commit Graph

53233 Commits

Author SHA1 Message Date
Kris
c8133318b8
DEV: move chat scrollbar style to scollbar file (#25934) 2024-02-28 19:07:22 +01:00
Kris
6426eaff39
UX: increase chat pre scrollbar contrast (#25930) 2024-02-28 12:27:08 -05:00
chapoi
337773b8ac
UX: chat > general fixes (#25929)
* UX: chat > keep send icon active when keyboard is hidden (mobile)

* FIX: chat > keep composer insert button at bottom

* UX: chat > give seperator equal padding
2024-02-28 15:12:13 +01:00
Jarek Radosz
36a9b5d0fa
DEV: Introduce a helper for handling events (#25433)
Instead of

```hbs
{{on "input" (action this.foo value="target.value")}}
{{on "input" (action (mut this.bar) value="target.value")}}
```

you can use:

```hbs
{{on "input" (with-event-value this.foo)}}
{{on "input" (with-event-value (fn (mut this.bar)))}}
```

or in gjs:

```gjs
import { fn } from "@ember/helper";
import { on } from "@ember/modifier";
import withEventValue from "discourse/helpers/with-event-value";
…
{{on "input" (withEventValue (fn (mut this.bar)))}}
```
2024-02-28 14:00:53 +01:00
Joffrey JAFFEUX
0e17ff8d09
FEATURE: introduces chat_preferred_mobile_index setting (#25927)
`chat_preferred_mobile_index` allows to set the preferred default tab when loading chat on mobile.

Current choices are:
- channels
- direct_messages
- my_threads
2024-02-28 12:05:05 +01:00
David Taylor
4116bd9595
DEV: Drop ember-functions-as-helper-polyfill (#25926)
No longer required on recent Ember
2024-02-28 10:06:36 +00:00
Alan Guo Xiang Tan
1a44c359b9
DEV: Fix reloading type map not clearing cache (#25924)
Why this change?

This is a follow up to 408d2f8e69. When
`ActiveRecord::ConnectionAdapaters::PostgreSQLAdatper#reload_type_map`
is called, we need to clear the type map cache otherwise migrations
adding an array column will end up throwing errors.
2024-02-28 14:56:15 +08:00
Alan Guo Xiang Tan
408d2f8e69
DEV: Adds a freedom patch to cache connection type map (#25923)
Why this change?

This patch has been added to address the problems identified in https://github.com/rails/rails/issues/35311. For every,
new connection created using the PostgreSQL adapter, 3 queries are executed to fetch type map information from the `pg_type`
system catalog, adding about 1ms overhead to every connection creation.

On multisite clusters where connections are reaped more aggressively, the 3 queries executed
accounts for a significant portion of CPU usage on the PostgreSQL cluster. This patch works around the problem by
caching the type map in a class level attribute to reuse across connections.
2024-02-28 14:29:13 +08:00
John L. Clark
9a07a9872f
FEATURE: Allow rowspan and colspan attributes on HTML tables (#20973)
Augment the `allowList` for HTML tables to allow the `rowspan` and
`colspan` attributes on `th` and `td` elements.
2024-02-28 16:59:36 +11:00
David Battersby
5bf06f2634
DEV: skip flaky channel member status test (#25922) 2024-02-28 12:00:51 +08:00
Alan Guo Xiang Tan
54a1fea74e
DEV: Refactor ThemeSettingsObjectValidator#validate (#25904)
What does this change do?

1. Reduce an additional loop through all the properties
2. Extract the validation of child objects into a dedicate method
2024-02-28 10:44:46 +08:00
Alan Guo Xiang Tan
afb0adf48d
DEV: Validate objects when updating typed objects theme settings (#25902)
Why this change?

This change ensures that we validate the value of the new objects
when updating typed objects theme settings.
2024-02-28 10:33:22 +08:00
Martin Brennan
42d203d773
DEV: Add ENV var to skip verbose gem backtrace in rspec failure (#25921)
In rspec request specs, we do a huge verbose backtrace
when there is an error. However, 99% of the time you don't
care about pages and pages of activesupport/rspec gem
LOC in the backtrace...so this commit introduces an
env var RSPEC_EXCLUDE_GEMS_IN_BACKTRACE to allow for
turning this off.
2024-02-28 12:31:12 +10:00
Krzysztof Kotlarek
9e9673fac5
DEV: save/restore the previous sidebar panel state (#25899)
In this PR, the admin panel remembers the previous state and restores it when the admin panel is deactivated.
https://github.com/discourse/discourse/pull/25781

However, it would be better to have a more generic solution. When the panel is changed, the previous state is saved in the sidebarState. When a user returns to the specific panel, a previously remembered state is restored.
2024-02-28 12:33:59 +11:00
Krzysztof Kotlarek
8b5204579c
FEATURE: filter admin sidebar (#25853)
Ability to filter admin sidebar. The filter can be cleared. In addition, it can be accessed with ctrl+/ shortcut
2024-02-28 12:15:02 +11:00
Kris
ffce2dd04f
A11Y: when adding custom sidebar link, first input of new row should get focus (#25920)
* A11Y: when adding custom sidebar links, ensure first input of new row gets focus

* switch to afterRender decorator
2024-02-28 11:39:25 +11:00
dependabot[bot]
4bec404730
Build(deps-dev): Bump lefthook from 1.6.2 to 1.6.3 (#25919)
Bumps [lefthook](https://github.com/evilmartians/lefthook) from 1.6.2 to 1.6.3.
- [Release notes](https://github.com/evilmartians/lefthook/releases)
- [Changelog](https://github.com/evilmartians/lefthook/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evilmartians/lefthook/compare/v1.6.2...v1.6.3)

---
updated-dependencies:
- dependency-name: lefthook
  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>
2024-02-27 23:20:08 +01:00
dependabot[bot]
adf2d8368a
Build(deps): Bump thor from 1.3.0 to 1.3.1 (#25918)
Bumps [thor](https://github.com/rails/thor) from 1.3.0 to 1.3.1.
- [Release notes](https://github.com/rails/thor/releases)
- [Commits](https://github.com/rails/thor/compare/v1.3.0...v1.3.1)

---
updated-dependencies:
- dependency-name: thor
  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>
2024-02-27 23:19:48 +01:00
Mark VanLandingham
b426f85a81
DEV: Add modifiers for plugins to customize push notification translation arguments (#25889) 2024-02-27 14:03:55 -06:00
Discourse Translator Bot
eea7af09fd
Update translations (#25914) 2024-02-27 20:50:30 +01:00
Jarek Radosz
f44bee1333
DEV: Use autocomplete="new-password" (#25913)
And normalize `<PasswordField />` arguments

(we were getting `[DOM] Input elements should have autocomplete attributes (suggested: "current-password")` in smoke test logs, this may or may not fix that 😛)
2024-02-27 13:29:12 +01:00
Joffrey JAFFEUX
64e8ad170e
FIX: do not show send pm prompt when user cant pm (#25912)
Prior to this fix even when the user was not part of a group allowing sending pm we would show the prompt: "You've replied to ... X times, did you know you could send them a personal message instead?"
2024-02-27 11:54:05 +01:00
Jarek Radosz
3736d66f17
DEV: Extensively use exception: true in system() (#25911)
Specifically fixes a bug in smoke-test where it would just move on after failing to install latest js dependencies with yarn.
2024-02-27 11:33:28 +01:00
Jarek Radosz
b337ae5ae9
DEV: Update chrome-launcher from 0.15.2 to 1.1.0 (#25909) 2024-02-27 11:25:11 +01:00
Natalie Tay
a8a39d86b4
UX: Improve invite error message when a user uses an email that has already redeemed (#25695)
Improve invite error message when a user uses an email that has already redeemed
2024-02-27 18:24:20 +08:00
David Battersby
fe851a533a
FIX: add status to channel membership serializer (#25906) 2024-02-27 18:23:59 +08:00
Jarek Radosz
7a14831695
DEV: Remove ember-router-service-refresh-polyfill (#25910) 2024-02-27 11:10:19 +01:00
Jarek Radosz
299b323d9a
DEV: Update ember-cli to 5.6.0 (#25886) 2024-02-27 10:48:30 +01:00
Joffrey JAFFEUX
bb079f54cb
FIX: better handling of error on create DM (#25908)
Prior to this fix we were correctly failing but just returning a generic error.
2024-02-27 10:21:36 +01:00
David Battersby
8bfa2bcf3a
UX: flexible autocomplete width (#25900)
When tagging a user in composer, the autocomplete div has a fixed width, causing longer names and usernames to get cut off.  This change allows the div to expand up until a max-width of 600px on desktop.
2024-02-27 17:17:30 +08:00
Alan Guo Xiang Tan
18ca3d373d
FIX: ThemeSettingsValidator.validate_value returning wrong error (#25901)
Why this change?

Before this change, the error messages returned when validating theme
settings of typed objects was an array of array instead of just an
array.
2024-02-27 15:46:12 +08:00
Alan Guo Xiang Tan
52a4912475
DEV: Support topic, post, group, upload and tag type for theme objects setting (#25907)
Why this change?

Previously in cac60a2c6b, I added support
for `type: "category"` for a property in the theme objects schema. This
commit extend the work previously to add support for types `topic`,
`post`, `group`, `upload` and `tag`.
2024-02-27 14:27:10 +08:00
David Battersby
6a2289f29a
DEV: skip test for channel members user status (#25903) 2024-02-27 13:27:52 +08:00
David Battersby
a423afbbb9
FEATURE: Add user status to chat members list (#25831)
This change adds the user status next to the name within the chat channel members list.
2024-02-27 12:17:15 +08:00
Ted Johansson
1bcb521fbf
DEV: Add DB backed problem checks to support perform_every config (#25834)
As part of problem checks refactoring, we're moving some data to be DB backed. In this PR it's the tracking of problem check execution. When was it last run, when was the last problem, when should it run next, how many consecutive checks had problems, etc.

This allows us to implement the perform_every feature in scheduled problem checks for checks that don't need to be run every 10 minutes.
2024-02-27 11:17:39 +08:00
Alan Guo Xiang Tan
412b36cc93
FIX: Error when integer values are set as default of string type settings (#25898)
Why this change?

```
some_setting:
  default: 0
  type: string
```

A theme setting like the above will cause an error to be thrown on the
server when importing the theme because the default would be parsed as
an integer which caused an error to be thrown when we are validating the
value of the setting.

What does this change do?

Convert the value to a string when working with string typed theme
settings.
2024-02-27 10:18:38 +08:00
Alan Guo Xiang Tan
e84d462e28
Revert "Build(deps-dev): Bump chrome-launcher from 0.15.2 to 1.1.0 (#25894)" (#25897)
This reverts commit f219135415.

Broke our internal smoke tests.
2024-02-27 09:55:59 +08:00
dependabot[bot]
f219135415
Build(deps-dev): Bump chrome-launcher from 0.15.2 to 1.1.0 (#25894)
Bumps [chrome-launcher](https://github.com/GoogleChrome/chrome-launcher) from 0.15.2 to 1.1.0.
- [Release notes](https://github.com/GoogleChrome/chrome-launcher/releases)
- [Changelog](https://github.com/GoogleChrome/chrome-launcher/blob/main/changelog.md)
- [Commits](https://github.com/GoogleChrome/chrome-launcher/commits)

---
updated-dependencies:
- dependency-name: chrome-launcher
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-27 09:17:27 +08:00
Alan Guo Xiang Tan
7bcfe60a76
DEV: Validate default value for type: objects theme settings (#25833)
Why this change?

This change adds validation for the default value for `type: objects` theme
settings when a setting theme field is uploaded. This helps the theme
author to ensure that the objects which they specifc in the default
value adhere to the schema which they have declared.

When an error is encountered in one of the objects, the error
message will look something like:

`"The property at JSON Pointer '/0/title' must be at least 5 characters
long."`

We use a JSON Pointer to reference the property in the object which is
something most json-schema validator uses as well.

What does this change do?

1. This commit once again changes the shape of hash returned by
   `ThemeSettingsObjectValidator.validate`. Instead of using the
   property name as the key previously, we have decided to avoid
   multiple levels of nesting and instead use a JSON Pointer as the key
   which helps to simplify the implementation.

2 Introduces `ThemeSettingsObjectValidator.validate_objects` which
  returns an array of validation error messages for all the objects
  passed to the method.
2024-02-27 09:16:37 +08:00
Kris
4df4584396
DEV: adds topic-below-suggested plugin outlet (#25896) 2024-02-26 18:53:13 -05:00
dependabot[bot]
a3e564ee74
Build(deps-dev): Bump @discourse/lint-configs from 1.3.5 to 1.3.7 (#25893)
Bumps [@discourse/lint-configs](https://github.com/discourse/lint-configs) from 1.3.5 to 1.3.7.
- [Commits](https://github.com/discourse/lint-configs/commits)

---
updated-dependencies:
- dependency-name: "@discourse/lint-configs"
  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>
2024-02-26 23:09:54 +01:00
Osama Sayegh
3f4537eeb5
FEATURE: Schema theme setting input fields (#25811)
Continue from https://github.com/discourse/discourse/pull/25673.

This commit starts building the inputs pane of schema theme settings. At the moment only string fields are rendered, but more types will be added in future commits.
2024-02-27 01:07:32 +03:00
Blake Erickson
52d357c1d1
DEV: Add loading spinner to install theme modal (#25888)
This commit adds a loading spinner when installing a theme as sometimes
installing a theme can take quite a bit of time this way we have some
indication that things are still working as the theme is being
installed.
2024-02-26 14:14:21 -07:00
Isaac Janzen
8805a34001
DEV: Add before / after header-buttons plugin outlets (#25887) 2024-02-26 12:56:21 -07:00
Jeff Wong
e440996aca
DEV: resolve on conflict (#25847) 2024-02-26 10:03:51 -08:00
Isaac Janzen
b5d4e06de7
DEV: Update chat addToHeaderIcons to pass component (#25885) 2024-02-26 11:00:16 -07:00
dependabot[bot]
a85e4adc85
Build(deps-dev): Bump ember-qunit from 6.2.0 to 8.0.2 (#25880)
* Build(deps-dev): Bump ember-qunit from 6.2.0 to 8.0.2

Bumps [ember-qunit](https://github.com/emberjs/ember-qunit) from 6.2.0 to 8.0.2.
- [Release notes](https://github.com/emberjs/ember-qunit/releases)
- [Commits](https://github.com/emberjs/ember-qunit/compare/v6.2.0...v8.0.2)

---
updated-dependencies:
- dependency-name: ember-qunit
  dependency-type: direct:development
  update-type: version-update:semver-major
...

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

* shim for plugins/themes

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: David Taylor <david@taylorhq.com>
2024-02-26 16:18:33 +00:00
dependabot[bot]
12d6e9a163
Build(deps-dev): Bump esbuild from 0.19.2 to 0.20.1 (#25864)
Bumps [esbuild](https://github.com/evanw/esbuild) from 0.19.2 to 0.20.1.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.19.2...v0.20.1)

---
updated-dependencies:
- dependency-name: esbuild
  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>
2024-02-26 16:04:55 +00:00
dependabot[bot]
8f30bc34bc
Build(deps-dev): Bump lefthook from 1.4.3 to 1.6.2 (#25867)
Bumps [lefthook](https://github.com/evilmartians/lefthook) from 1.4.3 to 1.6.2.
- [Release notes](https://github.com/evilmartians/lefthook/releases)
- [Changelog](https://github.com/evilmartians/lefthook/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evilmartians/lefthook/compare/v1.4.3...v1.6.2)

---
updated-dependencies:
- dependency-name: lefthook
  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>
2024-02-26 16:04:34 +00:00
dependabot[bot]
fb53a887bd
Build(deps-dev): Bump puppeteer-core from 21.0.3 to 22.3.0 (#25866)
* Build(deps-dev): Bump puppeteer-core from 21.0.3 to 22.3.0

Bumps [puppeteer-core](https://github.com/puppeteer/puppeteer) from 21.0.3 to 22.3.0.
- [Release notes](https://github.com/puppeteer/puppeteer/releases)
- [Changelog](https://github.com/puppeteer/puppeteer/blob/main/release-please-config.json)
- [Commits](https://github.com/puppeteer/puppeteer/compare/puppeteer-core-v21.0.3...puppeteer-core-v22.3.0)

---
updated-dependencies:
- dependency-name: puppeteer-core
  dependency-type: direct:development
  update-type: version-update:semver-major
...

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

* Remove xpath usage

* timeout

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: David Taylor <david@taylorhq.com>
2024-02-26 16:03:49 +00:00