Commit Graph

33586 Commits

Author SHA1 Message Date
Ella E.
4efcc88039
UX: Move flag CTA button from subheader to header (#29781)
* UX: Move flag CTA button from subheader to header

* DEV: Remove unused subpageheader import
2024-11-15 09:12:45 -07:00
Alan Guo Xiang Tan
6bf0ac730f
FIX: Rescue ActiveRecord::ReadOnlyError when baking theme field (#29776)
Firstly, we need to understand that ActiveRecord can be
connected to a role which prevent writes and this happens in Discourse when a
replica database has been setup for failover purposes. When a role
prevent writes from happening, ActiveRecord will raise the
`ActiveRecord::ReadOnlyError` if a write query is attempted.

Secondly, theme fields are baked at runtime within GET requests. The
baking process involves writing the baked value to the
`ThemeField#baked_value` column in the database.

If we combine the two points above, we can see how the writing of the
baked value to the database will trigger a `ActiveRecord::ReadOnlyError`
in a GET requests when the database is connected to a role preventing
writes. However, failing to bake a theme is not the end of the world and
should not cause GET requests to fail. Therefore, this commit adds a rescue
for `ActiveRecord::ReadOnlyError` in the `ThemeField#ensure_baked!`
method.
2024-11-15 10:19:10 +08:00
Martin Brennan
4e5de17e7c
FIX: Admin backups erroring because of S3 dualstack (#29775)
Followup 0568d36133
Followup 97cf069a06

Due to the S3 dualstack endpoint change, sites with
S3 backups configured but _not_ S3 uploads were erroring,
with admins unable to access the backups page. This
commit fixes the error by not enabling S3 dualstack
endpoints if S3 uploads have not been enabled, backups
don't need to use them.

c.f. https://meta.discourse.org/t/unable-to-backup-or-navigate-to-backups/335899
2024-11-15 12:05:59 +10:00
David Taylor
d3caa875be
DEV: Fix duplicate port on livereload (#29771)
Followup to fd5ef6896d
2024-11-14 23:05:47 +00:00
dependabot[bot]
4d89abbc14
Build(deps): Bump ace-builds from 1.36.4 to 1.36.5 (#29764)
Bumps [ace-builds](https://github.com/ajaxorg/ace-builds) from 1.36.4 to 1.36.5.
- [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.36.4...v1.36.5)

---
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>
2024-11-14 23:31:44 +01:00
Kris
5f130b2971
A11Y: update clickable search dropdown tips to be buttons (#29762) 2024-11-14 16:23:43 -05:00
Jan Cernik
2ac1894292
FIX: Error with social logins and fullpage signup (#29761) 2024-11-14 16:02:17 -03:00
David Taylor
f70cc6215c
DEV: Improve JSDoc for withPluginApi (#29758)
This allows consumers to get intellisense completions on the `api.` argument of their callback
2024-11-14 17:20:23 +00:00
Gabriel Grubba
b39c30045b
FEATURE: Add skip notification option to group invite to topic (#29741)
* FEATURE: Add skip notification option to group invite to topic

* DEV: rename `skip_notification` to `should_notify`

* DEV: update `should_notify` param to be default `true` in controllers

* DEV: update spec to use `greater than` instead of `equal to` to prevent flakiness

* Update app/controllers/topics_controller.rb

Co-authored-by: David Taylor <david@taylorhq.com>

* DEV: merged two `#invite_group` specs into one

* DEV: Added test case for `invite-group` in requests spec

---------

Co-authored-by: David Taylor <david@taylorhq.com>
2024-11-14 13:00:15 -03:00
Penar Musaraj
9b691853e0
FIX: Dismiss unread posts in subcategories (#29671)
When a parent category shows topics from subcategories, dismissing
should dismiss posts in both parent and subcategories.

Co-authored-by: Alan Guo Xiang Tan <gxtan1990@gmail.com>
2024-11-14 10:06:12 -05:00
Penar Musaraj
f62ed063fb
UX: Fix Android Firefox Mobile reply position (#29751) 2024-11-14 10:01:55 -05:00
David Taylor
fd5ef6896d
DEV: Overhaul devcontainer configuration (#28446)
- Uses a more appropriate image, with immutable tag (so update prompts work correctly)
- Updates port forwarding
- Improves mount setup (inc. persistant PG/Redis when rebuilding)
- Fixes ember-cli live reload
- Automatically configures VSCode & extensions
2024-11-14 12:11:38 +00:00
Joffrey JAFFEUX
9aae4df273
FIX: uses absolute strategy on ipad (#29754)
The absolute strategy was causing issues on modals.
2024-11-14 15:23:06 +09:00
Krzysztof Kotlarek
42b1ca8f78
UX: redesign admin permalinks page (#29634)
Redesign the permalinks page to follow the UX guide. In addition, the ability to edit permalinks was added.

This change includes:
- move to RestModel
- added Validations
- update endpoint and clear old values after the update
- system specs and improvements for unit tests
2024-11-14 10:03:58 +11:00
Keegan George
eb2992a628
REVERT: Check for features sooner (#29746) 2024-11-13 11:30:34 -08:00
Keegan George
8dc474952b
DEV: Check for features sooner (#29745)
This PR updates the Job for checking new features from the features feed from every day to every hour. This allows for easier rollout of features.
2024-11-13 10:08:13 -08:00
David Taylor
8d53f8ef1a
DEV: Simplify livereload configuration for better proxy compatibility (#29742)
When running a development environment behind a proxy (e.g. when using a cloud development environment, or a service like ngrok), the ember-cli port & protocol may not match the one in the browser. `livereload.js` knows how to auto-configure itself based on the current browser environment... but Ember CLI overrides that autoconfiguration with some hard-coded values.

The intention there is to allow running the livereload server on a different port to the ember-cli web proxy. We don't need that functionality.

This commit stops loading `ember-cli-live-reload.js`, and instead loads `_lr/livereload.js` directly.
2024-11-13 16:39:23 +00:00
Joffrey JAFFEUX
6779b46f55
FIX: correctly makes @disabled dynamic (#29738)
Disabled was set on field init which was preventing it to be dynamic.
2024-11-13 22:53:42 +09:00
Kris
9a22d7df7b
UX: reduce bottom topic map threshold, with protections (#29665) 2024-11-13 07:58:44 -05:00
Jan Cernik
3df3ad6ed6
FIX: Hide presence toggle icon is backwards (#29737) 2024-11-13 09:54:40 -03:00
Jan Cernik
920fa4c248
FIX: Correctly load the invites model when using full page logins (#29713) 2024-11-13 08:56:16 -03:00
Osama Sayegh
00196b8652
FIX: Restore and deprecate the :type param of uploads#create (#29736)
Follow up to 6f8f6a7726

Prior to the linked commit, the `uploads#create` endpoint had a `upload_type` and `type` param that acted as aliases for each other and raised an error if both of them were missing. In the linked commit, we removed the `type` param and always required the `upload_type` param which break API consumers that only included `type` in their requests.

This commit adds back the `type` param temporarily and introduces a deprecation message for it so that API consumers are made aware of the eventual removal of the `type` param.
2024-11-13 14:07:20 +03:00
Joffrey JAFFEUX
f1edc20a50
FIX: correctly supports dropping image (#29733)
This commit:
- Adds back the target drop options to enable the feature
- Applies the css to every elements and not just the one for admin emojis, also fixes the style as it was flashing and preventing it to work. For now we just change the color of the image icon.
- Adds a test to ensure we don't regress.
2024-11-13 17:30:14 +09:00
Jan Cernik
234133bd3b
UX: Split hide_profile_and_presence user option (#29632)
It splits the hide_profile_and_presence user option and the default_hide_profile_and_presence site setting for more granular control. It keeps the option to hide the profile under /u/username/preferences/interface and adds the presence toggle in the quick user menu.

Co-authored-by: Régis Hanol <regis@hanol.fr>
2024-11-12 22:22:58 -03:00
dependabot[bot]
7cdf559846
Build(deps): Bump ember-template-imports from 4.1.3 to 4.2.0 (#29729)
Bumps [ember-template-imports](https://github.com/ember-template-imports/ember-template-imports) from 4.1.3 to 4.2.0.
- [Release notes](https://github.com/ember-template-imports/ember-template-imports/releases)
- [Changelog](https://github.com/ember-cli/ember-template-imports/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ember-template-imports/ember-template-imports/commits)

---
updated-dependencies:
- dependency-name: ember-template-imports
  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>
2024-11-13 01:38:14 +01:00
dependabot[bot]
9aedd9909a
Build(deps-dev): Bump ember-cli from 5.12.0 to 6.0.0 (#29728)
Bumps [ember-cli](https://github.com/ember-cli/ember-cli) from 5.12.0 to 6.0.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/v5.12.0...v6.0.0)

---
updated-dependencies:
- dependency-name: ember-cli
  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-11-13 01:18:28 +01:00
Mark VanLandingham
9b8af0ea9f
DEV: Create permanent version of moved_posts table from PostMover class (#29664)
This is a very simple change, which creates a permanent table in the DB, rather than generating a temporary table when moving posts. This change is about capturing data and any usage will appear in a follow-up.

I did include a new column created_new_topic in the new table, so that it can be easily audited without having to compare destination topic created_at with moved_post records.
2024-11-12 14:35:20 -06:00
Penar Musaraj
4c1af2f414
UX: Fix modal header background color in webview (#29717) 2024-11-12 12:47:14 -05:00
Roman Rizzi
d97d48ead1
FIX: Ensure normalized_email gets anonymized (#29719) 2024-11-12 14:36:17 -03:00
David Taylor
fb2a688b29
DEV: Bump eslint, lint-configs, and move to flat config (#29661) 2024-11-12 12:33:17 +00:00
Krzysztof Kotlarek
34ed35e174
FIX: filterable staff logs for flags (#29695)
Flag actions must be added to `staff_actions` method to be filterable.
2024-11-12 11:23:18 +11:00
dependabot[bot]
0a0b490743
Build(deps-dev): Bump @swc/core from 1.9.1 to 1.9.2 (#29710)
Bumps [@swc/core](https://github.com/swc-project/swc) from 1.9.1 to 1.9.2.
- [Release notes](https://github.com/swc-project/swc/releases)
- [Changelog](https://github.com/swc-project/swc/blob/main/CHANGELOG.md)
- [Commits](https://github.com/swc-project/swc/compare/v1.9.1...v1.9.2)

---
updated-dependencies:
- dependency-name: "@swc/core"
  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-11-12 00:30:13 +01:00
Sérgio Saquetim
3019bb577b
DEV: Modernize the post menu from widgets to Glimmer components (#28670)
This commit modernizes the post menu by migrating it from the existing widget-based implementation to Glimmer components. This transition aims to improve the maintainability, performance, and overall developer experience.

It also introduces a new DAG-based transformer API for customizations that aims to be more flexible than the widget base one.

---------

Co-authored-by: David Taylor <david@taylorhq.com>
2024-11-11 15:36:08 -03:00
dependabot[bot]
5c5ac72488
Build(deps-dev): Bump jsuites from 5.7.1 to 5.7.2 (#29692)
Bumps [jsuites](https://github.com/jsuites/jsuites) from 5.7.1 to 5.7.2.
- [Release notes](https://github.com/jsuites/jsuites/releases)
- [Changelog](https://github.com/jsuites/jsuites/blob/master/changelog.md)
- [Commits](https://github.com/jsuites/jsuites/commits)

---
updated-dependencies:
- dependency-name: jsuites
  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-11-11 17:45:16 +00:00
Bianca Nenciu
f1700ca589
FEATURE: Paginate categories when there are many (#29569)
This commit removes the new optimized category style introduced in
previous commits (d37a0d40, 9a80d718 and 430c42ac), in favour of the
existent `categories_only`.
2024-11-11 17:32:45 +02:00
Jarek Radosz
e68905510d
DEV: Use the new hasHtml/includesHtml from qunit-dom (#29680) 2024-11-11 13:06:12 +01:00
Jarek Radosz
2272b1340b
DEV: Use qunit-dom instead of raw href/title comparisons (#29678) 2024-11-11 11:44:54 +01:00
Jarek Radosz
429b6a4e4e
DEV: Use qunit-dom instead of classList/activeElement (#29676) 2024-11-11 11:44:42 +01:00
Ted Johansson
189d98f3ca
DEV: Convert admin emojis UI to new layout (#29615)
This PR converts the custom emoji UI in the admin pages to follow the new admin UI guidelines.
2024-11-11 15:04:15 +08:00
dependabot[bot]
8c52345b55
Build(deps-dev): Bump qunit-dom from 3.2.1 to 3.3.0 (#29690) 2024-11-11 00:04:38 +01:00
Jarek Radosz
78ed0bb711
DEV: Use selectors instead of query() where possible (#29677) 2024-11-10 13:53:12 +01:00
Jarek Radosz
16a9663557
DEV: Use qunit-dom's isDisabled/isEnabled (#29675) 2024-11-10 02:24:58 +01:00
Jarek Radosz
d67a6002eb
DEV: Replace count with qunit-dom (#29674) 2024-11-10 02:06:03 +01:00
Jarek Radosz
f9e58938ce
DEV: Update visible/invisible uses to qunit-dom (#29672) 2024-11-10 01:41:50 +01:00
Jarek Radosz
de6d575d40
DEV: Convert all uses of exists to qunit-dom (#29667) 2024-11-10 01:30:33 +01:00
Penar Musaraj
20effebd51
DEV: Fix updating header background in webview (#29668)
This regressed in https://github.com/discourse/discourse/pull/28912 for media query changes.
2024-11-08 22:18:09 -05:00
Penar Musaraj
6912a1e3ca
UX: Change the authorize button color to primary (#29666)
Primary is a more appropriate color here than "danger". Authorizing is
important, but we usually use "danger" for destructive actions and
nothing is being destroyed here.
2024-11-08 17:33:50 -05:00
Jarek Radosz
c1916f7984
DEV: Convert assert.true(exists()) to qunit-dom (#29638) 2024-11-08 20:27:32 +01:00
David Taylor
3a23ff98bc
DEV: Fix passing translatedTitle as argument to flat-button (#29663)
Overriding computed properties with arguments is no longer supported by Ember, so we need to rename this computed property and add fallback logic manually.

This fixes the styleguide 'buttons' page. Ref https://meta.discourse.org/t/styleguide-bugs/335211?u=david
2024-11-08 18:46:05 +00:00
Angus McLeod
cb4b8146a3
Add dedicated user_api_key_clients table to allow for 1:many use cases (#28119) 2024-11-08 12:05:03 -05:00