Commit Graph

46214 Commits

Author SHA1 Message Date
Andrei Prigorshnev 14ab819c1d
FIX: remove unexpected scrollbar from the new user menu (#18089) 2022-08-25 15:18:26 -04:00
Andrei Prigorshnev 7be6f341a7
FEATURE: add the set user status button to the new user menu (#18079) 2022-08-25 18:14:42 +04:00
Osama Sayegh 40fd82e2d1
DEV: Add model transformer plugin API (#18081)
This API allows plugins to transform a list of model objects before they're rendered in the UI. At the moment, this API is limited to items/lists of the experimental user menu, but it may be extended in the future to other parts of the app.

Additional context can be found in https://github.com/discourse/discourse/pull/18046.
2022-08-25 15:41:58 +03:00
David Taylor 9ebebfb4cc
FIX: Load admin-specific JS when compiling via ember-cli (#18086)
The previous sprockets implementation was including admin-specific JS in the plugin's main JS file, which would be served to all users regardless of admin status. This commit achieves the same result under the ember-cli plugin asset compiler with one difference: the admin js is compiled into a separate file. That means that in future, we'll be able to make it loaded only for admins. For now though, it's loaded for everyone, just like before.
2022-08-25 11:36:02 +01:00
David Taylor e141208605
DEV: Compile plugin tests using ember-cli (#18074)
For now, `EMBER_CLI_PLUGIN_ASSETS` can be set to 0 to restore the old behavior. This option will be removed very soon.
2022-08-25 09:43:13 +01:00
Alan Guo Xiang Tan e9dac86cc0
FIX: Sidebar hamburger panel dropdown not working for anonymous (#18085)
We were incorrectly trying to render the sidebar sections for a logged
in user.
2022-08-25 16:29:06 +08:00
Alan Guo Xiang Tan 0b5a0fd857 DEV: Upgrade Redis to 4.8 2022-08-25 11:11:08 +08:00
Alan Guo Xiang Tan 7f198bd975 DEV: Add dedicated translations for links in sidebar
We do not want to depend on existing translations which are used
elsewhere and can break the sidebar experience when changed.
2022-08-25 09:34:36 +08:00
Alan Guo Xiang Tan eb12daa7f8 DEV: Add sidebar community section for anonymous user 2022-08-25 09:34:36 +08:00
Kris e9e6ab688c
improve sidebar header sub-hovers (#18083) 2022-08-25 09:14:55 +08:00
Kris c5df47d5eb
minor sidebar scrollbar adjustments (#18080) 2022-08-24 15:46:01 -04:00
Kris 14770ed208
remove margin from sidebar sections (#18082) 2022-08-24 15:45:46 -04:00
Kris ba4a4d3297
UX: more apparent focus styles for sidebar headers (#18078) 2022-08-24 14:13:26 -04:00
Kris 03a599f457
UX: revert sidebar scrollbar repositioning (#18076) 2022-08-24 13:26:25 -04:00
David Taylor e7a84948b9
FIX: Avoid duplicate topic-list requests (#18073)
When preloading topic_list data we were giving it a 'preload key' which was loosely based on the parameters of the list. However, it did not include all parameters, and mismatches between client/server-side logic would cause the preloaded data to be ignored.

This commit simplifies things by using a single key for all topic_list preloading. This works on the assumption that "The first topic_list the JS app will load is the one which was preloaded". That assumption also existed to some extent in the old design, so we don't expect any regressions here.
2022-08-24 11:54:01 +01:00
David Taylor 52f9370bd6
DEV: Remove JQuery from `lib/keyboard-shortcuts.js` (#18056) 2022-08-24 10:22:51 +01:00
David Taylor b175513765
DEV: Enable ember-cli plugin assets by default (#18058)
For now, `EMBER_CLI_PLUGIN_ASSETS` can be set to 0 to restore the old behavior. This option will be removed very soon.
2022-08-24 10:20:38 +01:00
Gerhard Schlager 9685852a1f
DEV: Add salesforce plugin to official list of plugins (#18072) 2022-08-24 10:42:43 +02:00
Martin Brennan b197ca02b7
DEV: Do not MiniProfile theme-javascripts (#18067)
This creates a huge amount of noise depending on
the themes/theme components installed and doesn't
provide much value.
2022-08-24 16:01:42 +10:00
Martin Brennan 4b84236bc1
PERF: Rely on preload for first_post for TopicBookmarkable (#18066)
In 49a70a37f1 I removed the
topic: :posts preload for TopicBookmarkable, but did not
update the UserTopicBookmarkSerializer to reflect this,
which was causing up to multi-hundred millisecond queries to
be made for each topic bookmark based on the size of the
topic.
2022-08-24 16:01:29 +10:00
Krzysztof Kotlarek 7a58bd8827
FIX: hide sidebar toggle button when no sidebar (#18068)
When sidebar is not available (for example for anonymous user for sites which requires log in), toggle button should be hidden as well.
2022-08-24 12:09:40 +08:00
Stephen White 6771673a1b
Fix constraints typo in routes config (#17994) 2022-08-24 10:27:05 +08:00
Kris 3068df4cea
UX: sidebar styling, spacing consistency, etc (#18059) 2022-08-24 09:33:15 +08:00
Krzysztof Kotlarek 6fb3610f4e
FIX: hide sidebar for anonymous when login required (#18065)
Recently anonymous sidebar was introduced, but it should be hidden when site requires users to authenticate.
2022-08-24 10:04:10 +10:00
Gerhard Schlager 9ff13cee14
FIX: Backup/Restore didn't use correct Redis namespace in multisite (#18060)
In a multisite Discourse reported that no backup is running after 60 seconds because the Redis key expired. Also, the thread that listens for a shutdown signal stopped running immediately because it didn't detect a running operation.
2022-08-24 01:43:42 +02:00
dependabot[bot] 935609172a
Build(deps): Bump msgpack from 1.5.5 to 1.5.6 (#18061)
Bumps [msgpack](https://github.com/msgpack/msgpack-ruby) from 1.5.5 to 1.5.6.
- [Release notes](https://github.com/msgpack/msgpack-ruby/releases)
- [Changelog](https://github.com/msgpack/msgpack-ruby/blob/master/ChangeLog)
- [Commits](https://github.com/msgpack/msgpack-ruby/compare/v1.5.5...v1.5.6)

---
updated-dependencies:
- dependency-name: msgpack
  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-08-24 00:45:28 +02:00
dependabot[bot] 84269c6ec8
Build(deps): Bump puma from 5.6.4 to 5.6.5 (#18062)
Bumps [puma](https://github.com/puma/puma) from 5.6.4 to 5.6.5.
- [Release notes](https://github.com/puma/puma/releases)
- [Changelog](https://github.com/puma/puma/blob/master/History.md)
- [Commits](https://github.com/puma/puma/compare/v5.6.4...v5.6.5)

---
updated-dependencies:
- dependency-name: puma
  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-08-24 00:45:05 +02:00
Kris c89dc682c9
UX: hide background image in crawler view (#18054) 2022-08-23 18:10:21 -04:00
Jarek Radosz 87f5715878
DEV: Keep global state reset in a single place (#18049) 2022-08-23 21:09:37 +02:00
David Taylor 851bd78347
DEV: Enable jquery-integration runtime deprecation (#18057)
Omitting the flag from optional-features enables the runtime deprecation notice.

Also introduces `ember-jquery-legacy` which can be used to migrate to the new behaviour early. Details at https://deprecations.emberjs.com/v3.x/#toc_jquery-event

Core does not appear to make use of `originalEvent` in Ember event handlers. When searching for `originalEvent` there are some matches which relate to our pan-events mixin, but this is our own implementation and not affected by this deprecation.
2022-08-23 19:28:22 +01:00
David Taylor 1b180a3bdb
DEV: Remove JQuery from `components/topic-list.js` (#18048) 2022-08-23 19:27:54 +01:00
Jarek Radosz e21d2ac217
DEV: De-jQ sidebar tests (#18050)
And fix a typo
2022-08-23 18:30:07 +02:00
Jarek Radosz fd2d9a4ba3
Revert "UX: Hide chat image overflow (#18000)" (#18052)
This reverts commit e3108ded11.

Wrong selector, wrong repo 😆 Resubmitted as https://github.com/discourse/discourse-chat/pull/1196
2022-08-23 18:29:52 +02:00
Kris 0cb6b8b263
DEV: prevent class clash with user-field names (#18055) 2022-08-23 11:46:51 -04:00
Discourse Translator Bot d7ce2d40dd
Update translations (#18053) 2022-08-23 17:24:36 +02:00
jbrw ea5d303a07
DEV: Increase timeout when pulling hotlinked image (#18036)
We observed that some sites seemingly put us in a tarpit when we attempt to pull hotlinked images. Increasing the timeout will help in these situations.
2022-08-23 09:38:10 -04:00
David Taylor 3b1a46ff37
DEV: Skip loading plugin JS when running only core tests (#18047)
Plugins often change core behavior, and thereby cause core's tests to fail. In CI, we work around this problem by running core CI without any plugins loaded.

In development, the only option to safely run the core tests is to uninstall all plugins, which is clearly a bad developer experience. This commit aims to improve that experience.

The `qunit_skip_plugins=1` flag would previously prevent the plugin **tests** from running. This commit extends that flag to also affect the plugin's application JS.
2022-08-23 10:25:07 +01:00
Krzysztof Kotlarek 2d58996a3b
FEATURE: anonymous sidebar categories and tags (#18038)
Default sidebar tags for not authenticated users can be defined in admin panel. Otherwise, top 5 categories and tags are taken.

Optionally, if categories are set up in permanent order, then the first 5 categories are taken.
2022-08-23 16:20:46 +08:00
Alan Guo Xiang Tan 1d1a7db182
DEV: Fix flaky spec due to ordering of Array intersection (#18045)
```
  1) CurrentUserSerializer#sidebar_category_ids includes visible default sidebar categories
     Failure/Error: expect(json[:sidebar_category_ids]).to eq([category.id, category_2.id])

       expected: [378, 379]
            got: [379, 378]
```

Note that in the Ruby doc it says "The order is preserved from the original array". In this case, we want to preserve the order of the site setting.
2022-08-23 16:20:10 +08:00
Alan Guo Xiang Tan e3501a207f
UX: Add badges section link to community section. (#18044)
We have a link to /badges in the old hamburger dropdown so maintaining
parity here.
2022-08-23 15:42:48 +08:00
Alan Guo Xiang Tan d390805e40
UX: Remove sidebar section header background highlight on focus (#18043) 2022-08-23 15:42:25 +08:00
Alan Guo Xiang Tan 2bcad12848
DEV: Reorganize user and anonymous sidebar files into respective folders (#18039)
This commit does not change any functionality
2022-08-23 13:17:59 +08:00
Sam 60685e6984
DEV: improve comment (#18041)
improves comment about caught exception to match implementation
2022-08-23 15:14:24 +10:00
Sam df04462475
FIX: ignore malformed HTML for title extraction (#18040)
Certain HTML can be rejected by nokogumbo, specifically cases where there
are enormous amounts of attributes

This ensures that malformed HTML is simply skipped instead of leaking out
an exception and terminating downstream processes.
2022-08-23 15:03:57 +10:00
Arpit Jalan 5d44c31bfa
UX: do not show site header on wizard pages (#18037) 2022-08-23 10:17:37 +05:30
Jarek Radosz 4ca6717994 DEV: Use `.ember-application` instead of `#main`
`#main` in the test environment is replaced with `#ember-testing`, so this code would break. It never did only because we don't test these code paths 👀
2022-08-23 09:24:00 +08:00
Jarek Radosz 349f6e18f3 DEV: Correctly clear global exported variables 2022-08-23 09:21:28 +08:00
dependabot[bot] 258e9b22dd Build(deps): Bump msgpack from 1.5.4 to 1.5.5
Bumps [msgpack](https://github.com/msgpack/msgpack-ruby) from 1.5.4 to 1.5.5.
- [Release notes](https://github.com/msgpack/msgpack-ruby/releases)
- [Changelog](https://github.com/msgpack/msgpack-ruby/blob/master/ChangeLog)
- [Commits](https://github.com/msgpack/msgpack-ruby/compare/v1.5.4...v1.5.5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-23 09:17:16 +08:00
dependabot[bot] da0e1eebda Build(deps): Bump stackprof from 0.2.20 to 0.2.21
Bumps [stackprof](https://github.com/tmm1/stackprof) from 0.2.20 to 0.2.21.
- [Release notes](https://github.com/tmm1/stackprof/releases)
- [Changelog](https://github.com/tmm1/stackprof/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tmm1/stackprof/compare/v0.2.20...v0.2.21)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-23 09:17:02 +08:00
dependabot[bot] 91b1355b47 Build(deps): Bump rubocop from 1.35.0 to 1.35.1
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.35.0 to 1.35.1.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop/compare/v1.35.0...v1.35.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-23 09:16:36 +08:00