Commit Graph

57912 Commits

Author SHA1 Message Date
30bea25631 DEV: Tweak db:create re-exec (#31132)
Rake allows env variables to specified in arguments, so we need to use
the list of top_level_tasks which excludes those env

Followup to c8718a64dd7a26165efe91706ce5507e6999044a.
2025-02-03 16:57:01 +00:00
0989c4b0a4 UX: update system font stack to system-ui (#31125)
support for the `system-ui` value is widely available now, so we can
drop the device specific values:
https://highperformancewebfonts.com/read/ditch-BlinkMacSystemFont-and-apple-system

https://caniuse.com/?search=system-ui
2025-02-03 11:28:17 -05:00
c8718a64dd DEV: Re-exec rake after creating database (#31120)
By design, db:create initializes the Rails app with SKIP_DB=true. That
means that SiteSettings get set up with the LocalProcessProvider instead
of the DBProvider. In other words: any calls to site settings will
return the default, rather then the actual value in the database.

Running db:migrate in the same rake invocation means that rails will not
be re-initialized, and so skip_db will remain true. Site settings
accessed during migrations and fixtures will therefore return incorrect
values.

One example of this is that running bin/rake db:create db:migrate
repeatedly in a development environment will cause the FAQ topic to be
seeded repeatedly, because the seed logic does not have access to the
site setting which stores the already-seeded topic id.

This commit will automatically re-exec the Rake command if any tasks are
specified after `db:create`
2025-02-03 15:51:52 +00:00
8d810f9271 Update translations (#31123) 2025-02-03 16:37:54 +01:00
92bc85da0e Build(deps): Bump json_schemer from 2.3.0 to 2.4.0 (#31114)
Bumps [json_schemer](https://github.com/davishmcclurg/json_schemer) from
2.3.0 to 2.4.0.
-
[Changelog](https://github.com/davishmcclurg/json_schemer/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/davishmcclurg/json_schemer/compare/v2.3.0...v2.4.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-03 16:03:07 +01:00
a6fb065924 UX: clean up post action menu styles, fix issues, add variables (#31100)
Related to
https://meta.discourse.org/t/double-button-inconsistencies-post-menu/349845

This does some general clean up...

* **Moves shared mobile/desktop styles into /common** 
We had some mobile hover states for some reason, and desktop hover/focus
states can be moved to common and gated with `.discourse-no-touch`...
this means we're applying them on capabilities rather than device type
  
* **Adds some `-d-post-control-` variables to make theming easier** 
Theme authors can replace the variables without worrying about selector
specificity
  
* **Removes an overridden fade-out class from likes**
  We were overriding the effect here anyway 
  
* **Fixes a janky hover transition effect on the like button**
   This was being incorrectly inherited from another button
  
...and fixes some issues

* **Corrects border radius on double buttons (likes, flags)** 
   

![image](https://github.com/user-attachments/assets/e3bf45b4-3d72-4858-94b1-dad41ff3e274)

* **Corrects double button height issues for flags**

   

![image](https://github.com/user-attachments/assets/eb5624ea-f434-43b6-8ffc-de9baf1fa0fd)


* **Adjusts the flag count to avoid the lumpy circle CSS problem**

   

![image](https://github.com/user-attachments/assets/7c0d85bc-7d72-4b99-ab1a-ec45bab05750)
   
* **Removes lingering post-tap focus/hover states on mobile by applying
`.discourse-no-touch` and `focus-visible`**

Tested both glimmer and legacy.
2025-02-03 09:31:17 -05:00
80fdb6f2e6 DEV: refactor username validation mixin to helper class (#31107)
This PR refactors the use of the UsernameValidation mixin to a helper
class for the SignupController component. We'll extend this to the
CreateAccount modal and InvitesShowController in follow-up PRs.
2025-02-03 22:27:45 +08:00
c8ccf79545 FIX: supports height/preview form-kit composer (#31121)
- `@height` was supported but not working correctly, this is now fixed
and tested
- `@preview` was not supported, we would always hide the preview in form
kit. You now have control over this, default `false`.
2025-02-03 12:56:20 +01:00
Sam
b76c5406bd DEV: revert mini_racer upgrade (#31119)
There are reports of high CPU usage, so we will revert for now
2025-02-03 17:17:35 +11:00
4d42df365f DEV: Remove code that is unused (#31117) 2025-02-03 09:53:38 +08:00
0b8a686531 DEV: Nuke dead code from 12 years ago (#31116) 2025-02-03 09:32:12 +08:00
d28a4edd1f FIX: Hacker News onebox favicon (#31115)
This file has changed at some point to an svg instead
of a gif
2025-02-03 09:17:13 +10:00
4fbbfd45f5 Build(deps-dev): Bump rubocop-discourse from 3.9.2 to 3.9.3 (#31112)
Bumps
[rubocop-discourse](https://github.com/discourse/rubocop-discourse) from
3.9.2 to 3.9.3.
-
[Commits](https://github.com/discourse/rubocop-discourse/compare/v3.9.2...v3.9.3)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-03 09:05:45 +11:00
69889317e1 UX: Fix discourse topic onebox styling (#31106)
Regressed possibly in https://github.com/discourse/discourse/pull/24198

Before / After

<img width="706" alt="Screenshot 2025-02-01 at 02 59 37"
src="https://github.com/user-attachments/assets/328a0a20-152e-4e3b-bb71-45cc19cce92c"
/>
<img width="706" alt="Screenshot 2025-02-01 at 02 59 13"
src="https://github.com/user-attachments/assets/d151b175-1ca4-4e40-87ee-90fa92de1f30"
/>
2025-02-01 12:27:58 +01:00
58f75ed205 UX: allow msg select buttons to wrap (#31084)
Before
![CleanShot 2025-01-31 at 13 47
32@2x](https://github.com/user-attachments/assets/b23ead7a-0d2d-4e37-b7dd-89fc7e60959b)

After
![CleanShot 2025-01-31 at 13 47
51@2x](https://github.com/user-attachments/assets/633984f7-c989-4f82-ac31-91ef9f7acc30)
2025-02-01 03:41:39 +01:00
5e178f9c7b Update INSTALL-cloud.md (#31089)
Mention our hosting and link it to the /pricing page.

Internal: /t/134402/13
2025-02-01 09:52:20 +09:00
2fb9188608 Update README.md description and screenshots (#31088)
Internal: /t/134402/13
2025-02-01 09:45:50 +09:00
3a93a61092 FEATURE: Remove unnecessary org names from PR oneboxes (#31102)
Instead of displaying:

`discourse:main <- discourse:feature` or `discourse:main <-
user:feature`

shows:

`main <- feature` or `main <- user:feature`
2025-02-01 01:05:08 +01:00
9f41ce7fce Build(deps): Bump rails_failover from 2.1.1 to 2.2.0 (#31056)
Bumps [rails_failover](https://github.com/discourse/rails_failover) from
2.1.1 to 2.2.0.
-
[Changelog](https://github.com/discourse/rails_failover/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/discourse/rails_failover/compare/v2.1.1...v2.2.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-31 17:07:52 +01:00
b11fd010fe UX: move "hide profile" checkbox to profile tab (#31095)
This moves the "hide my public profile" checkbox from the
/my/preferences/interface > other section into the top of the
/my/preferences/profile section.

Internal ref - t/146570
2025-01-31 17:04:20 +01:00
853564f859 FIX: reset the delete automatic group tooltip (#31094)
Prior to this change the tooltip would forever stay even after changing
a group until you hard refresh the page.

No test as it's a very niche behavior and we have a todo to have
multiple other improvements at this codepath.
2025-01-31 16:21:19 +01:00
a6b136977c DEV: Add missing clock icon to the svg_sprite list (#31093)
Meta:
https://meta.discourse.org/t/the-icon-clock-is-missing-from-the-default-svg-subset/349823/3

This adds the missing `clock` icon to the default SVG subset.
The icon is used in the GitHub PR onebox and the user's activity pending
posts tab.


![image](https://github.com/user-attachments/assets/24c639ac-fb72-4180-aa3b-75b107ae4e07)


![image](https://github.com/user-attachments/assets/cffd878a-3889-4f59-87d8-8ade1f292a33)
2025-01-31 15:47:30 +01:00
68dde7887a FEATURE: Handle newer url format for Twitch clips (#31080) 2025-01-31 10:42:46 -03:00
8ca2c14874 FIX: switch panel back to forum last known url (#31092)
Previously the return to forum link would automatically take you to the
forum homepage, however this was not intended functionality. We should
attempt to take the user to their last viewed forum page.

This change fixes a bug in how we determined what the destination link
should be.

Internal ref: /t/110508
2025-01-31 17:18:24 +04:00
4e2a982e91 Update translations (#31035) 2025-01-31 10:48:44 +01:00
a9eefd1b48 DEV: Support synchronous mode for uploads:sync_s3_acls rake task (#31091)
This commit updates the `uploads:sync_s3_acls` rake task to accept a
`sync` argument that would run the rake task in a synchronous manner
so that the outcome of running the rake task can easily be determined.
2025-01-31 17:34:34 +08:00
3978f45ca3 DEV: pass owner instead of services (#31090)
Passing the owner allows section class to access services without having
to pass each service instance one by one.
2025-01-31 10:34:17 +01:00
8d38929a67 DEV: reduces duplication with curryComponent (#31073)
curryComponent allows us to pass an object as splatted arguments.
2025-01-31 10:21:14 +01:00
76ade65a26 DEV: Remove optimized_images_preloaded kwarg from FileStore::S3Store#update_upload_ACL (#31087)
The optimization is not required because `find_each` fetches records in
batches of 1000 and no upload record will have more than 1000 optimized
images.
2025-01-31 15:53:06 +08:00
5bc7371192 FEATURE: Localization admin settings config page (#31085)
This commit adds a new Localization config page for
admins, as a basic filtered site setting page similar
to Legal and Notifications. Included settings are:

* default locale
* allow user locale
* set locale from accept langauge header
* onebox locale
* display local time in user card
* discourse local dates enabled
* support mixed text direction
* unicode usernames
* allowed unicode username characters
2025-01-31 12:55:30 +10:00
ff32232834 FIX: Cannot manually add users to automatic groups (#31062)
Adding/removing users from automatic groups should not be possible.

Bug introduced in this PR
https://github.com/discourse/discourse/pull/30174

Before
<img width="1435" alt="Screenshot 2025-01-30 at 3 35 12 pm"
src="https://github.com/user-attachments/assets/a982bfb7-3597-4efb-82b8-c11a47493075"
/>

After
<img width="1391" alt="Screenshot 2025-01-30 at 3 34 47 pm"
src="https://github.com/user-attachments/assets/894a9319-94b9-4fad-bf99-e357b910a209"
/>
2025-01-31 12:12:42 +11:00
7fd9550f64 DEV: Change dIcon to icon in components (#31083)
Apparently `icon` is the preferred nomenclature
2025-01-31 10:55:31 +10:00
dfb64f9b84 FIX: Quoting videos can show a corrupted thumbnail (#31079)
This change ensures we use the base62 sha1 for videos when quoting
because this is what the composer is used to using. With a valid base62
sha1 the composer already knows how to fetch the placeholder image for
it.

Fallbacks have been created to continue to support the old way as well
as a fix for the old way so that the thumbnail continues to display when
quoting. These fallbacks are in place so that we don't have to rebake
all posts that contain videos. If we ever do that we may remove these
fallbacks.
2025-01-30 17:54:50 -07:00
e849802a48 DEV: Update lint-configs to 2.3.1 (#31082) 2025-01-31 01:22:23 +01:00
798ab389ee Improved desc of use_email_for_username_and_name_suggestions (#31081) 2025-01-30 15:59:36 -08:00
95a759092e UX: Show full total numbers in admin reports (#31061)
This commit updates the display of totals and table
rows for reports in the admin interface. Currently
we show abbreviated numbers for totals e.g. 2.1M
which is not helpful when you need accurate data.
We are also not adding locale-specific number separators
so the row numbers are hard to read e.g. 246999 instead
of 246,999.

This commit fixes both issues to improve the UX of reports
without having to export them.

**Before (totals)**


![image](https://github.com/user-attachments/assets/6958252d-f778-495d-b799-7ebe4e9f1366)

**After (totals)**


![image](https://github.com/user-attachments/assets/2b51580a-cd09-42cd-b713-3c5018fa6727)

**Before (rows)**


![image](https://github.com/user-attachments/assets/38d36236-1382-45b2-a3dc-5b267b122e39)

**After (rows)**


![image](https://github.com/user-attachments/assets/607997b7-7a46-452a-ab6e-368671445a06)
2025-01-31 09:55:05 +10:00
d1c33076f3 DEV: Clean up TreeNode component (#31069)
1. use `constructor` instead of `didInsert`
2. remove non-existent `unregisterInputFieldObserver` arg usage
3. don't curry `@index` arg twice in `@onClick`
4. use `@bind`
5. use `concatClass`
6. `dIcon` -> `icon`
2025-01-31 00:50:43 +01:00
dbdcd7cf67 Build(deps-dev): Bump @ember/test-helpers from 5.0.0 to 5.1.0 (#31078)
Bumps
[@ember/test-helpers](https://github.com/emberjs/ember-test-helpers)
from 5.0.0 to 5.1.0.
- [Release
notes](https://github.com/emberjs/ember-test-helpers/releases)
-
[Changelog](https://github.com/emberjs/ember-test-helpers/blob/master/CHANGELOG.md)
- [Commits](https://github.com/emberjs/ember-test-helpers/commits)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-31 00:45:21 +01:00
5ebbba250a DEV: Include lib/stylesheet mtime in stylesheet cache (#31063)
Followup 23edfe7cc27cd56d5806c965ac52ed2b0394e8b8

When working on changes to any of the lib/stylesheet/*.rb
files, the color_definitions.scss and other stylesheet
caches can be annoyingly persistent.

This commit adds all of these lib files to the `max_file_mtime`
part of the `fs_asset_cachebuster` cache key, so if any of
them are changed then the cache will break, making development
a lot easier.
2025-01-31 09:32:10 +10:00
33fe79be6a FIX: change off to disabled for fast_typing_threshold setting (#31077)
Bug introduced in migration in this PR -
https://github.com/discourse/discourse/pull/30865/files#diff-ca17f6d1353d626d1664a3d55fcc7aed3c6e4587a0269cb264aa2c25c3264013R14

When the old setting was `0` then the value `for fast_typing_threshold`
should be `disabled` instead of `off`. Because of that mistake, new
users cannot create a topic when the `min_first_post_typing_time` value
was `0`.
2025-01-31 08:25:31 +11:00
7e6107aad7 PERF: Remove old fullscreen-detection code (#31075)
This code was calling `elementFromPoint` on every scroll event. This is
an expensive browser API, and also seems to trigger a premature 'paint'
event during initial render. This seems to trigger
cumulative-layout-shift metric problems, even though the shift was never
actually visible onscreen.

This workaround was added more than 7 years ago, and it seems like
`document.fullscreenElement` now correctly detects fullscreen youtube
embeds. So we should be able to remove the `elementFromPoint` call
without affecting any functionality.
2025-01-30 17:37:02 +00:00
eb6689b1e6 DEV: Add topic-list-item-style valueTransformer (#30727)
https://meta.discourse.org/t/346415/7
2025-01-30 17:10:33 +00:00
0ef9abe0f0 DEV: add plugin outlet around new color palette button (#31054) 2025-01-30 10:11:19 -05:00
23e58cd653 UX: remove animation for back button on mobile (#31048)
We're seeing drops in CLS performance and the animation of this element
may likely be the culprit. We can try removing and seeing if this is
indeed the issue.
2025-01-30 09:26:47 -05:00
581c65a5f2 Build(deps): Bump ember-curry-component from 0.1.0 to 0.3.0 (#31074)
Bumps
[ember-curry-component](https://github.com/davidtaylorhq/ember-curry-component)
from 0.1.0 to 0.3.0.
-
[Commits](https://github.com/davidtaylorhq/ember-curry-component/commits)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-30 13:49:46 +00:00
d217e61411 DEV: finer format control on field title/description (#31071)
FormKit allows you to set `@format` on a field which will set the width
of the wrapping container of the control. However, title and
descriptions are out of this container. FormKit will now by default
applies the same format to title and description.

You can override this behavior by using `@titleFormat` and
`@descriptionFormat`.
2025-01-30 13:39:05 +01:00
1613770290 DEV: Add a message to dedupe / mind the exit code (#31070) 2025-01-30 13:13:57 +01:00
f945549123 DEV: Pass navigateToTopic action to topic-list-item outlet (#31068) 2025-01-30 13:06:05 +01:00
42aea3ff1c DEV: Fix the dedupe workflow (#31067)
(and specify permissions)
2025-01-30 12:56:03 +01:00
c05c2c3667 DEV: supports tooltips in form kit (#31065)
Usage:

```javascript
// with a string
<Form as |form|>
  <form.Field @name="foo" @title="Foo" @tooltip="text" as |field|>
    <field.Input />
  </form.Field>
</Form>

// with a DTooltip component
<Form as |form|>
  <form.Field @name="foo" @title="Foo" @tooltip={{component DTooltip content="component"}} as |field|>
    <field.Input />
  </form.Field>
</Form>
```
2025-01-30 11:45:10 +01:00