Commit Graph

45771 Commits

Author SHA1 Message Date
90c969c90f DEV: remove automatic_membership_retroactive column from group model. (#17212)
The column is already dropped from the database table.
2022-07-26 21:26:22 +05:30
5f13ca5e54 FIX: Don't cook user fields to apply watched words (#17590)
The previous method for reused the PrettyText logic which applied the
watched word logic, but had the unwanted effect of cooking the text too.
This meant that regular text values were converted to HTML.

Follow up to commit 5a4c35f62714d2d72bc0ee57a10e08116bdc476a.
2022-07-26 18:15:42 +03:00
171789f47a FIX: Make sure user list is complete and sorted (#17616)
Sometimes the user list was incomplete when multiple requests were
created to fetch next pages. If the responses did not arrive in the
same order as the requests then only the last response was parsed.

This is a follow up commit to a0f4c7fe888af75424d5beaf4d17630e4d49f0fa.
2022-07-26 17:54:52 +03:00
47917c0be4 FIX: make sure every user instance has correct status tracking counter 2022-07-26 18:42:55 +04:00
fccbe5c604 UX: Replace site-settings link with "Admin" link in sidebar (#17665)
The main landing page for admins/mods should be the admin Dashboard, not the site settings. Having a "Settings" link can be confused with user settings.

This commit also displays the button for moderators, who are also allowed access to parts of the admin dashboard)
2022-07-26 14:46:33 +01:00
5a0480efd7 DEV: Trigger an event when a user is granted admin or moderation. (#17663) 2022-07-26 10:20:34 -03:00
517e2f7dc4 FIX: handle correctly the case when several subscribers call trackStatus() on the user model (#17497) 2022-07-26 15:28:26 +04:00
17e733b6a8 DEV: Add optional timezone support to date-time-input-range (#17654)
This allows consumers to pass in, and receive, timestamps for a different timezone. Previously, attempting this would lead to very strange behavior which would become worse the further the input timestamp's timezone was from the browser's timezone.

The default behavior is unchanged - the browser's timezone will be assumed.
2022-07-26 11:14:22 +01:00
91b6b5eee7 DEV: Don’t use change { … }.by(0) in specs 2022-07-26 10:34:15 +02:00
3bfc254c4e FIX: correct mention paths in fixtures (#17660)
Our mention path are `/u/:username` and not `/users/:username`. Test fixtures should have those values correct as well.
2022-07-26 10:09:05 +08:00
0d3cf3333a DEV: Add secondary sort to Group.visible_groups (#17659)
Fix a flaky group controller spec and makes the API responses more stable.
2022-07-26 02:13:38 +02:00
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