Commit Graph

33638 Commits

Author SHA1 Message Date
Jan Cernik
876591fdab
FIX: Signup fields tab order and descriptions (#29772) 2024-11-15 18:17:55 -03:00
OsamaSayegh
a28ab171ec DEV: Add index to users.ip_address 2024-11-15 11:17:07 -05:00
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
Ted Johansson
f573fd8f5e
FEATURE: Add more bulk dismiss buttons with confirmation (#29331)
When performing bulk dismissal in Unread and New views, the dismiss button stays at the top of the UI. Because of this we want to provide the dismiss action also in the "sticky" menu that's always in view, even when scrolling a long list of topics.
2024-11-08 15:59:12 +08:00
Alan Guo Xiang Tan
af642d0d69
Revert "FEATURE: Mark bad uploads with :invalid_url (#29640)" (#29657)
This reverts commit 5a00a041f1.

Implementation is currently not correct. Multiple uploads can share the
same etag but have different paths in the S3 bucket.
2024-11-08 13:04:52 +08:00
Osama Sayegh
4bc030f76f
FIX: Add back the option to create invite without emailing (#29641)
Follow-up to a5497b74be

In the linked commit, as part of simplifying the invite modal, we removed the option to skip sending an email when creating an invite restricted to a specific address. This has caused confusion about whether an email will be sent by Discourse or not, so we're adding back the option to create a restricted invite without emailing.

Internal topic: t/134023/48.
2024-11-08 07:59:24 +03:00
Martin Brennan
97cf069a06
FIX: S3 custom endpoint incompatible with dualstack (#29654)
Followup 0568d36133

S3 itself and other S3-compatible providers do not
allow using an S3 custom endpoint and dualstack at
the same time, so this commit fixes that by not using
dualstack when the endpoint is present.
2024-11-08 11:12:49 +10:00
Kris
64291fedf8
UX: lower min_post_count to show bottom topic map (#29649) 2024-11-07 20:10:18 -05:00
Keegan George
5a23a74bbc
DEV: Show confirmation dialog when admins disable 2FA (#29652)
This PR ensures that admins are shown a confirmation dialog when clicking to disable 2FA for a user. The 2FA button is right below the "Grant Badge" button and as such it can easily be clicked accidentally. It's also good practice to ask for confirmation before removing important functionality.
2024-11-07 16:39:42 -08:00
Bianca Nenciu
5a00a041f1
FEATURE: Mark bad uploads with :invalid_url (#29640)
A "bad upload" in this context is a upload with a mismatched URL. This can happen when changing the S3 bucket used for uploads and the upload records in the database have not been remapped correctly.
2024-11-08 08:05:14 +08:00
Renato Atilio
7568e732cc
FIX: resume editing when through /new-message (#29637)
"Resume editing" would do nothing when going through the `/new-message` flow.

This seems to be broken since [this commit](b0f6d074be). which moved `this._setModel` calls around – the same we're doing now, but to different places: the first one needs to happen after the `draft.data` has been set , while the second needs to happen before the `this.open` call.
2024-11-07 17:39:58 -03:00
chapoi
75ee73f969
UX: remove icons indicating time in userstatus, bookmarks, topic timer (#29635) 2024-11-07 06:54:40 +01:00
Ella E.
b4f7a1b761
UX: Apply admin table classes for consistent mobile styling on the API keys page (#29630)
Some checks are pending
Licenses / run (push) Waiting to run
Linting / run (push) Waiting to run
Tests / core frontend (${{ matrix.browser }}) (Chrome) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (annotations, core) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (backend, core) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (backend, plugins) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (frontend, plugins) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (frontend, themes) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, chat) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, core) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, plugins) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, themes) (push) Waiting to run
Tests / core frontend (${{ matrix.browser }}) (Firefox ESR) (push) Waiting to run
Tests / core frontend (${{ matrix.browser }}) (Firefox Evergreen) (push) Waiting to run
* UX: Apply admin table classes for consistent mobile styling on the API keys page

* apply prettier
2024-11-06 18:38:25 -07:00
Martin Brennan
0568d36133
FIX: Use dualstack S3 endpoint for direct uploads (#29611)
When we added direct S3 uploads to Discourse, which use
presigned URLs, we never took into account the dualstack
endpoints for IPv6 on S3.

This commit fixes the issue by using the dualstack endpoints
for presigned URLs and requests, which are used in the
get-presigned-put and batch-presign-urls endpoints used when
directly uploading to S3.

It also makes regular S3 requests for `put` and so on use
dualstack URLs. It doesn't seem like there is a downside to
doing this, but a bunch of specs needed to be updated to reflect this.
2024-11-07 11:06:39 +10:00
dependabot[bot]
cc01555fce
Build(deps-dev): Bump @embroider/compat in the embroider group (#29626)
Bumps the embroider group with 1 update: [@embroider/compat](https://github.com/embroider-build/embroider/tree/HEAD/packages/compat).


Updates `@embroider/compat` from 3.6.5 to 3.7.0
- [Release notes](https://github.com/embroider-build/embroider/releases)
- [Changelog](https://github.com/embroider-build/embroider/blob/main/CHANGELOG.md)
- [Commits](https://github.com/embroider-build/embroider/commits/HEAD/packages/compat)

---
updated-dependencies:
- dependency-name: "@embroider/compat"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: embroider
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-07 00:38:09 +01:00
dependabot[bot]
fa959b0b54
Build(deps-dev): Bump jsuites from 5.6.6 to 5.7.1 (#29627)
Bumps [jsuites](https://github.com/jsuites/jsuites) from 5.6.6 to 5.7.1.
- [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-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-07 00:30:33 +01:00
Keegan George
fad0d2ec62
UX: New experimental features should be marked clearly (#29622)
This PR adds a small visual change to the new feature item on the `/admin/whats-new` page. When features are marked with an experimental site setting, they should show an indication on the feature item that it is "Experimental"
2024-11-06 15:26:30 -08:00
dependabot[bot]
b8295b8b70
Build(deps-dev): Bump @swc/core from 1.8.0 to 1.9.1 (#29628)
Bumps [@swc/core](https://github.com/swc-project/swc) from 1.8.0 to 1.9.1.
- [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.8.0...v1.9.1)

---
updated-dependencies:
- dependency-name: "@swc/core"
  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-11-07 00:06:08 +01:00
Renato Atilio
ac33ecdc8c
FIX: pass topic+category to @-mention user search (#29620)
When replying to a topic, the @-mention userSearch needs the topicId and the categoryId so they can trigger immediately, with sane suggestions.

This was broken when the mentions were moved from ComposerEditor to DEditor.
2024-11-06 15:20:54 -03:00
Jean
708533b1e0
FEATURE: Add links to searchable user fields in users directory and user profile (#29338)
* FEATURE: Add links to searchable user fields in users directory and user profile
2024-11-06 13:35:30 -04:00
Ella E.
13c7773036
UX: Make the emojis in the admin page table list work better on mobile (#29619)
* UX: Apply admin table classes for consistent mobile styling on the emojis page

* UX: remove icon from the button

* UX: styling tweaks on the emoji uploader form

* UX: right align table button controls

* apply prettier
2024-11-06 10:25:03 -07:00
David Taylor
0237ef80bd
DEV: Enable ember/no-classic-classes eslint rule (#28610) 2024-11-06 13:31:01 +00:00
Jarek Radosz
1ba6f6f1ae
DEV: Update content-tag to 2.0.3 (#29616) 2024-11-06 13:29:24 +01:00
Loïc Guitaut
5177aef37d FIX: Don’t try to serialize associations in PostRevisionSerializer
Some checks are pending
Licenses / run (push) Waiting to run
Linting / run (push) Waiting to run
Tests / core frontend (${{ matrix.browser }}) (Firefox Evergreen) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, plugins) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, themes) (push) Waiting to run
Tests / core frontend (${{ matrix.browser }}) (Chrome) (push) Waiting to run
Tests / core frontend (${{ matrix.browser }}) (Firefox ESR) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (annotations, core) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (backend, core) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (backend, plugins) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (frontend, plugins) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (frontend, themes) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, chat) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, core) (push) Waiting to run
Currently, if an association is added as a tracked field in
`PostRevisor`, the `PostRevisionSerializer` class will try to serialize
it somehow. This will raise an error as ActiveRecord collection proxies
can't be serialized.

This patch addresses this issue by skipping any association tracked by
the `PostRevisor` class.
2024-11-06 10:38:41 +01:00
Ted Johansson
3be925e161
DEV: Untangle award badge admin CSS (#29614)
I was skimming through existing pages to get a feel for the admin UI guidelines. I noticed that this part was missing its margin. On some further investigation, it seems that a single CSS selector, .award-badge was being used both for the section and for the button in the header, so I decided to 1) separate the two and 2) add in the missing margin.
2024-11-06 16:10:39 +08:00
chapoi
a097d86eea
UX: fix visibility of grant badge modal dropdowns (#29613) 2024-11-06 07:30:13 +01:00
Osama Sayegh
6f8f6a7726
FIX: Pass upload type correctly to uploads#create (#29600)
Prior to Uppy, the `uploads#create` endpoint used to receive a `type` param that indicated the purpose/target of the upload, such as `avatar`, `site_setting` and so on. With the introduction of Uppy, the `type` param became the MIME type of the file being uploaded, and the purpose/target of the upload became a new param called `upload_type`, however the backend could still use the `type` param (which now contains MIME type) as the purpose/target of the upload if `upload_type` is absent.

We technically don't need to send the MIME type over the network, but it seems like it's done by Uppy and we have no control over the `type` param that Uppy includes:

758de8167b/app/assets/javascripts/discourse/app/lib/uppy/uppy-upload.js (L146-L151)

This commit does a couple of things:

1. It amends the `uploads#create` endpoint so it always requires the `upload_type` param and doesn't fallback to `type` if `upload_type` is absent
2. It forces consumers of the `UppyUpload` class (and by extension `UppyImageUploader`) to specify `type` of the upload

Internal topic: t/140945.
2024-11-06 07:00:35 +03:00
Osama Sayegh
ae721bd0f1
DEV: Fetch settings by area name instead of individual settings (#29604)
This commit switches the route for the about config page to retrieve the list of site settings that control the /about page by their area instead of their individual names.

Internal topic: t/136384.
2024-11-06 06:56:27 +03:00
Krzysztof Kotlarek
973b599e11
FIX: correctly display category name in replace text modal (#29612)
Bug introduced in this PR https://github.com/discourse/discourse/pull/23232

The previous modal was using `category.name`

https://github.com/discourse/discourse/pull/23232/files#diff-bfae353a2f3457780e5c281b6a165261cfe552dd9dd791f3859e52d60e22be7fL20
2024-11-06 13:39:52 +11:00
chapoi
8cb8ad763a
UX: add heading role to close composer dialog (#29590) 2024-11-06 03:39:37 +01:00
chapoi
fa03499c7e
UX: add missing role attribute (#29591) 2024-11-06 03:21:48 +01:00
dependabot[bot]
e2292d4c59
Build(deps): Bump ember-auto-import from 2.9.0 to 2.10.0 (#29606)
Some checks are pending
Licenses / run (push) Waiting to run
Linting / run (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (backend, core) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (backend, plugins) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (frontend, plugins) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (frontend, themes) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, chat) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, core) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, plugins) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, themes) (push) Waiting to run
Tests / core frontend (${{ matrix.browser }}) (Chrome) (push) Waiting to run
Tests / core frontend (${{ matrix.browser }}) (Firefox ESR) (push) Waiting to run
Tests / core frontend (${{ matrix.browser }}) (Firefox Evergreen) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (annotations, core) (push) Waiting to run
Bumps [ember-auto-import](https://github.com/embroider-build/ember-auto-import/tree/HEAD/packages/ember-auto-import) from 2.9.0 to 2.10.0.
- [Release notes](https://github.com/embroider-build/ember-auto-import/releases)
- [Changelog](https://github.com/embroider-build/ember-auto-import/blob/main/packages/ember-auto-import/CHANGELOG.md)
- [Commits](https://github.com/embroider-build/ember-auto-import/commits/HEAD/packages/ember-auto-import)

---
updated-dependencies:
- dependency-name: ember-auto-import
  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-06 01:06:08 +01:00
Alan Guo Xiang Tan
57f4176b57
DEV: Bump rubocop_discourse (#29608) 2024-11-06 06:27:49 +08:00
Jordan Vidrine
cf350ba54c
UX: Make codeblock buttons 'flat' (#29603) 2024-11-05 14:45:08 -06:00
Amanda Alves Branquinho
758de8167b
DEV: Add outlet wrapper for user card information replacement (#29523)
Some checks are pending
Licenses / run (push) Waiting to run
Linting / run (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (annotations, core) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (backend, core) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (backend, plugins) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (frontend, plugins) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (frontend, themes) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, chat) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, core) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, plugins) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, themes) (push) Waiting to run
Tests / core frontend (${{ matrix.browser }}) (Chrome) (push) Waiting to run
Tests / core frontend (${{ matrix.browser }}) (Firefox ESR) (push) Waiting to run
Tests / core frontend (${{ matrix.browser }}) (Firefox Evergreen) (push) Waiting to run
* DEV: Add outlet wrapper for user card information replacement

* Fix format issues

* Fix format issues
2024-11-05 14:03:20 -03:00
Régis Hanol
afdca41fd5
FIX: weird slow auto scrolling on iOS (#29598)
In some cases, on Safari iOS, we would recompute the "--composer-vh" variable due to a minimal change in the viewport. This ends up triggering a loop where setting this variable triggers another viewport resize event, which triggers another change of the variable...

In order to fix (patch?) this issue, we now have a 1px leeway when checking the difference between the previous and new viewport.

Internal ref - t/141088
2024-11-05 17:58:00 +01:00
Bianca Nenciu
948e283e0f
FIX: Use correct styles on category pages (#29588)
Multiple category styles can be used on the same site. The category and
subcategories page will use the "desktop_category_page_style" setting
and individual category pages will use the style selected in settings,
if any.

Commit c1f078ca tried to use the same style for both the category and
subcategories page, but the route matching did not take into account
the "discovery.categoryAll" and "discovery.categoryNone" variants of
the "discovery.category" route.
2024-11-05 23:51:22 +08:00
dependabot[bot]
2aeb529a69
Build(deps-dev): Bump @swc/core from 1.7.42 to 1.8.0 (#29578)
Bumps [@swc/core](https://github.com/swc-project/swc) from 1.7.42 to 1.8.0.
- [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.7.42...v1.8.0)

---
updated-dependencies:
- dependency-name: "@swc/core"
  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-11-05 15:36:47 +01:00
dependabot[bot]
0d27c7db70
Build(deps): Bump ace-builds from 1.36.3 to 1.36.4 (#29579)
Bumps [ace-builds](https://github.com/ajaxorg/ace-builds) from 1.36.3 to 1.36.4.
- [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.3...v1.36.4)

---
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-05 15:15:20 +01:00
Jarek Radosz
d076ed8c77
DEV: Convert some simple model methods to async/await (#29594) 2024-11-05 14:59:51 +01:00
Juan David Martínez Cubillos
e65367d603
DEV: Add plugin outlet to about.hbs (#29582)
* DEV: Add plugin outlet to about.hbs

* linter issues

* removed unintended code
2024-11-05 08:33:20 -05:00
Jarek Radosz
a553c9ea0c
FIX: Incorrect reference in TopicListHeaderColumn (#29593) 2024-11-05 13:17:41 +01:00
Jarek Radosz
cbfd596b1b
DEV: Remove unnecessary setupController methods (#29592)
and call super instead of manually setting model
2024-11-05 13:17:32 +01:00
David Taylor
1b5a7be3d4
PERF: Replace slow :has selectors with body classes (#29581) 2024-11-05 10:06:13 +11:00
Martin Brennan
b124736a1c
DEV: Convert install theme modal to GJS (#29506)
We will likely get rid of this at some point, but in the meantime
let's make it easier to modify and bring it up to date.
2024-11-05 09:04:33 +10:00
David Taylor
216845e4c7
DEV: Deprecate template overrides (#29544)
Template overrides have been advised against for a long time, and are increasingly hard to maintain as Discourse's development accelerates. This commit officially deprecates this customization method, which will be removed in the not-too-distant future (likely in the first half of 2025).
2024-11-04 17:38:33 +00:00
Jarek Radosz
9c5fc6f1df
DEV: Add more-topics plugin API (#29143)
From plugin-api comment:

Registers a new tab to be displayed in "more topics" area at the bottom of a topic page.

```gjs
 api.registerMoreTopicsTab({
   id: "other-topics",
   name: i18n("other_topics.tab"),
   component: <template>tbd</template>,
   condition: ({ topic }) => topic.otherTopics?.length > 0,
 });
```

You can additionally use more-topics-tabs value transformer to conditionally show/hide
specific tabs.

```js
api.registerValueTransformer("more-topics-tabs", ({ value, context }) => {
  if (context.user?.aFeatureFlag) {
    // Remove "suggested" from the topics page
    return value.filter(
      (tab) =>
        context.currentContext !== "topic" ||
        tab.id !== "suggested-topics"
    );
  }
});
```
2024-11-04 17:32:49 +01:00
Keegan George
7a936da05c
DEV: Auto grid images no longer experimental (#29572)
Some checks are pending
Licenses / run (push) Waiting to run
Linting / run (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, core) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, plugins) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, themes) (push) Waiting to run
Tests / core frontend (${{ matrix.browser }}) (Chrome) (push) Waiting to run
Tests / core frontend (${{ matrix.browser }}) (Firefox ESR) (push) Waiting to run
Tests / core frontend (${{ matrix.browser }}) (Firefox Evergreen) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (annotations, core) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (backend, core) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (backend, plugins) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (frontend, plugins) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (frontend, themes) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, chat) (push) Waiting to run
Recently we added a new feature for automatically gridding images in the composer (https://github.com/discourse/discourse/pull/29260). After testing this feature under a setting for a short period of time, the feature is no longer experimental anymore.

This PR removes the site setting `experimental_auto_grid_images`.
2024-11-04 08:21:40 -08:00
Kris
1d637c5243
UX: remove extra margin from PM small actions (#29571) 2024-11-04 10:53:35 -05:00
Renato Atilio
b061fd9cc2
DEV: refactor textarea from d-editor (#29411)
Refactors the DEditor component making it textarea-agnostic.
2024-11-04 12:48:10 -03:00
Renato Atilio
6459ab9320
UX: allow anon users to download calendar (#29551)
Allows anonymous users to download the calendar file. Before, they were given the option, but it would fail silently with a `TypeError: Cannot read properties of null (reading 'user_option')`.
2024-11-04 12:35:45 -03:00