Commit Graph

45724 Commits

Author SHA1 Message Date
Alan Guo Xiang Tan 852057a25a
UX: Set width on hamburger menu drop down to prevent overflow (#17607) 2022-07-22 15:02:30 +08:00
Alan Guo Xiang Tan 972e51e808
DEV: Fix failing spec due to cf5e59928e (#17606) 2022-07-22 14:50:31 +08:00
Osama Sayegh 306dca3a48
DEV: Add a helper method to clear every possible theme cache (#17585)
Our theme system is very complex and it can take a while to figure out how to invalidate the various types of caches that are used throughout the theme system. So, having a single helper method that invalidates everything can be useful in emergency situations where there is no time to read through the code and figure out how to clear the various caches.

Internal ticket: t64732.
2022-07-22 09:46:52 +03:00
Alan Guo Xiang Tan cf5e59928e
UX: Only hide section header icons when sidebar is pinned on Desktop (#17604) 2022-07-22 14:27:46 +08:00
Alan Guo Xiang Tan 99073338de
FEATURE: Replace hamburger dropdown with Sidebar when undock (#17600)
When the experimental Sidebar is enabled, the hamburger drop down is replaced by a sidebar drop down. A user is given the ability to dock and undock the sidebar depending on their personal preference.

Do also note that the experimental sidebar is well, considered experimental at this point so I do not intend for the features here to be perfect. What I aim to do here is to ship the changes fast so that it can be used internally by the team to provide feedback. Custom links added by plugins and dark mode toggle has not been implemented as part of this commit as I aim to tackle it in another commit.

Co-authored-by: awesomerobot <kris.aubuchon@discourse.org>
2022-07-22 13:06:47 +08:00
Alan Guo Xiang Tan 71eb8d2e8e
DEV: Support models argument for custom sidebar section link API (#17602)
* DEV: Improve documentation for custom sidebar section interfaces

* DEV: Improvements to sidebar custom section plugin API tests

* DEV: Support models argument for custom sidebar section link API
2022-07-22 12:06:21 +08:00
Alan Guo Xiang Tan ad7d72cea7
DEV: Remove reference to discourse chat in core (#17601) 2022-07-22 11:15:43 +08:00
Osama Sayegh 6b8d635943
DEV: Add implementations for various notification types for the new user menu (#17589)
This commit is a subset of the changes proposed in https://github.com/discourse/discourse/pull/17379.
2022-07-22 05:07:32 +03:00
Alan Guo Xiang Tan 78427e0797
DEV: Refactor user_badge_granted DiscourseEvent logic (#17579)
Follow-up to 02ce9b8a62
2022-07-22 09:06:02 +08:00
dependabot[bot] 9630095370
Build(deps): Bump rubocop from 1.31.2 to 1.32.0 (#17599)
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.31.2 to 1.32.0.
- [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.31.2...v1.32.0)

---
updated-dependencies:
- dependency-name: rubocop
  dependency-type: indirect
  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>
2022-07-22 09:05:48 +08:00
David Taylor 98bacbd2c6
DEV: Use `RenderGlimmer` for experimental user menu (#17597)
`RenderGlimmer` means we can now drop the classic-component wrapper. The old `didInsertElement` hook is reimplemented via the `did-insert` modifier.
2022-07-21 19:38:07 +01:00
David Taylor 6c5efb61c9
DEV: Introduce `RenderGlimmer` helper for use in widgets (#17592)
This allows an arbitrary Glimmer template to be rendered inside a Widget. That template can include any kind content, including Classic Ember components and Glimmer components. This leans on Ember's official `{{#in-element}}` helper which means that all component lifecycle hooks are called correctly.

This is a modern replacement for our existing `ComponentConnector` implementation. We'll deprecate `ComponentConnector` in the near future.

Example usage:

```javascript
// (inside an existing widget)
html(){
  return [
    new RenderGlimmer(
      this,
      "div.my-wrapper-class",
      hbs`<MyComponent @arg1={{@data.arg1}} />`,
      {
        arg1: "some argument value"
      }
    ),
  ]
}
```

See `widgets/render-glimmer.js` for documentation, and `render-glimmer-test` for more example uses.
2022-07-21 18:58:52 +01:00
David Taylor 327dd0beb3
DEV: Install `ember-modifier` and `@ember/render-modifiers` (#17595)
`ember-modifier` provides APIs to write our own modifiers. `@ember/render-modifiers` provides some simple `did-insert`, `did-update` and `will-destroy` modifiers.

Upcoming `ember-modifier` deprecations have been set to 'throw' in our deprecation-workflow config to ensure we don't accidently start using deprecated behaviour.
2022-07-21 18:12:29 +01:00
Jarek Radosz cb40e4c322
DEV: Use a separate KVS namespace for tests (#17591) 2022-07-21 15:27:24 +02:00
Jarek Radosz 331874229e
DEV: Fix pretender leaking request handlers (#17584) 2022-07-21 11:28:08 +02:00
Jarek Radosz c700cf3213
DEV: Fix pretender in poll tests (#17587) 2022-07-21 10:53:21 +02:00
Jarek Radosz e509c54b4c
DEV: Randomize tests order in more cases (#17588)
Previously it would randomize the order only when running tests:

1 .through ember-exam
2. in browser, with no params

Running just core tests, or just plugins, or a single plugin, or with filter, etc. disabled randomization.

Now all those cases are covered.
2022-07-21 03:50:32 +02:00
Blake Erickson 8626c99a7d
DEV: Tidy up create group api endpoint docs (#17586)
Switch to using json schema files for describing the requests and
responses.
2022-07-20 19:18:48 -06:00
dependabot[bot] 67b48d3d46
Build(deps): Bump excon from 0.92.3 to 0.92.4 (#17582)
Bumps [excon](https://github.com/excon/excon) from 0.92.3 to 0.92.4.
- [Release notes](https://github.com/excon/excon/releases)
- [Changelog](https://github.com/excon/excon/blob/master/changelog.txt)
- [Commits](https://github.com/excon/excon/compare/v0.92.3...v0.92.4)

---
updated-dependencies:
- dependency-name: excon
  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-21 02:35:41 +02:00
Vinoth Kannan eef58f510c
FEATURE: users with no posts shouldn't able to edit username after the allowed period. (#17583)
We are no longer going to let users change their username after the allowed `username_change_period` when there are no posts created by the user.
2022-07-21 04:46:15 +05:30
Bianca Nenciu f75a99e932
FIX: Notify tag watchers when publishing topic (#17576)
When a topic was published from a shared draft and it had tags, the
users watching the tags were not notified. The problem was that the
topics are usually created in a secret category and publishing it just
moves an existent topic to the target category, without making any
changes to the tags.
2022-07-20 19:07:18 +03:00
Bianca Nenciu 7a668460e0
FIX: Make group members bulk operations consistent (#17561)
This commit improves several parts of the group members bulk operation.
It fixes the bug that did not show the menu button when the Select all
button was clicked. The other changes make the behavior more consistent
with topic list bulk operations.
2022-07-20 16:54:21 +03:00
Krzysztof Kotlarek 8dd0f8a712
FIX: pass sidebar custom link willDestroy (#17565)
Custom sidebar link willDestroy function has to be passed to SidebarLink component to call when component is removed.

Very similar to https://github.com/discourse/discourse/pull/17551
2022-07-20 13:44:13 +10:00
Kris a24bcceb19
UX: option to account for the sidebar in the breakpoint mixin (#17577)
* UX: account for sidebar in breakpoint mixin

* default to false
2022-07-20 10:56:41 +08:00
Joffrey JAFFEUX 02ce9b8a62
FIX: badge backfilling triggers :user_badge_granted DiscourseEvent (#17514) 2022-07-20 09:33:07 +08:00
dependabot[bot] 4e507cace5
Build(deps): Bump tzinfo from 2.0.4 to 2.0.5 (#17578)
Bumps [tzinfo](https://github.com/tzinfo/tzinfo) from 2.0.4 to 2.0.5.
- [Release notes](https://github.com/tzinfo/tzinfo/releases)
- [Changelog](https://github.com/tzinfo/tzinfo/blob/master/CHANGES.md)
- [Commits](https://github.com/tzinfo/tzinfo/compare/v2.0.4...v2.0.5)

---
updated-dependencies:
- dependency-name: tzinfo
  dependency-type: indirect
  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-20 09:20:22 +08:00
Jarek Radosz a4e5bd272a
DEV: Make `publishToMessageBus()` wait for settled (#17575)
So you can just `await publishToMessageBus()` instead of following it with `await settled()` every time.
2022-07-19 22:59:52 +02:00
David Taylor 2159637e4d
FIX: Ensure injections are skipped when rehydrating stale models (#17574)
This was causing an error when opening the experimental user menu for the second time in a session

Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2022-07-19 21:53:32 +01:00
Bianca Nenciu a842b71a05
FIX: Do not redeem invites if user resets password (#17486)
The invites should be redeemed during the signup process. This was a
problem because when user tried to redeem an admin invite it tried to
authenticate the user using information from the session that was not
available.
2022-07-19 22:25:01 +03:00
Discourse Translator Bot c58a8b0fe6
Update translations (#17571) 2022-07-19 20:45:57 +02:00
Andrei Prigorshnev 7f112ffd4e
FIX: When a user status update received other users statuses were getting cleared (#17520) 2022-07-19 21:18:51 +04:00
Gerhard Schlager 6e2199cd58
FIX: Correctly pluralize sidebar strings (#17572) 2022-07-19 15:36:14 +02:00
Jarek Radosz 326643d08a
FIX: `isExistingIconId()` regressed in #17553 (#17570)
I missed a single `?` character 😔
2022-07-19 15:32:26 +02:00
David Taylor a7525c6252
DEV: Remove `adminjs` and `jsapp` symlinks (#17567)
These only existed for developer convenience, but have proven to cause confusion. In the future we may move the JS app into a higher-level directory, but for now it can be found under app/assets/javascripts/discourse
2022-07-19 13:19:52 +01:00
Jarek Radosz 06135f3069
DEV: De-jQ click-track (#17539) 2022-07-19 13:45:20 +02:00
Jarek Radosz 0948a59c3f
DEV: Update all `uppy` deps (#17542) 2022-07-19 13:05:07 +02:00
Jarek Radosz 59a07e3007
FIX: Correctly invoke dynamic components by name (#17568) 2022-07-19 11:52:32 +02:00
David Taylor 897de60330 DEV: Set owner for raw views
Plugins/themes use injections in their raw view class. On recent versions of Ember these were failing with 'Attempting to lookup an injected property on an object without a container, ensure that the object was instantiated via a container.'
2022-07-19 10:00:59 +01:00
David Taylor a4c4d3cb50 DEV: Patch Ruby Ember template compiler to work with recent ember 2022-07-19 10:00:59 +01:00
David Taylor 20fd81c2dc DEV: Silence 3.x deprecations
This prevents a storm of deprecation messages in the developer console. We'll be working through and enabling these one-by-one over the coming weeks/months.

A dummy `discourse-ensure-deprecation-order` package is introduced to ensure that deprecation-workflow is loaded before `@ember/jquery`. This ensures that the `@ember/jquery`-triggered deprecation warnings can be silenced correctly

This also introduces a system for silencing CLI warnings.
2022-07-19 10:00:59 +01:00
Peter Wagenet 0ac90abcfa DEV: Remove rfc176-shims
Ember has now migrated to the new module layout, so these shims are no longer required
2022-07-19 10:00:59 +01:00
David Taylor 13bc2f1f39 DEV: Upgrade to Ember 3.28 2022-07-19 10:00:59 +01:00
Alan Guo Xiang Tan 086fb6d6cf
DEV: Refactor sidebar components to prepare for integration into hamburger dropdown (#17566) 2022-07-19 14:37:07 +08:00
Martin Brennan a1a960caba
DEV: Add empty array to ignored_users for currentUser fixture (#17564) 2022-07-19 15:27:07 +10:00
Osama Sayegh fac04f3e73
DEV: Introduce a basic version of the new notifications menu behind a feature flag (#17492) 2022-07-19 10:35:02 +08:00
Jarek Radosz 9028df0fda
DEV: Use `includes()` instead of `indexOf() >= 0` (#17553)
Missed those cases in #17541
2022-07-19 10:27:40 +08:00
Jarek Radosz 0db6ae1e1f
DEV: Fix typos and other spell-checker warnings (#17554) 2022-07-19 10:27:10 +08:00
Kris d8714facb6
FIX: can't hide overflow of d-editor-button-bar on mobile (#17563) 2022-07-18 20:43:05 -04:00
Sérgio Saquetim a0d501b0b1
DEV: Add discourse-templates in the official plugins list (#17560) 2022-07-18 16:46:49 -03:00
Andrei Prigorshnev 48e2caf7b7
DEV: emoji helper: add the ability to set custom title (#17517) 2022-07-18 21:51:19 +04:00