Commit Graph

57454 Commits

Author SHA1 Message Date
Krzysztof Kotlarek
51a444ab53
FIX: consistent delete button for admin panel (#30592)
Move the delete button to more options to follow guide https://meta.discourse.org/t/creating-consistent-admin-interfaces/326780#p-1605522-h-5d-table-26
2025-01-07 14:05:45 +11:00
Gary Pendergast
d9d1da82cb
UX: Admin setting page consistency - Security (#30598)
Create a basic config page that only contains security-related settings, to replace the "security" category view linked to from "Security settings" in the admin sidebar.
2025-01-07 13:48:40 +11:00
Natalie Tay
0f0b3a21e6
FIX: Allow attachments to be opened in a new tab instead of downloading them (#30535)
Back then in 31e31ef, we added the Content-Disposition headers so that SVGs get downloaded instead of get run in the browser. Inadvertently, this also causes other attachments like pdfs and videos to be downloaded instead of heeding the "Open in new tab" option that users choose in the browser.

When the header is removed, the default value is "inline", this allows the browser to perform as requested. This also applies to other file types like pdfs, allowing users to "Open in new tab" and view them in the browser instead of always downloading them.

Existing tests (#10205) already do check that SVGs remain downloaded. Some existing tests written for PDFs have been modified to cater for SVGs instead, when there was a bug in defining the filenames per #10108
2025-01-07 10:32:32 +08:00
Martin Brennan
70381a1e39
UX: Admin setting page consistency - Experimental (#30572) (#30603)
Followup c2282439b3

Make the Experimental config page reached from the sidebar
use our consistent site setting page rules.
2025-01-07 12:22:10 +10:00
dependabot[bot]
415918b487
Build(deps): Bump rchardet from 1.8.0 to 1.9.0 (#30556)
Bumps [rchardet](https://github.com/jmhodges/rchardet) from 1.8.0 to 1.9.0.
- [Commits](https://github.com/jmhodges/rchardet/compare/v1.8.0...v1.9.0)

---
updated-dependencies:
- dependency-name: rchardet
  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>
2025-01-07 09:59:07 +08:00
Martin Brennan
725e146dca
FIX: Calculate experiment_enabled on server for "What's new?" (#30599)
Experimental "What's new?" feature feed items previously calculated
a boolean for experimentEnabled on the client based on the siteSettings
service, and this would control the initial state of the experiment
toggle.

However this requires the person who creates the site setting for the
experiment to remember to set it to `client: true`. This commit removes
that manual step by calculating whether the experiment is enabled
server-side, where we have access to all the site settings.
2025-01-07 11:27:24 +10:00
Alan Guo Xiang Tan
f015ea897e
DEV: Move merge job in tests workflow to different runner (#30602)
Use the `ubuntu-latest` runner which is free instead thus freeing up a
self hosted runner
2025-01-07 09:26:35 +08:00
Martin Brennan
30be75460f
UX: Admin setting page consistency - Group permissions (#30528) (#30578)
* UX: Admin setting page consistency - Group permissions (#30528)

Followup c2282439b3 and
21470e4afd

Adds a new "Group permissions" page and group_permissions site
setting area, which shows every single group-based site setting
in the app and core plugins.

Also adds a "trust_levels" area to show on the already moved
admin "Trust level" settings page, since that previously was
showing a mix of trust level settings and allowed group settings.

* DEV: Review fixes
2025-01-07 11:25:21 +10:00
Ella E.
fd909dd348
UX: Refactor nav stack active element (#30601)
* UX: Add a grey background and bold text to highlight the active element in the nav stack
2025-01-06 18:14:17 -07:00
Osama Sayegh
7df1fac68b
DEV: Fix build (#30600)
The `faker` gem, which is a dependency for the `*:populate` rake tasks, isn't installed in the production environment, so we should only load files/classes related to those rake tasks in non-production environments.
2025-01-07 03:37:03 +03:00
dependabot[bot]
5202532acb
Build(deps): Bump ace-builds from 1.37.1 to 1.37.2 (#30590)
Bumps [ace-builds](https://github.com/ajaxorg/ace-builds) from 1.37.1 to 1.37.2.
- [Release notes](https://github.com/ajaxorg/ace-builds/releases)
- [Changelog](https://github.com/ajaxorg/ace-builds/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ajaxorg/ace-builds/compare/v1.37.1...v1.37.2)

---
updated-dependencies:
- dependency-name: ace-builds
  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>
2025-01-07 01:35:00 +01:00
Martin Brennan
bcc34420bb
UX: Remove version from "What's new?" items (#30596)
This version number is a technical detail that controls
what items show up on certain sites, most admins don't
need this level of detail. Remove it here, maybe we can
add it back in some hidden way later if needed.
2025-01-07 10:06:10 +10:00
Osama Sayegh
2d424676fc
DEV: Extend the reviewables:populate rake task in chat (#30597)
Related to 5a55c9062a

The chat plugin now makes use of the plugin API that was added in the linked commit for extending the reviewables:populate rake task.
2025-01-07 03:05:34 +03:00
Martin Brennan
9c7b0ddb2f
UX: Update email and security sidebar link copy (#30563)
* UX: Update email and security sidebar link copy

Followup b3fa335c7d

Changes these sidebar links to better reflect
what these pages contain:

* (Email) Server setup → Server setup & logs
* (Security) Staff action logs → Logs & screening

* DEV: Test fix
2025-01-07 09:59:31 +10:00
dependabot[bot]
3b6649670b
Build(deps-dev): Bump rubocop-discourse from 3.9.1 to 3.9.2 (#30589)
Bumps [rubocop-discourse](https://github.com/discourse/rubocop-discourse) from 3.9.1 to 3.9.2.
- [Commits](https://github.com/discourse/rubocop-discourse/compare/v3.9.1...v3.9.2)

---
updated-dependencies:
- dependency-name: rubocop-discourse
  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>
2025-01-07 00:57:51 +01:00
Martin Brennan
d8692faf00
UX: More translations for admin dashboard (#30570)
Followup 8d5c4ecc33

Implement review suggestions from https://github.com/discourse/discourse/pull/30541
after merge, and also fix other hardcoded strings on this
dashboard.
2025-01-07 09:49:34 +10:00
dependabot[bot]
32e56e85e8
Build(deps): Bump highline from 3.1.1 to 3.1.2 (#30588)
Bumps [highline](https://github.com/JEG2/highline) from 3.1.1 to 3.1.2.
- [Changelog](https://github.com/JEG2/highline/blob/master/Changelog.md)
- [Commits](https://github.com/JEG2/highline/compare/v3.1.1...v3.1.2)

---
updated-dependencies:
- dependency-name: highline
  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>
2025-01-07 00:41:24 +01:00
Kris
f0ac25cf35
UX: adjust mobile to avoid progress bar jitter (#30591) 2025-01-06 17:57:24 -05:00
David Taylor
210559edc8
DEV: Support expand-pinned modifier in legacy topic-list (#30587)
This provides an easier upgrade path for themes/plugins. Matches the strategy used for other new topic-list-related modifiers.
2025-01-06 22:33:36 +00:00
Kris
116c3f7f8d
UX: improve table hover states, fix table button margin issue (#30585) 2025-01-06 13:59:48 -05:00
Kris
3dfe1a9fda
UX: add missing icon for open_topic small action (#30586) 2025-01-06 13:50:58 -05:00
Kris
1ae341fa38
UX: only show red count in IP lookup when greater than 0 (#30584) 2025-01-06 11:58:12 -05:00
Alan Guo Xiang Tan
78e8316cf0
DEV: Simplify if conditional for flaky test report steps (#30579)
The previous conditionals was just more complex and harder to
understand.
2025-01-06 11:11:24 -05:00
Gabriel Grubba
0d62863951
FEATURE: Add trigger_on option to topic_tags_changed automation (#30391)
* FEATURE: default value to fields in automation

This PR adds the property `extra.default_value` to the fields in automation. This property is used to set the default value of the field.

Reducing the nil checks we have to do in automation fields.

I've added only testing in the `da-choices-field-test.js` file, but we could add tests to all the fields.

* FEATURE: Add trigger_on option to `topic_tags_changed` automation

This new field will allow users to specify when the trigger should be fired. The options are:
- `tags_added_or_removed`: The trigger will be fired when tags are added or removed from the topic.
- `tags_added`: The trigger will be fired when tags are added to the topic.
- `tags_removed`: The trigger will be fired when tags are removed from the topic.

This PR also brings a migration to set the `trigger_on` field to `tags_added_or_removed` for all existing `topic_tags_changed` automations.

* DEV: reorganize the specs in context blocks

* DEV: migration to add trigger_on field default value to topic_tags_changed_trigger

* DEV: `down` migration for `add_trigger_on_field_default_value_to_topic_tags_changed_trigger` migration

* Update plugins/automation/lib/discourse_automation/triggers/topic_tags_changed.rb

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

* Update plugins/automation/config/locales/client.en.yml

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

* DEV: lint files and update topic_tags_changed trigger to use `default_value`

* Revert "FEATURE: default value to fields in automation"

This reverts commit 4d32635c69.

* DEV: remove migration file

---------

Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2025-01-06 11:22:39 -03:00
David Battersby
67d568f709
FIX: stuck notification for mentions within threads (#30546)
For mentions within threads, the mentioned user can experience a stuck notification. This is due to thread memberships only being created for users who interact with a thread. Without the membership we cannot track if the message containing the mention was read by the user.

The solution to this explored in this PR is:

- auto add memberships for mentioned users (only direct mentions for performance reasons).
- update channel/thread unread queries to check notification read status AND thread membership last read message id when counting mentions.

Previously the mention count would remain until the user notification (containing the mention) was read. However this only happens if the user clicks the notification or clicks dismiss all notifications. When a user navigated to the thread without clicking the notification, the green/urgent badge on chat would remain even after a hard page refresh.
2025-01-06 17:26:37 +04:00
dependabot[bot]
27c557bc89
Build(deps-dev): Bump mocha from 2.6.1 to 2.7.1 (#30189)
* Build(deps-dev): Bump mocha from 2.6.1 to 2.7.1

Bumps [mocha](https://github.com/freerange/mocha) from 2.6.1 to 2.7.1.
- [Changelog](https://github.com/freerange/mocha/blob/main/RELEASE.md)
- [Commits](https://github.com/freerange/mocha/compare/v2.6.1...v2.7.1)

---
updated-dependencies:
- dependency-name: mocha
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

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

* DEV: Fix spec

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Martin Brennan <martin@discourse.org>
2025-01-06 12:33:05 +01:00
David Taylor
486ff2a564
UX: Do not anchor scroll on topic navigation/map (#30580)
topic-navigation and topic-map appear in the DOM before the post stream, and are then rearranged with CSS grid. That means that, if they are entirely within the viewport, and does not have a fixed/sticky position, then they will be chosen as the browser's scroll anchor point.

We never want these elements to be used as the anchor, so we can set `overflow-anchor: none`.

https://meta.discourse.org/t/344386/16
2025-01-06 10:13:29 +00:00
Osama Sayegh
a15164431b
UX: Minor copy edit for full name requirement setting options (#30581) 2025-01-06 12:55:49 +03:00
Gary Pendergast
f5126199f6
UX: Admin setting page consistency - Navigation (#30574)
Create a basic config page that only contains navigation-related settings, to replace the setting filtered view linked to from "Navigation" in the admin sidebar.
2025-01-06 17:44:33 +11:00
Gary Pendergast
7922e6bfc0
DEV: Restart unicorn when any settings.yml changes. (#30577)
This change expands the matcher added in 02bebb7e91 to include plugin `settings.yml` files as requiring a server restart when they change.

The `Listen.to(only: ...)` filter only matches against filenames (as opposed to full paths) so we can't add a matcher against `plugins/.*/config/settings.yml` to make it explicit.
2025-01-06 17:43:44 +11:00
Martin Brennan
17f4052068
UX: Admin setting page consistency - Search (#30528) (#30573)
Followup c2282439b3

Make the Search config page reached from the sidebar
use our consistent site setting page rules.
2025-01-06 16:36:48 +10:00
Alan Guo Xiang Tan
15a7a84d84
DEV: Use github hosted runners for simple workflows (#30576)
Our self hosted runners are limited in quantity so we should preserve
them for workflows that actually require the additional resources
instead of tying them up on workflows that do not benefit from the
additional resources.
2025-01-06 14:15:16 +08:00
Martin Brennan
9a87baaab4
UX: Admin setting page consistency - Legal (#30572)
Followup c2282439b3

Make the Legal config page reached from the sidebar
use our consistent site setting page rules.
2025-01-06 16:08:42 +10:00
Martin Brennan
21470e4afd
UX: Admin setting page consistency - Trust levels (#30571)
Followup c2282439b3

Make the trust levels config page reached from the sidebar
use our consistent site setting page rules.
2025-01-06 15:53:18 +10:00
dependabot[bot]
caa8ff3d16
Build(deps): Bump net-imap from 0.5.4 to 0.5.5 (#30559)
Bumps [net-imap](https://github.com/ruby/net-imap) from 0.5.4 to 0.5.5.
- [Release notes](https://github.com/ruby/net-imap/releases)
- [Commits](https://github.com/ruby/net-imap/compare/v0.5.4...v0.5.5)

---
updated-dependencies:
- dependency-name: net-imap
  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>
2025-01-06 13:16:10 +08:00
dependabot[bot]
7fa8ce7672
Build(deps): Bump rubyzip from 2.3.2 to 2.4.1 (#30560)
Bumps [rubyzip](https://github.com/rubyzip/rubyzip) from 2.3.2 to 2.4.1.
- [Release notes](https://github.com/rubyzip/rubyzip/releases)
- [Changelog](https://github.com/rubyzip/rubyzip/blob/master/Changelog.md)
- [Commits](https://github.com/rubyzip/rubyzip/compare/v2.3.2...v2.4.1)

---
updated-dependencies:
- dependency-name: rubyzip
  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>
2025-01-06 13:15:40 +08:00
dependabot[bot]
251ca27d51
Build(deps-dev): Bump parallel_tests from 4.7.2 to 4.8.0 (#30557)
Bumps [parallel_tests](https://github.com/grosser/parallel_tests) from 4.7.2 to 4.8.0.
- [Changelog](https://github.com/grosser/parallel_tests/blob/master/CHANGELOG.md)
- [Commits](https://github.com/grosser/parallel_tests/compare/v4.7.2...v4.8.0)

---
updated-dependencies:
- dependency-name: parallel_tests
  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>
2025-01-06 13:15:20 +08:00
dependabot[bot]
84615695b5
Build(deps): Bump excon from 1.2.2 to 1.2.3 (#30558)
Bumps [excon](https://github.com/excon/excon) from 1.2.2 to 1.2.3.
- [Changelog](https://github.com/excon/excon/blob/master/changelog.txt)
- [Commits](https://github.com/excon/excon/compare/v1.2.2...v1.2.3)

---
updated-dependencies:
- dependency-name: excon
  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>
2025-01-06 13:15:02 +08:00
dependabot[bot]
3ac0098249
Build(deps-dev): Bump test-prof from 1.4.3 to 1.4.4 (#30555)
Bumps [test-prof](https://github.com/test-prof/test-prof) from 1.4.3 to 1.4.4.
- [Release notes](https://github.com/test-prof/test-prof/releases)
- [Changelog](https://github.com/test-prof/test-prof/blob/master/CHANGELOG.md)
- [Commits](https://github.com/test-prof/test-prof/compare/v1.4.3...v1.4.4)

---
updated-dependencies:
- dependency-name: test-prof
  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>
2025-01-06 13:14:48 +08:00
Martin Brennan
e987874204
FIX: Dashboard last checked date was always English (#30569)
The `problemsTimestamp` on the admin dashboard was always
forcing the "en" locale for some reason, we can remove the locale
entirely because we already set the locale for moment.js using
I18n on the server-side.

c.f. https://meta.discourse.org/t/last-check-date-not-localized-in-admin-dashboard/345483
2025-01-06 14:59:21 +10:00
Gary Pendergast
5463b845e3
UX: Admin setting page consistency - Site Logo (#30567)
Create a basic config page that only contains site logo settings, to replace the "branding" category linked to from "Site logo" in the admin sidebar.
2025-01-06 15:45:19 +11:00
Gary Pendergast
01ceeae2d6
UX: Admin setting page consistency - Fonts (#30564)
Create a basic config page that only contains font-related settings, to replace the setting filtered view linked to from "Font style" in the admin sidebar.
2025-01-06 15:05:40 +11:00
Kelv
b07e7cc70f
DEV: refactor setting object mixin to helper class (#30529)
This PR moves the logic from the setting-object mixin to a helper class. I've opted to maintain the interface of the previous classes (ThemeSettings / SiteSetting) that used the mixed-in methods through aliases so that we limit the amount of changes here (these are referenced in the string form and across classes/templates).

Another option we may consider in future if we want to optimize for performance is straight duplication which would trade off this overhead of aliasing/chaining calls through the helper for some duplicate code - only 2 models require these methods at the time of this PR.
2025-01-06 12:02:46 +08:00
Arpit Jalan
d400fe6623
FEATURE: add new setting to select view for category page on mobile (#30519) 2025-01-06 09:25:25 +05:30
Gary Pendergast
02bebb7e91
DEV: Restart unicorn when site_settings.yml changes. (#30565)
site_settings.yml is read when the server starts, but isn't re-read if it changes. (Eg, adding a new setting, or changing the configuration of an existing setting.)

This change includes site_settings.yml as a file that requires a server restart when it changes. This behaviour obeys the AUTO_RESTART environment variable.
2025-01-06 14:21:35 +11:00
Alan Guo Xiang Tan
c5a2ac3dec
Revert "DEV: Run one system test process per CPU core (#30484)" (#30539)
This reverts commit a78028e54e.

System tests started to become more unstable
2025-01-06 10:35:45 +08:00
Krzysztof Kotlarek
407fa69778
UX: admins embedding page follows admin ux guideline (#30122)
Conversion of /admin/customize/embedding page to follow admin UX guidelines.
2025-01-06 13:01:08 +11:00
Martin Brennan
02113fc22a
DEV: Add isTablet to capabilities service (#30562)
We already had isIpadOS, but for some themes and components
we really need to do different things if the user is on
a tablet, including Android tablets.

isTablet and isTabletScreen have been introduced to the
capabilities service.

isTablet is true if the screen size is a tablet, touch
is detected, or we have already detected iPad OS, or
the device matches tablet UAs

isTabletScreen checks both portrait and landscape dimensions
of 1280x600 which should cover most cases.
2025-01-06 11:28:38 +10:00
Jarek Radosz
8be29694ec
DEV: Clean up topics_controller_spec (#30553) 2025-01-05 01:09:23 +01:00
dependabot[bot]
53b51e0d56
Build(deps-dev): Bump ember-cli from 6.0.1 to 6.1.0 (#30459)
Bumps [ember-cli](https://github.com/ember-cli/ember-cli) from 6.0.1 to 6.1.0.
- [Release notes](https://github.com/ember-cli/ember-cli/releases)
- [Changelog](https://github.com/ember-cli/ember-cli/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ember-cli/ember-cli/compare/v6.0.1...v6.1.0)

---
updated-dependencies:
- dependency-name: ember-cli
  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>
2025-01-05 00:23:20 +01:00