Commit Graph

46581 Commits

Author SHA1 Message Date
dependabot[bot] 55909e30bc
Build(deps): Bump pg from 1.4.3 to 1.4.4 (#18552)
Bumps [pg](https://github.com/ged/ruby-pg) from 1.4.3 to 1.4.4.
- [Release notes](https://github.com/ged/ruby-pg/releases)
- [Changelog](https://github.com/ged/ruby-pg/blob/master/History.rdoc)
- [Commits](https://github.com/ged/ruby-pg/compare/v1.4.3...v1.4.4)

---
updated-dependencies:
- dependency-name: pg
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-12 15:38:17 +02:00
dependabot[bot] 1618193f21
Build(deps): Bump faraday-net_http from 3.0.0 to 3.0.1 (#18521)
Bumps [faraday-net_http](https://github.com/lostisland/faraday-net_http) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/lostisland/faraday-net_http/releases)
- [Commits](https://github.com/lostisland/faraday-net_http/compare/v3.0.0...v3.0.1)

---
updated-dependencies:
- dependency-name: faraday-net_http
  dependency-type: indirect
  update-type: version-update:semver-patch
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-12 15:38:05 +02:00
Jarek Radosz ea326906e3
DEV: Use css var font sizes (#18518)
For consistency and and the ability to change all font sizes at once in the dev tools
2022-10-12 15:31:59 +02:00
Jarek Radosz b5005e3574
DEV: Always use non-builtin net-* and digest gems (#18560)
This will possibly fix the issue we're having with Dependabot. It seems it now uses a different ruby version (i.e. 3.1+)
2022-10-12 15:22:22 +02:00
Bianca Nenciu 33087f0bdf
A11Y: Set role=presentation if alt attr is missing (#18546)
This applies to all images posted that do not have a user description.
2022-10-12 14:07:37 +03:00
David Taylor c707ee714d
DEV: Use npm for forked backburner.js version (#18559)
Using a git-sourced package seems to cause intermittent `yarn install` failures.

Followup to ad37c6c017
2022-10-12 11:14:41 +01:00
David Taylor ad37c6c017
DEV: Update `backburner.js` to include bugfix and dev improvements (#18549)
This version of backburner is patched to include
- Fix for scheduleOnce/cancel bug: https://github.com/BackburnerJS/backburner.js/pull/402
- Async stack debugging in Chrome: https://github.com/BackburnerJS/backburner.js/pull/404

The async debugging feature is enabled only in debug builds of Discourse to ensure production performance is unaffected.

Adding to `vendorFiles` causes the JS to be inserted directly after the `ember-source` bundle. That means that the `backburner` module defined by ember-source will be replaced with the patched version.
2022-10-12 10:06:03 +01:00
Natalie Tay 1631394826
FEATURE: Show relative time when date is omitted (#18547) 2022-10-12 11:23:34 +08:00
Martin Brennan 84f2529138
FEATURE: Add contentCSSClass for sidebar section-link (#18555)
In some cases, like in the chat plugin for muted channels,
we want to change the style of the sidebar content text.
This adds a new contentCSSClass function to the
BaseCustomSidebarSectionLink class and uses it in both
sections and section-link to add the CSS class if it is
provided.
2022-10-12 12:42:15 +10:00
Krzysztof Kotlarek e5b306b13e
FIX: warning about sidebar prefix style (#18553)
New double color feature introduced warning about CSS. Related PR https://github.com/discourse/discourse/pull/18525
2022-10-12 08:55:47 +08:00
Michael Fitz-Payne 5fdbbe3045 DEV(cache_critical_dns): add caching for MessageBus Redis hostname
We are already caching any DB_HOST and REDIS_HOST (and their
accompanying replicas), we should also cache the resolved addresses for
the MessageBus specific Redis. This is a noop if no MB redis is defined
in config. A side effect is that the MB will also support SRV lookup and
priorities, following the same convention as the other cached services.

The port argument was added to redis_healthcheck so that the script
supports a setup where Redis is running on a non-default port.

Did some minor refactoring to improve readability when filtering out the
CRITICAL_HOST_ENV_VARS. The `select` block was a bit confusing, so the
sequence was made easier to follow.

We were coercing an environment variable to an int in a few places, so
the `env_as_int` method was introduced to do that coercion in one place and
for convenience purposes default to a value if provided.

See /t/68301/30.
2022-10-12 10:11:22 +10:00
Rafael dos Santos Silva 6888eb5c2d
Revert "Revert "FEATURE: Preload resources via link header (#18475)" (#18511)" (#18531)
* Revert "Revert "FEATURE: Preload resources via link header (#18475)" (#18511)"

This reverts commit 95a57f7e0c.

* put behind feature flag

* env -> global setting

* declare global setting

* forgot one spot
2022-10-11 20:11:44 -03:00
Jordan Vidrine 47fa4dbef3
FIX: User field styling on login (#18551) 2022-10-11 16:51:02 -05:00
Kris 6d8405bbd0
UX: updated styles for user nav with sidebar (#18550) 2022-10-11 17:15:58 -04:00
Jordan Vidrine 356cf358f7
FIX: Change text (#18545) 2022-10-11 11:49:39 -05:00
Osama Sayegh ac9fbb56a4
DEV: Improve UX for user menu tabs when they're empty (#18520)
This commit adds more helpful/education messages that show up in the replies and "other notifications" tabs when they're empty. Internal topic: t/76879.
2022-10-11 18:33:09 +03:00
Rafael dos Santos Silva 4d525a70be
DEV: Increase nginx proxy buffer size (#18530)
* DEV: Increase nginx proxy buffer size

This is needed so we can reland the patch to move our asset preloading
from link tags in the response document to response headers.
2022-10-11 11:33:07 -03:00
Discourse Translator Bot f7db4150da
Update translations (#18543) 2022-10-11 16:29:04 +02:00
David Taylor f3e956a7a3
FIX: Staff action log 'show details' links (#18542)
Followup to 03b7b7d1bc
2022-10-11 12:17:36 +01:00
David Taylor a0eb8092f0
FIX: Ensure local date format shortcuts work correctly (#18541)
Followup to 03b7b7d1bc
2022-10-11 11:25:32 +01:00
Jacob Michalskie 36f7fbebdc
DEV: Allow ManagedAuthenticator classes to match by username (#18517) 2022-10-11 11:25:13 +01:00
David Taylor a10a81244c
FIX: Ensure poll type toggle buttons function correctly (#18540)
Followup to 03b7b7d1bc
2022-10-11 11:20:18 +01:00
Alan Guo Xiang Tan b75dc04a25
UX: Hide tags section from anonymous user when site has no tags (#18538)
If there are no top tags that an anonymous user can see and the site do
not have default sidebar tags configured for anonymous users, hide the
tag section entirely.
2022-10-11 13:33:50 +08:00
Martin Brennan 472abe532e
DEV: Add experimental setting for hashtag-autocomplete changes (#18537)
This initial PR just adds a enable_experimental_hashtag_autocomplete
setting, and related JS & HBR files, replacing direct setup of
the autocomplete within d-editor and instead using the new
lib/hashtag-autocomplete. This is the beginning of preparations
to allow other data sources to be added to this autocomplete,
as well as a redesign of the menu and rendered tags in the composer
preview and posts.
2022-10-11 13:15:16 +10:00
Martin Brennan b6854c2f88
FIX: Deprecated settings should not override from UI (#18536)
Unless we have specified `override = true` in the DeprecatedSettings
class for an old -> new settings map, we should not allow people
to change the old setting in the UI and have it affect the new
setting.
2022-10-11 11:14:13 +10:00
Alan Guo Xiang Tan a7bdd0a58e
PERF: Exclude anon sidebar tags in site serializer for logged in user (#18527)
This commits excludes the `anonymous_default_sidebar_tags` property in `SiteSerializer` when user
is not anonymous and when tagging has been disabled.
2022-10-11 08:45:22 +08:00
Martin Brennan 086f4775cd
FIX: Hide old PM settings (#18535)
Follow up to e62e93f83a.
It's confusing and unexpected that deprecated settings
unconditionally change the new setting's value via the
`SiteSettingsController`, even if `override` was set to `false`,
a follow-up PR will correct the issue in `SiteSettingsController`.
2022-10-11 10:13:53 +10:00
Krzysztof Kotlarek b02ece0bbb
FEATURE: double color for subcategories prefix (#18525)
Subcategories should display color from parent category and subcategory to clearly indicate that it is a subcategory.
2022-10-11 10:27:06 +11:00
Blake Erickson 49abcf965b
FEATURE: Hide Privacy Policy and TOS topics (#18533)
* FEATURE: Hide Privacy Policy and TOS topics

As a way to simplify new sites this change will hide the privacy policy
and the TOS topics from the topic list. They can still be accessed and
edited though.

* add tests
2022-10-10 17:19:18 -06:00
Martin Brennan cab173d3b5
DEV: Add specs for hashtags related code (#18526)
Adding a couple of small specs to code around hashtags
for tags and categories since I will be working in this
area soon and these were not covered.
2022-10-11 09:04:51 +10:00
Bianca Nenciu dc89b72d46
FIX: Show error if field is same as password (#18529)
* FIX: Show user fields validation errors

* FIX: Show error if user field is same as password
2022-10-10 20:00:52 +03:00
Bianca Nenciu 08ab09c928
FIX: Remove public topic invite functionality (#18488)
This can no longer be used from the user interface and could be used to
generate useless topic invites notifications. This commit adds site 
setting max_topic_invitations_per_minute to prevent invite spam.
2022-10-10 19:21:51 +03:00
Andrei Prigorshnev b06cc8a836
DEV: Decouple the user status modal from current user's status (#18514) 2022-10-10 17:45:21 +04:00
Arpit Jalan 140200ae83
FIX: do not show welcome CTA banner if the welcome topic is deleted (#18528) 2022-10-10 16:53:19 +05:30
Alan Guo Xiang Tan b2a14eeb16
FIX: Ensure group inboxes in messages section is sorted by group name (#18508) 2022-10-10 14:47:55 +08:00
chapoi 7009f9c95e
UX: correct colour to nav instead of danger (#18515) 2022-10-08 01:06:20 +02:00
Andrei Prigorshnev ec65f3c1ad
DEV: Pass a status object to the user-status-picker instead of passing emoji + description (#18513) 2022-10-08 02:21:53 +04:00
Blake Erickson e320bbe513
FEATURE: Adds seeded default categories to the sidebar (#18512) 2022-10-07 16:02:03 -06:00
David Taylor 26b9500983
DEV: Fix `bread-crumbs-right` `currentCategory` argument (#18491) 2022-10-07 19:34:28 +01:00
Rafael dos Santos Silva 95a57f7e0c
Revert "FEATURE: Preload resources via link header (#18475)" (#18511)
This reverts commit 2d1dbc6f96.

We need to increase nginx proxy buffer to land this.
2022-10-07 15:08:40 -03:00
Rafael dos Santos Silva 2d1dbc6f96
FEATURE: Preload resources via link header (#18475)
Experiment moving from preload tags in the document head to preload information the the response headers.

While this is a minor improvement in most browsers (headers are parsed before the response body), this allows smart proxies like Cloudflare to "learn" from those headers and build HTTP 103 Early Hints for subsequent requests to the same URI, which will allow the user agent to download and parse our JS/CSS while we are waiting for the server to generate and stream the HTML response.

Co-authored-by: Penar Musaraj <pmusaraj@gmail.com>
2022-10-07 13:19:50 -03:00
Penar Musaraj a1d67122b1
DEV: Refactor the last few bootbox dialogs (#18416) 2022-10-07 11:38:27 -04:00
Penar Musaraj 6426932834
UX: Default to dark category logo on dark schemes (#18510)
Fixes an edge case for when a category has a dark logo and the default
color scheme is dark.
2022-10-07 11:37:07 -04:00
Jarek Radosz d2d4749127
DEV: Asyncify `Composer.createPost()` (#18026)
I convert these Composer (and Topic) functions one by one because stuff do be breaking 😄

Moved the special pretender handler code from the global one to the tests that actually require it.
2022-10-07 17:25:15 +02:00
Jan Cernik 08476f17ff
FEATURE: Add dark mode option for category logos (#18460)
Adds a new upload field for a second dark mode category logo. 
This alternative will be used when the browser is in dark mode (similar to the global site setting for a dark logo).
2022-10-07 11:00:44 -04:00
Natalie Tay e391f71c04
FIX: Determining local date same range is erroring when there is no date (#18509) 2022-10-07 21:07:27 +08:00
Alan Guo Xiang Tan 14532ad425
DEV: Try out double nav for new experimental user page nav (#18495)
No tests and this redesign is still highly highly experimental
2022-10-07 12:20:39 +08:00
Natalie Tay 7d8cda9858
FEATURE: Omit showing day when 'to' day is same as 'from' day (#18500)
Essentially,

Saturday at 2:50 PM -> Saturday at 4:38 PM becomes
Saturday at 2:50 PM -> 4:38 PM (Singapore)

Also, the displayed dates are shortened when the standalone date
is within two days. So despite the 'from' and 'to' date being the
same day, it may show 'Saturday' for 'from', and the specific date
for the 'to'. This corrects the behaviour.

(so if the current date and time is Thursday 5PM, the 'from' date
below is within 2 days, but the 'to' date is not)
Saturday at 2:50 PM -> 8 October 2022 at 9:38 PM becomes
Saturday at 2:50 PM -> 9:38 PM
2022-10-07 09:39:41 +08:00
Martin Brennan cb26d52d33
DEV: Remvoe IMAGES_EXTENSIONS_REGEX const in lib/uploads (#18497)
This IMAGES_EXTENSIONS_REGEX const just creates redundancy
when we already have the `isImage` function -- the two can
easily get out of sync. Replace all usages of the former
with the latter.
2022-10-07 09:24:08 +10:00
dependabot[bot] 0059be6856
Build(deps): Bump ember-cached-decorator-polyfill (#18507)
Bumps [ember-cached-decorator-polyfill](https://github.com/ember-polyfills/ember-cached-decorator-polyfill) from 0.1.4 to 1.0.1.
- [Release notes](https://github.com/ember-polyfills/ember-cached-decorator-polyfill/releases)
- [Changelog](https://github.com/ember-polyfills/ember-cached-decorator-polyfill/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ember-polyfills/ember-cached-decorator-polyfill/compare/v0.1.4...v1.0.1)

---
updated-dependencies:
- dependency-name: ember-cached-decorator-polyfill
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-07 00:58:21 +02:00