Commit Graph

45810 Commits

Author SHA1 Message Date
23a267c75d DEV: Fix fabricator deprecations (#17658) 2022-07-26 01:47:09 +02:00
59686c1cb8 DEV: Fix a flaky FinalDestination spec (#17655) 2022-07-26 01:28:53 +02:00
a70b3dcc44 Build(deps-dev): Bump fabrication from 2.29.0 to 2.30.0 (#17657)
Bumps [fabrication](https://gitlab.com/fabrication-gem/fabrication) from 2.29.0 to 2.30.0.
- [Release notes](https://gitlab.com/fabrication-gem/fabrication/tags)
- [Changelog](https://gitlab.com/fabrication-gem/fabrication/blob/master/Changelog.markdown)
- [Commits](https://gitlab.com/fabrication-gem/fabrication/compare/2.29.0...2.30.0)

---
updated-dependencies:
- dependency-name: fabrication
  dependency-type: direct:development
  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-26 00:43:07 +02:00
2c2a155ba7 Build(deps): Bump msgpack from 1.5.3 to 1.5.4 (#17656)
Bumps [msgpack](https://github.com/msgpack/msgpack-ruby) from 1.5.3 to 1.5.4.
- [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.3...v1.5.4)

---
updated-dependencies:
- dependency-name: msgpack
  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-26 00:42:44 +02:00
603f36ca4a DEV: Support phpBB 3.3 imports (#17641)
* handle polls with duplicate items
* handle polls with incorrect poll_option_total values
* handle group IDs in personal messages
* support for version 3.3
2022-07-25 22:07:03 +02:00
Joe
994ca8f6de FIX: Linear gradient with stops makes R2 confused (#17650)
Context: https://meta.discourse.org/t/the-theme-is-broken-in-right-to-left-languages-even-in-meta/233908

We use the R2 gem to do the magic RTL CSS conversion. There are cases where we feed it too much, and it gets confused. The issue here is that we use a linear gradient with CSS variables, an RGBA function, and we set the stops.

This makes R2 choke and causes it to return jumbled CSS, which means that any CSS that comes after that rule is junk and doesn't apply.

This PR removes the stops from the gradient. This shouldn't cause any visual changes since these are the default stops.

More explanation of the issue here: https://meta.discourse.org/t/user-card-will-not-open-on-the-mobile/171268/6?u=johani
2022-07-26 03:03:02 +08:00
4cb428ef83 UX: make sidebar hamburger menu occupy full width (#17649) 2022-07-25 14:18:57 -04:00
235878033e UX: only transition header on sidebar toggle (#17646) 2022-07-25 13:27:56 -04:00
6df36247c1 DEV: Populate first and last seen at timestamps. (#17643)
discourse-chat's auto-join users rely on these values, so it's handy for the populate task to set them.
2022-07-25 11:54:43 -03:00
424a274c12 FEATURE: add categories page style to order topics by created date (#17500) 2022-07-25 09:41:43 -04:00
7ab5dcf82f FEATURE: my_bb import supports avatars (#17617) 2022-07-25 15:22:25 +02:00
9103081eb7 DEV: Add likes, mentions and replies tabs to the new user menu (#17623)
This commit is a subset of the changes proposed in https://github.com/discourse/discourse/pull/17379.
2022-07-25 15:19:53 +03:00
db9245d188 DEV: Fix FinalDestination specs (#17642) 2022-07-25 11:38:54 +01:00
Joe
3c558d2eb6 UX: Prevent color flicker on dark themes (#17620)
Follow up to: #17619
Context: https://meta.discourse.org/t/introducing-discourse-splash-a-visual-preloader-displayed-while-site-assets-load/232003/17

We previously relied on the user's browser when deciding when to show the splash in light/dark mode. This worked well but can fail if the user manually selects a theme with a default "dark" scheme.

This PR will now factor that in. If the user selects a theme with a default dark scheme, use that. If a user selects a theme with a "light" default scheme and also picks a secondary "dark" scheme, use the media detection we had before.

This PR also removes the dark mode theme-color that was added in the previous PR. That will now go in a separate PR
2022-07-25 18:02:21 +08:00
43b8cfeae3 FIX: improves handling of filter with invalid tag chars (#17640)
Tags mixin is already filtering a lot of data from the user submitted filter in `createContentFromInput()` which can lead to sk receiving an empty filter while the input actually has a value.
2022-07-25 12:00:52 +02:00
1f5682b7d7 FIX: Don’t raise an error on onebox timeouts
Currently when generating oneboxes if the connection timeouts and we’re
using the `FinalDestination#get` method, then it raises an exception.

We already catch this exception when using the
`FinalDestination#resolve` method so this patch just applies the same
logic to `FinalDestination#get`.
2022-07-25 10:41:46 +02:00
1dff3ad79d FIX: Title for keyboard shortcuts button in sidebar (#17638) 2022-07-25 15:47:39 +08:00
07424b9bb6 UX: Docking/undocking sidebar toggles sidebar hamburger dropdown (#17636)
Before this change, undocking the sidebar would just hide the sidebar
from the screen which led people to complain that they "lost" their
sidebar and had to "find" it. With this change, we automatically display
the sidebar hamburger dropdown when you undock the sidebar. Like wise
when the sidebar is docked, the sidebar hamburger dropdown is
automatically collapsed.
2022-07-25 14:45:16 +08:00
228c14479b DEV: expose decorateUsername function (#17637)
Expose `decorateUsername` function to make it usable in controllers or plugin initializers.
2022-07-25 14:43:54 +08:00
3c60b97bd5 Build(deps): Bump tilt from 2.0.10 to 2.0.11 (#17632)
Bumps [tilt](https://github.com/rtomayko/tilt) from 2.0.10 to 2.0.11.
- [Release notes](https://github.com/rtomayko/tilt/releases)
- [Changelog](https://github.com/rtomayko/tilt/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rtomayko/tilt/compare/v2.0.10...v2.0.11)

---
updated-dependencies:
- dependency-name: tilt
  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-25 09:19:33 +08:00
cced076cfa Build(deps): Bump nokogiri from 1.13.7 to 1.13.8 (#17633)
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.13.7 to 1.13.8.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.13.7...v1.13.8)

---
updated-dependencies:
- dependency-name: nokogiri
  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-25 09:18:15 +08:00
02a96a53fb DEV: Be specific about time units (#17629)
All other tests that are setting grade_period use either unitless `0`, `1.minute` or `5.minutes` so it wasn't clear if `5` was meant to be seconds (it was)
2022-07-25 02:32:15 +02:00
10fa1cafb1 DEV: Remove yet another jQ use in tests (#17628) 2022-07-25 02:32:04 +02:00
b179fb98b1 DEV: Consistently use response helper (#17627) 2022-07-25 02:31:52 +02:00
20462cf2b5 Build(deps): Bump rack-protection from 2.2.1 to 2.2.2 (#17631) 2022-07-25 00:31:26 +02:00
6401a8d8b3 Build(deps): Bump strscan from 3.0.3 to 3.0.4 (#17634) 2022-07-25 00:29:36 +02:00
6cae26c499 DEV: Always await for publishToMessageBus (#17626)
(+ typos)
2022-07-24 19:55:58 +02:00
ff16ba1fc0 DEV: Update @embroider/test-setup (#17625) 2022-07-24 17:29:21 +02:00
Joe
3d9464b7da UX: Set theme color on splash a bit earlier (#17619)
Context: https://meta.discourse.org/t/introducing-discourse-splash-a-visual-preloader-displayed-while-site-assets-load/232003/17

We currently set the theme secondary color as the background for the splash, and this works and respects light/dark modes.

The issue is that we set it on the #d-splash div. That div doesn't have a specified height and only gets its height when the splash image loads.

This can cause a flicker effect where the <HTML> background shows for a fraction of a second while the splash image loads.

This PR sets the theme color on the <HTML> tag to alleviate this. This allows us to set the theme color a little bit sooner and should hopefully prevent the flicker effect from happening.

This PR also adds the theme-color <meta> tag for dark mode. Browsers that don't support multiple theme-color tags will ignore the second tag and fall back to the first one.
2022-07-23 17:53:42 +08:00
edb931e7e5 UX: let hamburger-sidebar restrict child width (#17614) 2022-07-22 10:26:13 -04:00
Joe
a6680fce03 UX: Updates sign up CTA copy (#17612)
Before:

<img width="500" src="https://user-images.githubusercontent.com/33972521/180416547-300203d3-b092-4cb6-b65e-720b6a004b47.png">

After

<img width="500" src="https://user-images.githubusercontent.com/33972521/180415992-9f610bf8-ca67-4c69-a9dc-1409c4cb7f3f.png">

Internal topic
/t/-/70417
2022-07-22 18:35:46 +08:00
Joe
9424cfd9b8 UX: Prevent jitter in some onebox images (#17611)
Internal topic

/t/-/70486/9
2022-07-22 17:14:28 +08:00
49d4f7c066 FEATURE: Add users and groups links to community section in sidebar (#17609) 2022-07-22 16:00:06 +08:00
b4b339b059 UX: Properly size emoji in sidebar section link text (#17610) 2022-07-22 15:58:21 +08:00
a626b99a50 UX: Remove bookmarks link from community section (#17608)
Product decision to drop it from Sidebar at this moment.
2022-07-22 15:55:13 +08:00
4594ce2723 UX: Rename Sidebar 'Topics' section to 'Community' (#17605)
Product decision to rename as not all links under the section falls
under the topics umbrella
2022-07-22 15:20:01 +08:00
852057a25a UX: Set width on hamburger menu drop down to prevent overflow (#17607) 2022-07-22 15:02:30 +08:00
972e51e808 DEV: Fix failing spec due to cf5e59928eb76d5672205bb60c51cb62b32636e7 (#17606) 2022-07-22 14:50:31 +08:00
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
cf5e59928e UX: Only hide section header icons when sidebar is pinned on Desktop (#17604) 2022-07-22 14:27:46 +08:00
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
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
ad7d72cea7 DEV: Remove reference to discourse chat in core (#17601) 2022-07-22 11:15:43 +08:00
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
78427e0797 DEV: Refactor user_badge_granted DiscourseEvent logic (#17579)
Follow-up to 02ce9b8a621ef917044e138ac4289ea3e228cc1e
2022-07-22 09:06:02 +08:00
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
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
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
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
cb40e4c322 DEV: Use a separate KVS namespace for tests (#17591) 2022-07-21 15:27:24 +02:00