Commit Graph

52053 Commits

Author SHA1 Message Date
Mark VanLandingham
aff3d36f35
FIX: Only labels for bold & italic in composer when language doesn't match icon 2023-11-20 15:58:46 -06:00
dependabot[bot]
30d5caa9e9
Build(deps): Bump the babel group (#24472)
Bumps the babel group in /app/assets/javascripts with 1 update: [@babel/standalone](https://github.com/babel/babel/tree/HEAD/packages/babel-standalone).

- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.4/packages/babel-standalone)

---
updated-dependencies:
- dependency-name: "@babel/standalone"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: babel
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-20 22:54:30 +01:00
Blake Erickson
ef7e5ed9b4
DEV: Rebake posts w/ quotes to update category badge style (#24469)
Posts with quotes need to be rebaked to apply the new category badge
style css.

See: https://meta.discourse.org/t/285705
2023-11-20 14:17:44 -07:00
David Taylor
e6370decfd
Revert history-store changes (#24471)
This reverts commit 20e562bd99, 161256eef8 and a8292d25f8.

It looks like this affected cache-restoration of topic lists in some circumstances. It also looks like routing behavior may vary when toggling the loading indicator between spinner and slider.

More investigation and testing required.
2023-11-20 21:15:50 +00:00
David Taylor
d641a63236
UX: Ensure loading slider does not 'reset' halfway through a transition (#24446)
For transitions to nested routes (e.g. /u/blah/activity), where each layer has an async model hook, the `loading` event will be fired twice within the same transition. This was causing the loading slider to jump backwards halfway through loading. This commit fixes things to handle nested loading events with a single animation.
2023-11-20 20:14:02 +00:00
David Taylor
20e562bd99 FIX: Use history-store service to check isPoppedState()
The old heuristic was 'a transition to a URL (i.e. not a named route) which was not triggered by DiscourseURL'. That logic is flawed now that we're increasingly using Ember's routing methods.
2023-11-20 20:04:40 +00:00
David Taylor
161256eef8 DEV: Update topic-list-item focus to use history-store
This avoids the need for manually reading and checking the history uuid.
2023-11-20 20:04:40 +00:00
David Taylor
a8292d25f8 DEV: Introduce history-store service
This commit extracts the storage part of the route-scroll-manager into a dedicated service. This provides a key/value store which will reset for each navigation, and restore previous values when the user uses the back/forward buttons in their browser.
2023-11-20 20:04:40 +00:00
David Taylor
299989b85e
FIX: Sorting toggles on topic list (#24465)
- Correctly interpret string queryParams
- On first click of a new column, use "descending". Otherwise, toggle.
- Add system specs for behavior
2023-11-20 17:45:13 +00:00
Penar Musaraj
36606a2157
FIX: Modals on Android when keyboard is visible (#24442) 2023-11-20 11:56:06 -05:00
Penar Musaraj
f8a27dcbec
FIX: Rendering a single item in a grid (#24464)
Should fix https://meta.discourse.org/t/-/285768.

Appending without cloning was causing the item to be removed from the
DOM but on a 1-item grid we skip the rest of the grid's rendering,
hence the item was never re-inserted. Cloning ensures we don't remove
the item during processing (it does get removed later on when rendering
the grid's columns).
2023-11-20 11:53:35 -05:00
Jarek Radosz
89bd2b7df0
DEV: Remove unnecessary js: true options from specs (#24463) 2023-11-20 17:22:14 +01:00
Jarek Radosz
8968887e24
DEV: Fix various typos (#24461)
November 2023 edition
2023-11-20 16:49:49 +01:00
David Taylor
3408db94f0
UX: Ensure tag-info does not persist onto non-tag routes (#24462) 2023-11-20 15:43:35 +00:00
Jarek Radosz
1a43010603
DEV: Add selectText option to auto-focus modifier (#24458) 2023-11-20 14:53:20 +01:00
David Taylor
c5affa9ca2
FIX: Navigating to home via route name (#24460) 2023-11-20 13:51:03 +00:00
David Taylor
5276afa9b2
DEV: Refactor bowerDependencies patch (#24437)
Moves the patch from ember-source to ember-cli so that it's easier for us to feature-flag an ember-source upgrade without fighting with patch-package. We'll be able to remove this patch once we're fully on Ember 5.x.

(ref https://github.com/discourse/discourse/pull/21720)
2023-11-20 13:28:02 +00:00
David Taylor
0a58564ddd
DEV: Make DTooltipInstance destroy synchronous (#24439)
Having async cleanup on a modifier is problematic because it means it might persist beyond the end of a test, leading to flaky 'Test is not isolated' errors.
2023-11-20 13:27:44 +00:00
David Taylor
9d8abcbdfe
DEV: Print version info to console on boot (#24444)
Discourse already includes version information in a `<meta` tag on the page. This commit surfaces it to the console on boot for easier access, and also adds the Ember version (which will be particularly useful as we start rolling out the upgrade to Ember 5)
2023-11-20 13:27:29 +00:00
David Taylor
c803cc7067
DEV: Update login-required-test modal-close selector (#24438)
This was accidentally selecting the close button on `<DModalLegacy />`, which is present in the DOM with `display: none`. The close button logic would close any active modal, so the test would pass. However, it will stop passing when we remove the legacy modal system.
2023-11-20 13:27:13 +00:00
David Taylor
ff3204cc91
DEV: Update auth-complete to use public router service (#24436)
`router:main` is private and has an unstable API (e.g. the `didTransition` event does not fire in Ember 5)
2023-11-20 13:27:00 +00:00
David Taylor
18461e38cf
DEV: Update custom array implementations for Ember 5 compatibility (#24435)
In the long term we should aim to modernize these places, but for now this change will make them compatible with Ember 5.x (while maintaining compatibility with Ember 3.28)
2023-11-20 13:26:46 +00:00
chapoi
ba61ea17b6
UX: Revert grey search inputs (#24459)
* UX: search menu undo background

* UX: undo cmd-k bg + add focus
2023-11-20 13:45:59 +01:00
chapoi
f2d3e3ed3f
UX: Fixes login/create modal (#24457)
* UX: fix > hide alt login method on mobile create acc

* UX: login modal > fix long names on login buttons

* UX: fix login overflow
2023-11-20 11:52:50 +01:00
Martin Brennan
7cf59dc8fe
FIX: Invalid date when sending chat message in thread (#24455)
Fixes a minor issue where "Invalid date" is shown briefly
when sending a message in a chat thread. Change to use
`new Date()` instead like the channel staged message which
does not have this issue.
2023-11-20 10:21:39 +01:00
Krzysztof Kotlarek
190a7f8c7a
UX: smaller new feature emoji (#24454)
Moved the new feature emoji to the left of the title and made it smaller.
2023-11-20 16:08:10 +11:00
Alan Guo Xiang Tan
48c0cd5b2a
DEV: Always run bundle and yarn install while running d/boot_dev (#24453)
Why this change?

Before this change, running `d/boot_dev` does not run `bundle install`
and `yarn install` unless the `--init` option is specified. However,
this does not make sense because the user will end up having to run
`d/bundle install` and `d/yarn install` manually after if the `--init`
option is not used. We can simplify this by just always running `bundle
install` and `yarn install` whenever `d/boot_dev` is used.

What does this change do?

This change changes the `d/boot_dev` script to always run `bundle
install` and `yarn install`.
2023-11-20 10:04:55 +08:00
Martin Brennan
146da75fd7
FEATURE: Add setting & preference for search sort default order (#24428)
This commit adds a new `search_default_sort_order` site setting,
set to "relevance" by default, that controls the default sort order
for the full page /search route.

If the user changes the order in the dropdown on that page, we remember
their preference automatically, and it takes precedence over the site
setting as a default from then on. This way people who prefer e.g.
Latest Post as their default can make it so.
2023-11-20 10:43:58 +10:00
Martin Brennan
186e415e38
DEV: Housekeeping for CleanUpUploads job (#24361)
Followup to 9db8f00b3d, we
don't need this dead code any more. Also made some minor
improvements and comments.
2023-11-20 09:50:09 +10:00
Krzysztof Kotlarek
96c5a6c9ca
FEATURE: dedicated admin section for new features (#24292)
New tab in admin panel with list of new features. Presentation was enhanced by screenshot and markdown description.

Related PR https://github.com/discourse-org/discourse-new-features-feeds/pull/23
2023-11-20 09:59:04 +11:00
dependabot[bot]
abc0fad17e
Build(deps): Bump public_suffix from 5.0.3 to 5.0.4 (#24451)
Bumps [public_suffix](https://github.com/weppos/publicsuffix-ruby) from 5.0.3 to 5.0.4.
- [Changelog](https://github.com/weppos/publicsuffix-ruby/blob/main/CHANGELOG.md)
- [Commits](https://github.com/weppos/publicsuffix-ruby/compare/v5.0.3...v5.0.4)

---
updated-dependencies:
- dependency-name: public_suffix
  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>
2023-11-19 23:15:39 +01:00
Krzysztof Kotlarek
265b8bf987
UX: normal cursor on custom sidebar link icon (#24427)
Recently, we disabled the option to reorder links directly from the sidebar. Instead, user has to go to edit modal.

https://github.com/discourse/discourse/pull/24188

However, move cursor was left, which is misleading.
2023-11-20 09:13:08 +11:00
dependabot[bot]
c0b741b1cc
Build(deps): Bump nokogiri from 1.15.4 to 1.15.5 (#24448)
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.15.4 to 1.15.5.
- [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.15.4...v1.15.5)

---
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>
2023-11-19 23:09:23 +01:00
dependabot[bot]
4ef713ceaa
Build(deps-dev): Bump bullet from 7.1.3 to 7.1.4 (#24449)
Bumps [bullet](https://github.com/flyerhzm/bullet) from 7.1.3 to 7.1.4.
- [Changelog](https://github.com/flyerhzm/bullet/blob/main/CHANGELOG.md)
- [Commits](https://github.com/flyerhzm/bullet/compare/7.1.3...7.1.4)

---
updated-dependencies:
- dependency-name: bullet
  dependency-type: direct:development
  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>
2023-11-19 23:09:07 +01:00
dependabot[bot]
b427eba367
Build(deps-dev): Bump shoulda-matchers from 0dc6c6d to 7e069cf (#24450)
Bumps [shoulda-matchers](https://github.com/thoughtbot/shoulda-matchers) from `0dc6c6d` to `7e069cf`.
- [Release notes](https://github.com/thoughtbot/shoulda-matchers/releases)
- [Commits](0dc6c6d8fa...7e069cf205)

---
updated-dependencies:
- dependency-name: shoulda-matchers
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-19 23:08:32 +01:00
dependabot[bot]
fd1aabbbf4
Build(deps): Bump json_schemer from 2.0.0 to 2.1.0 (#24452)
Bumps [json_schemer](https://github.com/davishmcclurg/json_schemer) from 2.0.0 to 2.1.0.
- [Changelog](https://github.com/davishmcclurg/json_schemer/blob/main/CHANGELOG.md)
- [Commits](https://github.com/davishmcclurg/json_schemer/compare/v2.0.0...v2.1.0)

---
updated-dependencies:
- dependency-name: json_schemer
  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>
2023-11-19 23:06:32 +01:00
dependabot[bot]
96093a73d1
Build(deps-dev): Bump the embroider group (#24447)
Bumps the embroider group in /app/assets/javascripts with 1 update: [@embroider/core](https://github.com/embroider-build/embroider/tree/HEAD/packages/core).

- [Release notes](https://github.com/embroider-build/embroider/releases)
- [Changelog](https://github.com/embroider-build/embroider/blob/main/CHANGELOG.md)
- [Commits](https://github.com/embroider-build/embroider/commits/HEAD/packages/core)

---
updated-dependencies:
- dependency-name: "@embroider/core"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: embroider
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-19 23:05:49 +01:00
David Taylor
04a58a6e64
PERF: Only invalidate other translations when en changes (#24443)
en is the only fallback locale we use, so there's no need to invalidate everything when other languages change. Limiting this also helps to prevent circular dependent_field relations which could cause issues in some situations.

Followup to eda79186ee
2023-11-18 12:36:25 +00:00
David Taylor
8c16482932
DEV: Rebuild JS app when files change in discourse-markdown-it (#24379)
Based on a workaround shared in https://github.com/embroider-build/embroider/issues/1635#issue-1935759857
2023-11-17 18:55:14 +00:00
Daniel Waterworth
0c712eaa3a
DEV: Don't define methods in an included block (#24433) 2023-11-17 12:22:32 -06:00
Isaac Janzen
c55c354a13
FIX: Include missing search service on login modal (#24432) 2023-11-17 11:13:37 -07:00
Mark VanLandingham
1e0de818e6
DEV: Support search menu APIs in glimmer version (#24061) 2023-11-17 11:17:45 -06:00
Joffrey JAFFEUX
2b7ecee06e
FIX: correctly highlights message on reply click (#24431) 2023-11-17 18:05:38 +01:00
Kris
878b9ce549
UX: improve json_schema setting styles (#24424) 2023-11-17 11:23:40 -05:00
Mark VanLandingham
7d35e406ba
DEV: Add support for limit in notifications index w/o recent param (#24423)
Currently to use a limit in the notifications index, you have to also pass recent: true as a param.

This PR:

Adds optional limit param to be used in the notifications query, regardless of the presence of recent
Raises the max limit of the response with recent present from 50 -> 60. It is super weird we have a hard-limit of 50 before with recent param, and 60 without the param.
2023-11-17 08:22:18 -06:00
Kelv
a5ed0ea5d6
DEV: add deprecation notice for decorateTopicTitle API (#24429)
* DEV: add deprecation notice for decorateTopicTitle API
2023-11-17 18:36:03 +08:00
Martin Brennan
09b0548b5f
DEV: Fix S3 minio specs on CI (#24426)
config.after(:suite) which stops minio server is called every time one
of the groups of parallel tests complete. This works fine most of the
time with parallel spec runs, but sometimes one of these
MinioRunner.stop calls happens while a spec is running in another
process that expects the minio server to be running.

Skipping these tests to avoid flakys for now.
2023-11-17 14:28:06 +10:00
Alan Guo Xiang Tan
7c1a4e32a6
DEV: Fix flaky fast edit keyboard shortcut QUnit test (#24425)
Why this change?

The test has been flaky on CI with the following assertion failing:

```
not ok 302 Firefox 115.0 - [899 ms] - Browser Id 5 - Acceptance: Fast Edit: Works with keyboard shortcut
    ---
        actual: >
            Element #fast-edit-input does not exist
        expected: >
            Element #fast-edit-input exists
```

The hypothesis here is that we are triggering the `E` keypress event
before the `.quote-button` menu has appeared. When that happens, we will
end up opening the composer instead of triggering the fast edit editor.
2023-11-17 08:31:39 +08:00
Alan Guo Xiang Tan
e0ef88abca
DEV: Run QUnit tests for official Discourse themes (#24405)
Why this change?

As the number of themes which the Discourse team supports officially
grows, we want to ensure that changes made to Discourse core do not
break the plugins. As such, we are adding a step to our Github actions
test job to run the QUnit tests for all official themes.

What does this change do?

This change adds a new job to our tests Github actions workflow to run the QUnit
tests for all official plugins. This is achieved with the following
changes:

1. Update `testem.js` to rely on the `THEME_TEST_PAGES` env variable to set the
   `test_page` option when running theme QUnit tests with testem. The
   `test_page` option [allows an array to be specified](https://github.com/testem/testem#multiple-test-pages) such that tests for
   multiple pages can be run at the same time. We are relying on a ENV variable
   because  the `testem` CLI does not support passing a list of pages
   to the `--test_page` option.

2. Support a `/testem-theme-qunit/:testem_id/theme-qunit` Rails route in the development environment. This
   is done because testem prefixes the path with a unique ID to the configured `test_page` URL.
   This is problematic for us because we proxy all testem requests to the
   Rails server and testem's proxy configuration option does not allow us
   to easily rewrite the URL to remove the prefix. Therefore, we configure a proxy in testem to prefix `theme-qunit` requests with
  `/testem-theme-qunit` which can then be easily identified by the Rails server and routed accordingly. 

3. Update `qunit:test` to support a `THEME_IDS` environment variable
   which will allow it to run QUnit tests for multiple themes at the
   same time.

4. Support `bin/rake themes:qunit[ids,"<theme_id>|<theme_id>"]` to run
   the QUnit tests for multiple themes at the same time.

5. Adds a `themes:qunit_all_official` Rake task which runs the QUnit
   tests for all the official themes.
2023-11-17 07:17:32 +08:00
dependabot[bot]
a1644d9d8d
Build(deps): Bump unf_ext from 0.0.9 to 0.0.9.1 (#24422)
Bumps [unf_ext](https://github.com/knu/ruby-unf_ext) from 0.0.9 to 0.0.9.1.
- [Changelog](https://github.com/knu/ruby-unf_ext/blob/master/CHANGELOG.md)
- [Commits](https://github.com/knu/ruby-unf_ext/compare/v0.0.9...v0.0.9.1)

---
updated-dependencies:
- dependency-name: unf_ext
  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>
2023-11-16 23:57:59 +01:00