Commit Graph

28594 Commits

Author SHA1 Message Date
Alan Guo Xiang Tan 070eac16a8
PERF: Optimize the performance of `TopicLink.topic_map` query (#19630)
Instead of relying on the `ILIKE` operator to filter out image links, we
can instead rely on the `TopicLink#extension` column which allows us to
more efficiently filter out image links.

This optimization mainly affects topics that are link heavy which is
common in topics with alot of replies. When profiling a production
instance for a topic with 10K replies and 2.5K `topic_links`, this
optimization reduces the query time from ~18ms to around ~4ms.
2022-12-28 08:10:36 +08:00
Rafael dos Santos Silva 7b53973bd8
DEV: Use WebPush fork for OpenSSL 3 compat (#19627)
* DEV: Use WebPush fork for OpenSSL 3 compat

* add some context on gemfile changes
2022-12-27 15:28:13 -03:00
Vinoth Kannan 598233456d
FEATURE: Warn admins about private group name's exposure to anonymous users. (#19557)
Group names will be used as CSS classes in some components while rendering the public HTML output. It will happen when a group is set as the default primary for users. Or when a group has either a flair icon or flair upload. So we should warn the admins when they restrict the group's visibility level.

Co-authored-by: Penar Musaraj <pmusaraj@gmail.com>
2022-12-27 13:17:13 +05:30
Jan Cernik d633467c60
FIX: Whisper tooltip shows the allowed groups (#19509) 2022-12-23 15:42:46 -03:00
Jarek Radosz 953b823c5a
DEV: Deprecate `controllerFor` test helper (#19606)
After all the test changes it was only used in a single place in core 🤷

(also updated the recommendation in `assert.not` deprecation message)
2022-12-23 11:33:42 +01:00
Gerhard Schlager 5926386d4f
FIX: Workaround a bug in the R2 gem (#19602) 2022-12-23 12:07:07 +08:00
Alan Guo Xiang Tan 1d926e88a9
FIX: Admin can't see user sidebar preferences of other users (#19570) 2022-12-23 11:45:29 +08:00
Martin Brennan 86cafc7237
FIX: Autocomplete fadeout arrow key chat fix (#19600)
Autocomplete with fadeout was not scrolling on arrow
key press in chat, since the input is treated slightly
differently. We just need to find the fadeout div sooner.

Follow up to 64a7a2aac2
2022-12-23 10:31:30 +10:00
Martin Brennan 641a1a6b44
FIX: Allow for nested chat transcripts (#19572)
The way our markdown raw_html hoisting worked, we only
supported one level of hoisting the HTML content. However
when nesting [chat] transcript BBCode we need to allow
for multiple levels of it. This commit changes opts.discourse.hoisted
to be more constant, and the GUID keys that have the hoisted
content are only deleted by unhoistForCooked rather than
the cook function itself, which prematurely deletes them
when they are needed further down the line.
2022-12-23 09:56:30 +10:00
Alan Guo Xiang Tan a7f30cfcf7
PERF: Fix N+1 queries on /categories route (#19585)
Featured topics are eventually serialized by `ListableTopicSerializer`
which calls `Topic#image_url` which requires us to preload
`Topic#topic_thumbnails`.
2022-12-23 04:29:49 +08:00
chapoi b756866334
UX: switch webkit to pseudoelement for fadeout (#19587) 2022-12-22 21:23:58 +01:00
Ella E 3c0a4b37d0
UX: Setup wizard copy changes and vertically stack logo fields (#19583)
* copy changes to setup wizard step title
* make logo upload stacking; tweaks on medium size screen view
2022-12-22 10:15:09 -07:00
David Taylor b1b53da71d
DEV: Improve performance of system test `sign_in` helper (#19579)
Previously, calling `sign_in` would cause the browser to be redirected to `/`, and would cause the Ember app to boot. We would then call `visit()`, causing the app to boot for a second time.

This commit adds a `redirect=false` option to the `/session/username/become` route. This avoids the unnecessary boot of the app, and leads to significantly faster system spec run times.

In local testing, this takes the full system-spec suite for chat from ~6min to ~4min.
2022-12-22 16:03:27 +00:00
Jarek Radosz 263cd02a27
DEV: Get rid of all discourseModule uses (#19576)
QUnit's `module` and `setupTest` is the way
2022-12-22 13:13:28 +01:00
Andrei Prigorshnev c0b21bf9cf
FIX: styles of user status on mentions (#19563)
Reported in https://meta.discourse.org/t/users-mentions-wrongly-show-their-status-with-the-emoji/249534.

The problem was that we had styles for user status on mentions in the calendar plugin. So it looked fine on sites with Discourse Calendar but not on sites without it.
2022-12-22 14:15:52 +04:00
dependabot[bot] c933dbfc2c
Build(deps): Bump @ember/test-helpers in /app/assets/javascripts (#19566)
Bumps [@ember/test-helpers](https://github.com/emberjs/ember-test-helpers) from 2.9.1 to 2.9.3.
- [Release notes](https://github.com/emberjs/ember-test-helpers/releases)
- [Changelog](https://github.com/emberjs/ember-test-helpers/blob/v2.9.3/CHANGELOG.md)
- [Commits](https://github.com/emberjs/ember-test-helpers/compare/v2.9.1...v2.9.3)

---
updated-dependencies:
- dependency-name: "@ember/test-helpers"
  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-12-22 10:38:01 +01:00
Martin Brennan 64a7a2aac2
FIX: Autocomplete arrow scroll for mention (#19571)
Follow up to 8820e9418a,
only the hashtag autocomplete has a fadeout scroll, so
we still need to scroll on the original div in some
cases (e.g. mentions)
2022-12-22 17:01:51 +10:00
Alan Guo Xiang Tan 954b39f5ec
FIX: Sidebar preferences link shown when navigation menu is legacy (#19568) 2022-12-22 07:58:06 +08:00
Penar Musaraj e90c2cabfc
UX: Temporarily revert autocomplete highlight change (#19554)
This affects custom themes too much, reverting for now while we work
on a more robust solution.
2022-12-21 10:11:53 -05:00
Andrei Prigorshnev 2031b75055
FIX: Quoting a mention with status emoji breaks the mention (#19530) 2022-12-21 18:21:53 +04:00
Bianca Nenciu 8f9933d1dd
DEV: Add default results option to user-chooser (#19521)
defaultSearchResults search option can be used to show a list of results
by default, before any search ran, when the filter is empty.
2022-12-21 14:47:47 +02:00
Joffrey JAFFEUX d2e24f9569
DEV: start glimmer-ification and optimisations of chat plugin (#19531)
Note this is a very large PR, and some of it could have been splited, but keeping it one chunk made it to merge conflicts and to revert if necessary. Actual new code logic is also not that much, as most of the changes are removing js tests, adding system specs or moving things around.

To make it possible this commit is doing the following changes:

- converting (and adding new) existing js acceptances tests into system tests. This change was necessary to ensure as little regressions as possible while changing paradigm
- moving away from store. Using glimmer and tracked properties requires to have class objects everywhere and as a result works well with models. However store/adapters are suffering from many bugs and limitations. As a workaround the `chat-api` and `chat-channels-manager` are an answer to this problem by encapsulating backend calls and frontend storage logic; while still using js models.
- dropping `appEvents` as much as possible. Using tracked properties and a better local storage of channel models, allows to be much more reactive and doesn’t require arbitrary manual updates everywhere in the app.
- while working on replacing store, the existing work of a chat api (backend) has been continued to support more cases.
- removing code from the `chat` service to separate concerns, `chat-subscriptions-manager` and `chat-channels-manager`, being the largest examples of where the code has been rewritten/moved.

Future wok:
- improve behavior when closing/deleting a channel, it's already slightly buggy on live, it's rare enough that it's not a big issue, but should be improved
- improve page objects used in chat
- move more endpoints to the API
- finish temporarily skipped tests
- extract more code from the `chat` service
- use glimmer for `chat-messages`
- separate concerns in `chat-live-pane`
- eventually add js tests for `chat-api`, `chat-channels-manager` and `chat-subscriptions-manager`, they are indirectly heavy tested through system tests but it would be nice to at least test the public API

<!-- NOTE: All pull requests should have tests (rspec in Ruby, qunit in JavaScript). If your code does not include test coverage, please include an explanation of why it was omitted. -->
2022-12-21 13:21:02 +01:00
Martin Brennan 8820e9418a
FIX: Hashtag autocomplete scrolling arrow keys with fadeout (#19541)
Follow-up to 8db1f1892d,
this makes the hashtag autocomplete scrolling with arrow
keys work with the new fadeout element that is now used
for the scroll container.
2022-12-21 15:15:02 +10:00
Martin Brennan e15b382666
FIX: Include tags inside tag groups for hashtag search (#19539)
We were using the `for_input: true` param when calling
DiscourseTagging, which is really meant for selecting tags
in the UI, which often need a parent tag selected first
before the child tags in tag group will show. We just
want to show all tags regardless of grouping in hashtag
search.`
2022-12-21 15:14:50 +10:00
Ella E 5443860130
FIX: responsive buttons and wider content container (#19542) 2022-12-20 19:13:00 -07:00
chapoi 70eda1d84b
UX: update classname to something non-conflicting (#19529) 2022-12-20 12:14:58 +01:00
Martin Brennan 1b49a90e5b
FIX: Do not return muted child categories termless hashtag search (#19526)
We generally do not return muted child categories to the user
if they have muted the parent category, this commit respects that
rule for CategoryHashtagDataSource
2022-12-20 13:45:03 +10:00
Blake Erickson ae2153b330
UX: Wizard Step Enhancements (#19487)
* UX: Wizard Step Enhancements

- Remove illustrations
- Add Emoji graphic to top of steps
- Add description below step title
- Move point of contact to last step

* Move step count to header, plus some button navigation tweaks

* add remaining emoji to step headers

* fix button logic on steps

* Update Point of Contact

* remove automated messages field

* adjust styling for counter, title, and emoji

* Update wording for logos

* Fix tests

* fix prettier

* fix specs

* set same with for steps except for styling screen

* use sentence case; remove duplicate copy under your organization fields

* fix missing buttons on small screens

* add spacing to buttons; adjust font weight to labels

* adjust styling for community logo step; use sentence case for button

* update copy for point of contact text helper

* use sentence case for field labels

* fix ui tests

* use btn-back class to fix ui tests

* reduce bottom margin for toggle fields

* clean up

Co-authored-by: Ella <ella.estigoy@gmail.com>
2022-12-19 17:24:09 -07:00
Kris bd5f57e90c
FEATURE: add user toggle to mask/unmask passwords (#19306) 2022-12-19 18:56:51 -05:00
Selase Krakani 7ba115769a
DEV: Skip push notifications for active online users (#19502)
* DEV: Skip push notifications for active online users

Currently, users with active push subscriptions get push notifications
regardless of their "presence" on the site.

This change introduces a `push_notification_time_window_mins`
site setting which is used in conjunction with a user's `last_seen_at` to
determine if push notifications should be sent. A user is considered to
be actively online if their `last_seen_at` is within `push_notification_time_window_mins`
minutes. `push_notification_time_window_mins` is set to 10 by default.

* DEV: Remove client param for push_notification_time_window_mins site setting

Co-authored-by: Bianca Nenciu <nbianca@users.noreply.github.com>

Co-authored-by: Bianca Nenciu <nbianca@users.noreply.github.com>
2022-12-19 20:17:40 +00:00
dependabot[bot] 155c400ec7
Build(deps): Bump ember-qunit in /app/assets/javascripts (#19519)
Bumps [ember-qunit](https://github.com/emberjs/ember-qunit) from 6.0.0 to 6.1.1.
- [Release notes](https://github.com/emberjs/ember-qunit/releases)
- [Changelog](https://github.com/emberjs/ember-qunit/blob/master/CHANGELOG.md)
- [Commits](https://github.com/emberjs/ember-qunit/compare/v6.0.0...v6.1.1)

---
updated-dependencies:
- dependency-name: ember-qunit
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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-12-19 19:04:55 +01:00
Bianca Nenciu 1ad06eb764
UX: Redesign and refactor penalty modals (#19458)
This merges the two modals code to remove duplication and implements
a more consistent design.
2022-12-19 19:36:03 +02:00
chapoi 8db1f1892d
UX: Hashtag autocomplete styling (#19426)
* UX: added fadeout + hashtag styling

UX: add full name to autocomplete

UX: autocomplete mentions styling

UX: emoji styling user status

UX: autocomplete emoji

* DEV: Move hashtag tag counts into new secondary_text prop

* FIX: Add is-online style to mention users via chat

UX: make is-online avatar styling globally available

* DEV: Fix specs

* DEV: Test fix

Co-authored-by: Martin Brennan <martin@discourse.org>
2022-12-19 12:31:45 +01:00
dependabot[bot] c5957490df
DEV: Update `@ember/test-helpers` and fix chat test (#19495)
We were triggering a `/` key press and it was passing because of 1. a bug in `@ember/test-helpers` and 2. how we handle events in chat

Dependabot PR description:

Build(deps): Bump @ember/test-helpers in /app/assets/javascripts

Bumps [@ember/test-helpers](https://github.com/emberjs/ember-test-helpers) from 2.8.1 to 2.9.1.
- [Release notes](https://github.com/emberjs/ember-test-helpers/releases)
- [Changelog](https://github.com/emberjs/ember-test-helpers/blob/master/CHANGELOG.md)
- [Commits](https://github.com/emberjs/ember-test-helpers/compare/v2.8.1...v2.9.1)

---
updated-dependencies:
- dependency-name: "@ember/test-helpers"
  dependency-type: direct:production
  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>
Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2022-12-19 11:23:31 +01:00
Krzysztof Kotlarek a6edd6ea61
FIX: discourse-follow notification types (#19513)
Bring information about discourse-follow notification types to Core

https://github.com/discourse/discourse-follow/blob/main/plugin.rb#L32
2022-12-19 15:57:35 +11:00
Martin Brennan 6b9c0ee554
DEV: Change HashtagAutocompleteService to use DiscoursePluginRegistry (#19491)
Follow up to a review in #18937, this commit changes the HashtagAutocompleteService to no longer use class variables to register hashtag data sources or types in context priority order. This is to address multisite concerns, where one site could e.g. have chat disabled and another might not. The filtered plugin registers I added will not be included if the plugin is disabled.
2022-12-19 13:46:17 +10:00
Alan Guo Xiang Tan 5bd29b89dd
DEV: Add missing test case (#19510)
Follow-up to f77660b047
2022-12-19 10:09:19 +08:00
dependabot[bot] 4adb457ced
Build(deps): Bump sass from 1.56.2 to 1.57.0 in /app/assets/javascripts (#19507)
Bumps [sass](https://github.com/sass/dart-sass) from 1.56.2 to 1.57.0.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.56.2...1.57.0)

---
updated-dependencies:
- dependency-name: sass
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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-12-19 00:04:44 +01:00
dependabot[bot] 8896b597dc
Build(deps): Bump eslint in /app/assets/javascripts (#19506)
Bumps [eslint](https://github.com/eslint/eslint) from 8.29.0 to 8.30.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.29.0...v8.30.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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-12-18 23:10:09 +01:00
Bianca Nenciu b80765f1f4
DEV: Remove enable_whispers site setting (#19196)
* DEV: Remove enable_whispers site setting

Whispers are enabled as long as there is at least one group allowed to
whisper, see whispers_allowed_groups site setting.

* DEV: Always enable whispers for admins if at least one group is allowed.
2022-12-16 18:42:51 +02:00
Jeff Wong 947711ae15 DEV: drop tagName and connectorTagName on timeline controls plugin outlets 2022-12-16 05:41:33 -10:00
Jeff Wong 9370c91a7a DEV: add topic timeline plugin outlets 2022-12-16 05:41:33 -10:00
Andrei Prigorshnev 51c20efa9b
FIX: a string usage that was lost during git merge (#19493)
I've somehow lost this change when merging 2d628c8.
2022-12-16 19:11:12 +04:00
Andrei Prigorshnev 2d628c80a1
UX: rename "Do Not Disturb" to "Pause Notifications" (#19483)
We decided to rename the "Do Not Disturb" mode to "Pause Notifications". I am starting from changing strings on the client, that will update user interface. And I'm going to do renamings in frontend and backend code after some time.
2022-12-16 17:10:59 +04:00
Andrei Prigorshnev 4908a669e0
FEATURE: integrate DnD with user status (#19410)
This PR adds a new "Pause notifications" checkbox to the user status modal. This checkbox allows enabling the Do-Not-Disturb mode together with user status. Note that we don't remove and don't rename the existing DnD menu item in this PR, so the old way of entering the DnD mode is still available.

Also, we're not making DnD mode a part of user status on backend and in database. The reason is that the DnD mode should still be available on sites with disabled user status, having them separated helps keep the implementation simple.
2022-12-16 16:35:39 +04:00
dependabot[bot] 3c6ef38309
Build(deps): Bump sinon from 15.0.0 to 15.0.1 in /app/assets/javascripts (#19485)
Bumps [sinon](https://github.com/sinonjs/sinon) from 15.0.0 to 15.0.1.
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/main/docs/changelog.md)
- [Commits](https://github.com/sinonjs/sinon/compare/v15.0.0...v15.0.1)

---
updated-dependencies:
- dependency-name: sinon
  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-12-16 11:23:54 +01:00
Selase Krakani 382757d1bd
FEATURE: Add support for desktop push notifications in core (#19375)
* FEATURE: Add support for desktop push notifications in core

Default to push for live notifications on desktop if available and
`enable_desktop_push_notifications` site setting set to true.

This removes the need for desktop-push-notifications plugin.

* DEV: Ensure live notifications are enabled explicitly

Allow a user with push notification access who has directly
enabled notifications via the browser settings to trigger push subscription
flow.
2022-12-16 03:35:33 +00:00
Rafael dos Santos Silva 4edeb7d9eb
DEV: Remove use of deprecated methods (#19486) 2022-12-15 22:08:05 -03:00
Martin Brennan 98e3e90aa2
FIX: Allow backspace into hashtag autocomplete (#19489)
Way back in 90100378b8 when
we first added hashtag autocompletion, we added a rule to
say we should not trigger autocomplete when backspacing into
a hashtag. I think this is because we used to also not trigger
it at the start of the line because of how markdown headers
used to work. We removed this rule in 6f0b9bb1c4
so we are safe to remove the backspace exception here too.
Now you can backspace into a hashtag to trigger the autocomplete.
2022-12-16 11:02:36 +10:00
Martin Brennan dcc9611aec
FIX: Scroll autocomplete container on arrow press (#19478)
The autocomplete container has not needed to be
scrolled with arrow keys until we introduced the new
hashtag autocomplete, which shows more options and allows
scrolling. This commit scrolls the options up/down when
selecting an item outside the scroll with arrow keys.
2022-12-16 10:28:22 +10:00
Martin Brennan 624b1b3820
FIX: Remove user_option saving for bookmark auto delete pref (#19476)
We were changing the user's user_option.bookmark_auto_delete_preference
to whatever they changed it to in the bookmark modal to use as default
for future bookmarks. However this was leading to a lot of confusion
since if you wanted to set it for one bookmark you had to remember to
change it back on the next one.

This commit removes that automatic functionality, and instead moves
the bookmark auto delete preference to User Preferences > Interface
in an explicit dropdown.
2022-12-16 08:50:31 +10:00
Kris b1e08364ef
DEV: add title class name, prefix username class (#19482) 2022-12-15 17:18:08 -05:00
Wolftallemo 983a56e3bd
FIX: FIX: Correctly parse Mandrill webhooks (#17116)
Mandrill sends webhook messages as a URL-encoded body, with the
mandrill_events property as an encoded JSON array.
2022-12-15 23:21:07 +02:00
Bianca Nenciu 1f6e9bd5a9
UX: Add tooltip why file upload is disabled (#19471)
Follow up to commit 0cc6e678bb.
2022-12-15 22:57:11 +02:00
Osama Sayegh 1c03d6f9b9
FEATURE: Send notifications to admins when new features are released (#19460)
This commit adds a new notification that gets sent to admins when the site gets new features after an upgrade/deploy. Clicking on the notification takes the admin to the admin dashboard at `/admin` where they can see the new features under the "New Features" section.

Internal topic: t/87166.
2022-12-15 20:12:53 +03:00
Jordan Vidrine ef62c85a12
FIX: Add REPLACEMENTS icons to styleguide 2022-12-15 09:12:18 -06:00
Martin Brennan ec9ec1e04e
FEATURE: Sort hashtags starting with term higher priority (#19463)
This introduces another "section" of queries to the
hashtag autocomplete search, which returns results for
each type that start with the search term. So now results
will be in this order, and within these sections ordered
by the types in priority order:

1. Exact matches sorted by type
2. "starts with" sorted by type
3. Everything else sorted by type then name within type
2022-12-15 13:01:44 +10:00
Penar Musaraj b1b8a7ebfe
DEV: Update Twitter meta tags while navigating in app (#19468)
We update `og:title`, `og:url`, might as well update `twitter:title`
and `twitter:url`. This might also fix a Chrome/Android issue where the
root URL is shared instead of the current page's URL.
2022-12-14 14:33:09 -05:00
Kris f77660b047
DEV: API to add classes to small actions (#19453) 2022-12-14 10:30:45 -05:00
chapoi 6f9843803d
UX: add new boxshadow variation (#19450) 2022-12-14 12:35:23 +01:00
Jan Cernik ca1d76f197
DEV: Reduce text-size cookie duration (#19445)
Following the same behavior as the theme/color-scheme cookies, now the
cookie expires in 1 year and automatically extends on every user visit.
2022-12-14 07:02:09 -03:00
Andrei Prigorshnev ff5a0bec89
FEATURE: show user status on group pages (#19323)
This adds live user status to /g/{group-name} routes.
2022-12-14 13:18:09 +04:00
Blake Erickson 5c925f2db3
FEATURE: Chat and Sidebar are now on by default (#19406)
FEATURE: Chat and Sidebar are now on by default

- Set the sidebar site setting to be enabled by default
- Set the chat site setting to be enabled by default
- Updated existing specs that assumed the original default
- Use a migration to keep old defaults for existing sites
2022-12-13 17:25:19 -07:00
Krzysztof Kotlarek aa3a9b6fea
FEATURE: Differentiate notification type for directly vs indirectly watched topic (#19433)
When user is watching category or tag (watching or watching first post) notifications are moved to other tab.

To achieve that and distinguish between post create to directly watched topics and indirectly watched topics, new notification type called `watching_category_or_tag` was introduced.
2022-12-14 10:22:26 +11:00
chapoi 211700bc5c
UX: change highlight colour (#19451) 2022-12-14 07:14:28 +08:00
Alan Guo Xiang Tan 5d2e2677c0
FIX: Invalid route path for staff info warnings link (#19461)
This regressed in 4da2e3fef4
2022-12-14 07:14:01 +08:00
Sérgio Saquetim 506d26df26
DEV: Export default category link renderer to be used on plugins and theme-components (#19455) 2022-12-13 18:41:36 -03:00
Gerhard Schlager c94401e024
DEV: Remove unused section from "Customize Theme" UI (#19449) 2022-12-13 20:13:35 +01:00
Rafael dos Santos Silva 0434de6cee
DEV: Compatibility with Ruby 3.2 (#19303) 2022-12-13 16:03:53 -03:00
Penar Musaraj f58eaf529f
FIX: Remove console warning for "nohighlight" (#19447) 2022-12-13 13:43:31 -05:00
Jordan Vidrine f29291a869
user input adjustments (#19446) 2022-12-13 10:13:48 -06:00
Penar Musaraj d2efc84cba
FIX: Reset search controller state (#19402)
Fixes an issue on mobile where navigating away from search and returning
results in confusing UI where there are no results but headings says "N
results found".
2022-12-13 09:50:44 -05:00
Andrei Prigorshnev 337a033f3b
FIX: Make sure user status on mentions doesnt fail in plugins (#19442)
This fixes the problem reported in https://meta.discourse.org/t/trackstatus-error-in-docs-topics/248717 and also guarantees that the same problem won't appear in other plugins.

The problem was that we're calling trackStatus() and on() on a user object, but that only works if it's a user model and fails on plain js objects.

I'm not adding tests here because in Core we always have a properly wrapped user model here. But this fix makes sure that plugins that don't won't fail here.
2022-12-13 16:51:11 +04:00
Jarek Radosz fd405179a7
DEV: Modernize the remaining admin-webhooks parts (#19438) 2022-12-13 13:32:34 +01:00
Jarek Radosz 0671a95cd6
FIX: GitHub onebox ellipsis styling regressed in 9d03f20 (#19441) 2022-12-13 12:01:48 +01:00
David Taylor e540c4584b
DEV: Remove deprecation config for ember-modifier (#19439)
These deprecation messages were removed in 4.x, which we upgraded to in 2e22453057
2022-12-13 10:28:44 +00:00
dependabot[bot] 2e22453057
Build(deps): Bump ember-modifier in /app/assets/javascripts (#19437)
Bumps [ember-modifier](https://github.com/ember-modifier/ember-modifier) from 3.2.7 to 4.0.0.
- [Release notes](https://github.com/ember-modifier/ember-modifier/releases)
- [Changelog](https://github.com/ember-modifier/ember-modifier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ember-modifier/ember-modifier/compare/v3.2.7...v4.0.0)

---
updated-dependencies:
- dependency-name: ember-modifier
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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-12-13 10:56:07 +01:00
Jarek Radosz f9bdda84ca
DEV: Admin webhooks interface issues (#19360)
1. The events table had broken styling, making each row overflow
2. It had confusing routes: `/:id` for "edit" and `/:id/events` for "show" (now it's `/:id/edit` and `/:id` respectively)
3. There previously was an unused backend action (`#edit`) - now it is used (and `web_hooks/:id/events` route has been removed)
4. There was outdated/misplaced/duplicated CSS
5. And more
2022-12-13 01:53:08 +01:00
Alan Guo Xiang Tan 0abd772098
DEV: Pass in site guardian for `Plugin::Instance.register_site_categories_callback` (#19430)
The guardian is useful for plugins to determine if the callback should
do anything. A common use case is to not do anything in the callback if
the user is anonymous.
2022-12-13 07:49:13 +08:00
Blake Erickson de53cf7657
FEATURE: Add chat and sidebar toggles to the setup wizard (#19347)
* FEATURE: Add chat and sidebar toggles to the setup wizard

- Fix css alighnment
- Add Enable Chat Toggle
- Add Enable Sidebar Toggle

* Check for the chat plugin

* Account for new sidebar step

* update chat and sidebar description

* UI: add checkmark as a visual indicator that it is enabled

* use new navigation_memu site setting for enabling the sidebar

* fix tests

* Add tests

* Update lib/wizard/step_updater.rb

Use HEADER_DROPDOWN instead of LEGACY

Co-authored-by: Alan Guo Xiang Tan <gxtan1990@gmail.com>

* Fix spec. Use HEADER_DROPDOWN instead of LEGACY

Co-authored-by: Ella <ella.estigoy@gmail.com>
Co-authored-by: Alan Guo Xiang Tan <gxtan1990@gmail.com>
2022-12-12 14:30:21 -07:00
Kris c748bee0f5
FIX: more specific class name to avoid collision (#19428) 2022-12-12 15:02:51 -05:00
Kris 1719075352
UX: include space between elements in kbd tag (#19427) 2022-12-12 13:53:48 -05:00
Kris 9d03f207fa
UX: more consistent style for the new topic banner (#19405) 2022-12-12 12:56:25 -05:00
Gerhard Schlager 15f98f727a REFACTOR: Replace unnecessary Message Format string 2022-12-12 17:01:04 +01:00
Gerhard Schlager 03f0b4f54b REFACTOR: Replace concatenated strings to simplify translation 2022-12-12 17:01:04 +01:00
Gerhard Schlager d059c64485 REFACTOR: Update Message Format string to simplify translation 2022-12-12 17:01:04 +01:00
Gerhard Schlager 584abbda54 REFACTOR: Update Message Format string to simplify translation 2022-12-12 17:01:04 +01:00
Jarek Radosz 19214aff18
DEV: Clean up all message bus subscriptions (#19268)
1. "What Goes Up Must Come Down" – if you subscribe to message bus, make sure you also unsubscribe
2. When you unsubscribe - remove only your subscription, not **all** subscriptions on given channel

Attempt #2. The first attempt tried to extend a core `@bound` method in new-user-narrative plugin which did not work. I reworked that plugin in the meantime. This new PR also cleans up message bus subscriptions in now core-merged chat plugin.
2022-12-12 16:32:25 +01:00
Jarek Radosz 93a4012ecb
DEV: Drop helper context setup in tests (#19423) 2022-12-12 15:20:48 +01:00
jbrw 1a48ea767e
DEV: Allow additional TopicList preloaded associations (#18891)
This provides a means to allow additional associations to be preloaded when generating a TopicList.
2022-12-12 09:08:13 -05:00
Jarek Radosz 2a4fea4372
FIX: Multipart uppy upload regression in 80e422c (#19424) 2022-12-12 13:39:40 +01:00
Jarek Radosz 0464f9d2be
DEV: Prefer `site` injection over import (#14982)
And in helpers use `helperContext().site`
2022-12-12 12:53:55 +01:00
Jarek Radosz 80e422cea3
DEV: Update uppy to 3.x (#18219) 2022-12-12 12:08:57 +01:00
Martin Brennan 735e96e5a0
FIX: Ensure hashtag autocomplete is not behind keyboard in chat (#19419)
We must set `treatAsTextarea` to true when using autocomplete
in the chat composer, since it is at the bottom of the screen
we always want to show it above the composer. This fixes the
issue where the hashtag autocomplete results went behind the
keyboard on mobile (which was not happening for mentions).
2022-12-12 15:14:51 +10:00
Alan Guo Xiang Tan 332ac0f299
UX: Exclude child catgegories of muted category in similar to search (#19414)
Follow-up to 207b764ea3
2022-12-12 06:31:46 +08:00
dependabot[bot] 278ef8f854
Build(deps): Bump sass from 1.56.1 to 1.56.2 in /app/assets/javascripts (#19413)
Bumps [sass](https://github.com/sass/dart-sass) from 1.56.1 to 1.56.2.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.56.1...1.56.2)

---
updated-dependencies:
- dependency-name: sass
  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-12-11 22:40:22 +01:00
Selase Krakani 656d0fa762
DEV: Use isSecureContext for service worker registrations (#19407)
Currently, we check if the site is loaded over `https` before
registering the service worker. This prevents the service worker from
being registered in a standard dev/test setup.

This change replaces the protocol check with `isSecureContext`
property check.

In addition to resources delivered over `https`, `isSecureContext`
returns `true` for resources loaded over `http://127.0.0.1`, `http://localhost`,
`http://*.localhost` and `file://`.
2022-12-11 16:37:41 +00:00
Kris 07e4b7550d
DEV: relocate `:root` CSS custom properties (#19389) 2022-12-09 14:33:15 -05:00
Blake Erickson 552f16fc95
FIX: Broken images on subfolder installs (#19404)
Use the `Discourse.base_path` when linking to hard coded images used in
the UI so that the correct subfolder path is used if present.

Follow up: 5c67b073ae
2022-12-09 11:24:12 -07:00
Renato Atilio 5c67b073ae
FIX: broken emoji url on password reset w/ subfolder (#19373)
* FIX: broken emoji url on password reset w/ subfolder

* Use Discourse.base_path to account for subfolder

I do like where you are going with using Emoji.url_for but due to the
lack of svg support currently I think we need to use the current svg
file we have. The emoji png files we have render too blurry at high
resolution.

This commit uses the `Discourse.base_path` so that a subfolder install
will have the correct image path.

I do think in the future we should do some work around using a helper
similar to Emoji.url_for with svg support so that we better standardize
our use of these emojis.

Co-authored-by: Blake Erickson <o.blakeerickson@gmail.com>
2022-12-09 10:01:43 -07:00