Commit Graph

45870 Commits

Author SHA1 Message Date
Andrei Prigorshnev
ef923f1bb1
FEATURE: Publish everyone's status to everyone (#17343) 2022-07-07 17:37:05 +04:00
Kris
7d3b22135c
UX: don't animate experimental sidebar on reload (#17372) 2022-07-07 09:33:17 -04:00
David Taylor
d037796ff4
FIX: Allow connector template names to be camelCase (#17371)
The default Ember resolver implementation allows this for components. We need the same for connectors (which are essentially components behind-the-scenes)
2022-07-07 12:42:23 +01:00
David Taylor
5b0a8bfbcb
DEV: Make sass deprecations quieter during test build (#17369) 2022-07-07 11:03:16 +01:00
Jarek Radosz
39c28cec87
DEV: Allow hooks.beforeEach usage w/ component tests (#17360) 2022-07-07 09:57:38 +02:00
Krzysztof Kotlarek
95c257e2ea
FEATURE: plugin outlet for sidebar (#17367) 2022-07-07 15:05:20 +08:00
David Taylor
1121062aa9
DEV: Run prettier and rubocop in parallel for CI (#17357) 2022-07-07 13:29:14 +08:00
Jarek Radosz
c32ac45b29
DEV: Reduce test noise (#17362) 2022-07-07 13:28:40 +08:00
dependabot[bot]
d3003f4fec
Build(deps): Bump oj from 3.13.15 to 3.13.16 (#17363)
Bumps [oj](https://github.com/ohler55/oj) from 3.13.15 to 3.13.16.
- [Release notes](https://github.com/ohler55/oj/releases)
- [Changelog](https://github.com/ohler55/oj/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/ohler55/oj/compare/v3.13.15...v3.13.16)

---
updated-dependencies:
- dependency-name: oj
  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>
2022-07-07 13:25:46 +08:00
tshenry
d1a15d4f8d
FIX: Should be UploadReference instead of UploadReferences (#17361)
This fixes a couple of typos that were introduced in 9db8f00
2022-07-06 11:40:54 -07:00
Kris
fbc89dd41a
UX: improve experimental sidebar transitions (#17358) 2022-07-06 13:31:06 -04:00
Chapoi
63562e8b14
UX: switch highlight/select colours in select-kit (#17356) 2022-07-06 16:49:36 +02:00
David Taylor
fc36ac6cde
DEV: Modernize Ember Resolver (#17353)
This switches us to use the modern ember resolver package, and re-implements a number of our custom resolution rules within it. The legacy resolver remains for now, and is used as a fallback if the modern resolver is unable to resolve a package. When this happens, a warning will be printed to the console.

Co-authored-by: Peter Wagenet <peter.wagenet@gmail.com>
2022-07-06 14:20:00 +01:00
Isaac Janzen
5c4c8d26c7
DEV: Update expand-table table query (#17347)
Instead of selecting the first table in the parent, we now select the first table after the selected <kbd>expand table</kbd> button
2022-07-06 08:01:46 -05:00
David Taylor
fb31ae04a7
FIX: Ensure there is no limit on tag list settings (#17355)
`maximum=null` is not a supported configuration option. Instead, we need to pass the `@unlimitedTagCount` attribute
2022-07-06 12:23:23 +01:00
David Taylor
2d5d15b4bb
FIX: Ensure pull-hotlinked can rewrite lone oneboxes (#17354)
Mutating the `raw` variable like this would cause issues upstream, meaning that the modification is not persisted. Instead, we should allocate a new string like the other replacement methods.
2022-07-06 11:46:33 +01:00
Jarek Radosz
2e4056d185
DEV: Improve multisite db scripts in dev (#17337)
## Without multisite.yml config

No change. `bin/rails db:create` / `db:migrate` / `db:drop` should work the same.

## With multisite.yml config

### db:create

`bin/rails db:create` creates development, test, and all databases from the multisite config

`RAILS_DB=[site] bin/rails db:create` creates the database for the specified site from the multisite config

### db:migrate

`bin/rails db:migrate` migrates the development database and all databases from the multisite config

`RAILS_ENV=test bin/rails db:migrate` migrates the test database and `discourse_test_multisite`

`RAILS_DB=[site] bin/rails db:migrate` migrates the database for the specified site from the multisite config

### db:drop

`bin/rails db:drop` drops development, test, and all databases from the multisite config

`RAILS_DB=[site] bin/rails db:create` drops the database for the specified site from the multisite config
2022-07-06 10:39:03 +02:00
Jarek Radosz
c3fd91670e
DEV: Update linting setup and fix issues (#17345)
Re-lands #16119 and #17298

* Update eslint-config-discourse
* Update linting workflow
* Prettier-ignore stuff
* Update template-lint config
* Auto-fix template issues
* Fix various template issues
  Mostly incorrect attributes and unused templates
* Prettier js files
* Fix template auto-fix regressions
* Small css tweak

Co-authored-by: Peter Wagenet <peter.wagenet@gmail.com>
2022-07-06 10:37:54 +02:00
Jarek Radosz
f7c133ac74
DEV: Update sass (#17349) 2022-07-06 10:35:55 +02:00
Discourse Translator Bot
ba77c98c5d
Update translations (#17338) 2022-07-06 09:15:02 +02:00
Michael Fitz-Payne
1867202a4d DEV(cache_critical_dns): add option to run once and exit
There are situations where a container running Discourse may want to
cache the critical DNS services without running the cache_critical_dns
service, for example running migrations prior to running a full bore
application container.

Add a `--once` argument for the cache_critical_dns script that will
only execute the main loop once, and return the status code for the
script to use when exiting. 0 indicates no errors occured during SRV
resolution, and 1 indicates a failure during the SRV lookup.

Nothing is reported to prometheus in run_once mode. Generally this
mode of operation would be a part of a unix pipeline, in which the exit
status is a more meaningful and immediate signal than a prometheus metric.

The reporting has been moved into it's own method that can be called
only when the script is running as a service.

See /t/69597.
2022-07-06 14:53:02 +10:00
David Taylor
6c49ec39ea
DEV: Disable RAISE_ON_DEPRECATION (#17351)
Some plugins/themes are still awaiting updates for some deprecations, and they started raising errors in development. It's not clear that the errors are development-only, so it can be quite confusing for developers.

Disabling this flag for now until we can make the messages clearer and fix up existing deprecation issues in themes/plugins.
2022-07-06 11:56:16 +08:00
Kris
59c8774957
UX: Prevent experimental sidebar scroll jumps (#17352) 2022-07-06 10:36:44 +08:00
Joe
02286186c3
UX: Splash should always stick to top left corner of the viewport (#17348)
No visual changes.

This commit only fixes some display issues on some browsers that don't respect the defaults.
2022-07-06 06:33:09 +08:00
Kris
7711d140da
UX: staff notice should utilize full post width (#17346) 2022-07-05 15:49:47 -04:00
Peter Wagenet
371bbadb92
No implicit this codemod (#17235)
* Run no-implicit-this codemod for app templates
* Run tagless-ember-components-codemod for plugins
* Turn on no-implicit-this lint
2022-07-05 19:41:31 +02:00
Joe
fbc1bc4255
UX: Prevent overlap between splash loader and splash text on some browsers take 2 (#17341)
Same as #17340

context: https://meta.discourse.org/t/show-a-loader-starting-page-for-slow-connections/42981/23?u=johani

No visual changes, just a fix for more situations where the overlap happens.
2022-07-06 00:35:55 +08:00
Rafael dos Santos Silva
9833b59b70
FEATURE: Allow iframe allow attribute in posts (#17291)
This is used so iframes can use mic, camera, EME, etc.

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Feature-Policy#directives
lists current possible values

Feature request https://meta.discourse.org/t/iframe-attributes-not-working/127383?u=falco
2022-07-05 12:25:27 -03:00
Andrei Prigorshnev
c59f1729a6
FEATURE: auto remove user status after predefined period (#17236) 2022-07-05 19:12:22 +04:00
Joe
4acf2394e6
UX: Prevent overlap between splash loader and splash text on some browsers (#17340)
Context: https://meta.discourse.org/t/show-a-loader-starting-page-for-slow-connections/42981/23?u=johani

Not all browsers respect padding on absolute elements.

There are no visual/function changes. This PR just changes the implementation to prevent the overlap on some browsers.
2022-07-05 22:41:43 +08:00
David Taylor
2a7fb4bf3a
FIX: Correct error in ip-lookup component definition (#17339)
7caaee2 introduced a duplicate definition of the component JS. This likely happened because we had the template defined under `javascripts/discourse`, and the component JS defined under `javascript/admin`. This commit removes the duplicate definition, and moves the template to the admin addon
2022-07-05 15:13:50 +01:00
Bianca Nenciu
a6c3369614
FIX: Posts can belong to hard-deleted topics (#17329)
* FIX: Posts can belong to hard-deleted topics

This was a problem when serializing deleted posts because they might
belong to a topic that was permanently deleted. This caused to DB
lookup to fail immediately and raise an exception. In this case, the
endpoint returned a 404.

* FIX: Remove N+1 queries

Deleted topics were not loaded because of the default scope that
filters out all deleted topics. It executed a query for each deleted
topic.
2022-07-05 10:51:21 +03:00
Alan Guo Xiang Tan
526e6e7a3b
UX: Hide user menu bookmark link when experimental sidebar is enabled (#17336)
Sidebar has a link to bookmarks by default
2022-07-05 15:50:25 +08:00
Alan Guo Xiang Tan
843907d1ac
UX: Update categories/tags in sidebar only after saving. (#17333)
Adding the category/tag into sidebar before the user has saved was
giving the impression that the user's record has already been updated.
2022-07-05 13:32:12 +08:00
Alan Guo Xiang Tan
4d51f9cad6
UX: Enforce bullet category style in sidebar (#17334)
The other category styles do not fit into how we want the sidebar to
look.
2022-07-05 13:28:51 +08:00
Kris
56c0d8cf92
UX: mobile experimental sidebar improvement (#17302)
First pass at the mobile experimental sidebar improvement.

Co-authored-by: Alan Guo Xiang Tan <gxtan1990@gmail.com>
2022-07-05 11:45:02 +08:00
Chapoi
408ce1312b
UX: remove hardcoded colour value (#17323) 2022-07-05 10:47:29 +08:00
David Taylor
78e03649ab
FIX: Replace onebox markdown when pulling hotlinked image (#17328)
If an image is oneboxed directly, then we should replace the onebox URL with a markdown image tag. This ensures that the wrapper link points to the downloaded version rather than the original.

This regressed in bf6f8299
2022-07-05 10:47:10 +08:00
Chapoi
4730858598
UX: missing specificity (#17324) 2022-07-05 10:46:54 +08:00
Alan Guo Xiang Tan
ef7a518159
UX: Retain category badge style on categories select kit. (#17332)
Category badge changes based on the `category style` site setting so we
do not want to forcing all category names to the same color.

Follow-up to 3266350e80
2022-07-05 10:05:44 +08:00
dependabot[bot]
2ea202b30a
Build(deps): Bump cose from 1.2.0 to 1.2.1 (#17330)
Bumps [cose](https://github.com/cedarcode/cose-ruby) from 1.2.0 to 1.2.1.
- [Release notes](https://github.com/cedarcode/cose-ruby/releases)
- [Changelog](https://github.com/cedarcode/cose-ruby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/cedarcode/cose-ruby/compare/v1.2.0...v1.2.1)

---
updated-dependencies:
- dependency-name: cose
  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>
2022-07-05 09:47:09 +08:00
Joe
e3c71221e5
UX: Makes splash screen setting enabled by default (#17327)
We now want the splash screen to be enabled by default.
2022-07-05 02:06:28 +08:00
David Taylor
24413e5a11 DEV: Enable no-curly-component-invocation lint rule
This will ensure we invoke components consistently across our codebase
2022-07-04 17:25:42 +01:00
David Taylor
c011dd7b43 DEV: Remove last few curly-component invocations 2022-07-04 17:25:42 +01:00
Joe
cfde4419f5
DEV: Preload CSS in the <head> (#17322)
This commit adds preload links for core/plugin/theme CSS stylesheets in the head.

Preload links are non-blocking and run in parallel. This means that they should have already been downloaded by the time we use the actual stylesheets (in the <body> tag).

Google is currently complaining about this here and this PR will address that warning.

This commit will also fix an issue in the splash screen where it sometimes doesn't respect the theme colors - causing a slightly jarring experience on dark themes.

Note that I opted not to add new specs because the underlying work required already has a lot of coverage. The new methods only change the output HTML so we can chuck that in the document <head>

This change also means that we can make all the stylesheets non-render blocking, but that will follow in a separate commit.
2022-07-05 00:23:09 +08:00
Gerhard Schlager
8bdbefe0e0
FIX: Logout could fail due to cached user (#17325)
Logging out failed when the current user was cached by an instance of `Auth::DefaultCurrentUserProvider` and `#log_off_user` was called on a different instance of that class.

Co-authored-by: Sam <sam.saffron@gmail.com>
2022-07-04 17:01:19 +02:00
Jarek Radosz
a0a7b3f9c4
FIX: Correctly display /admin/emails errors (#17321)
Also removed unused codepath in `admin-badges-show`.
2022-07-04 16:03:53 +02:00
Jarek Radosz
c5f0aa2f32
DEV: Remove handlebars from the old package.json (#17319) 2022-07-04 15:05:03 +02:00
Jarek Radosz
999865401c
DEV: Remove most jQ from select-kit test helpers (#17305) 2022-07-04 11:37:11 +02:00
Jarek Radosz
aa7792cf93
DEV: Use npm bootstrap (#17315) 2022-07-04 11:36:51 +02:00