Commit Graph

52182 Commits

Author SHA1 Message Date
Kris
c197f8c6ee
UX: make github onebox styles more responsive (#24761) 2023-12-06 17:45:56 -05:00
Jarek Radosz
694b5f108b
DEV: Fix various rubocop lints (#24749)
These (21 + 3 from previous PRs) are soon to be enabled in rubocop-discourse:

Capybara/VisibilityMatcher
Lint/DeprecatedOpenSSLConstant
Lint/DisjunctiveAssignmentInConstructor
Lint/EmptyConditionalBody
Lint/EmptyEnsure
Lint/LiteralInInterpolation
Lint/NonLocalExitFromIterator
Lint/ParenthesesAsGroupedExpression
Lint/RedundantCopDisableDirective
Lint/RedundantRequireStatement
Lint/RedundantSafeNavigation
Lint/RedundantStringCoercion
Lint/RedundantWithIndex
Lint/RedundantWithObject
Lint/SafeNavigationChain
Lint/SafeNavigationConsistency
Lint/SelfAssignment
Lint/UnreachableCode
Lint/UselessMethodDefinition
Lint/Void

Previous PRs:
Lint/ShadowedArgument
Lint/DuplicateMethods
Lint/BooleanSymbol
RSpec/SpecFilePathSuffix
2023-12-06 23:25:00 +01:00
dependabot[bot]
47f298b2f4
Build(deps): Bump rack-mini-profiler from 3.1.1 to 3.2.0 (#24760)
Bumps [rack-mini-profiler](https://github.com/MiniProfiler/rack-mini-profiler) from 3.1.1 to 3.2.0.
- [Release notes](https://github.com/MiniProfiler/rack-mini-profiler/releases)
- [Changelog](https://github.com/MiniProfiler/rack-mini-profiler/blob/master/CHANGELOG.md)
- [Commits](https://github.com/MiniProfiler/rack-mini-profiler/compare/v3.1.1...v3.2.0)

---
updated-dependencies:
- dependency-name: rack-mini-profiler
  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-12-06 23:09:20 +01:00
dependabot[bot]
dcef359a8e
Build(deps-dev): Bump selenium-webdriver from 4.15.0 to 4.16.0 (#24759)
Bumps [selenium-webdriver](https://github.com/SeleniumHQ/selenium) from 4.15.0 to 4.16.0.
- [Release notes](https://github.com/SeleniumHQ/selenium/releases)
- [Changelog](https://github.com/SeleniumHQ/selenium/blob/trunk/rb/CHANGES)
- [Commits](https://github.com/SeleniumHQ/selenium/compare/selenium-4.15.0...selenium-4.16.0)

---
updated-dependencies:
- dependency-name: selenium-webdriver
  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>
2023-12-06 23:08:00 +01:00
Jarek Radosz
8623631a06
DEV: Fix random typos (#24756) 2023-12-06 22:25:26 +01:00
Jarek Radosz
6eb1cadb73
DEV: Fix RSpec/SpecFilePathSuffix / enable 3 chat spec files (#24750)
* RSpec/SpecFilePathSuffix
* removes failing specs
* More specific selectors?

---------

Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2023-12-06 22:25:11 +01:00
Kris
42a75e3df9
FIX: saving tag changes without description (#24753) 2023-12-06 14:17:56 -05:00
David Taylor
48ec946702
UX: Restore category badge colours on 404 page (#24754) 2023-12-06 17:49:19 +00:00
chapoi
42e5bbaf38
UX: fix double-scrollbar in keyboard-shortcuts-modal (#24751) 2023-12-06 17:12:14 +01:00
Kris
22bb1c8951
UX: improve poll text wrap (#24732) 2023-12-06 10:58:06 -05:00
Mark VanLandingham
efcb5bb3df
DEV: Plugin outlet around user menu empty state (#24730) 2023-12-06 08:06:50 -06:00
Jarek Radosz
6a66dc1cfb
DEV: Fix Lint/BooleanSymbol (#24747) 2023-12-06 13:19:09 +01:00
Jarek Radosz
138bf486d3
DEV: Fix Lint/DuplicateMethods (#24746) 2023-12-06 13:18:34 +01:00
Jarek Radosz
4280c01153
DEV: Fix Lint/ShadowedArgument (#24733) 2023-12-06 13:16:10 +01:00
David Taylor
1e471f7ec2
FIX: Handle 404 correctly when transition has no path (#24748) 2023-12-06 12:12:19 +00:00
David Taylor
f7c514dc99
DEV: Add ember-5 to test matrix for core/chat system specs (#24721) 2023-12-06 12:12:04 +00:00
David Taylor
b3d1707b65
DEV: Refactor Wizard routes, controllers and templates (#24725)
Extracted from https://github.com/discourse/discourse/pull/23678

Co-authored-by: Godfrey Chan <godfreykfc@gmail.com>
2023-12-06 12:07:07 +00:00
David Battersby
78c2f116e0
DEV: skip flaky upload spec for large image thumbnails (#24745) 2023-12-06 19:08:56 +08:00
David Battersby
6dd4937b69
update matchers to improve test suite perf for upload specs (#24744)
This change speeds up our upload specs by avoiding Capybara's default_max_wait_time.
2023-12-06 18:02:55 +08:00
David Battersby
8b46dc8bb5
FEATURE: Add thumbnails for chat image uploads (#24328)
Introduces the concept of image thumbnails in chat, prior to this we uploaded and used full size chat images within channels and direct messages.

The following changes are covered:
- Post processing of image uploads to create the thumbnail within Chat::MessageProcessor
- Extract responsive image ratios into CookedProcessorMixin (used for creating upload variations)
- Add thumbnail to upload serializer from plugin.rb
- Convert chat upload template to glimmer component using .gjs format
- Use thumbnail image within chat upload component (stores full size img in orig-src data attribute)
- Old uploads which don't have thumbnails will fallback to full size images in channels/DMs
- Update Magnific lightbox to use full size image when clicked
- Update Glimmer lightbox to use full size image (enables zooming for chat images)
2023-12-06 14:59:18 +08:00
Martin Brennan
30d5e752d7
DEV: Revert guardian changes (#24742)
I took the wrong approach here, need to rethink.

* Revert "FIX: Use Guardian.basic_user instead of new (anon) (#24705)"

This reverts commit 9057272ee2.

* Revert "DEV: Remove unnecessary method_missing from GuardianUser (#24735)"

This reverts commit a5d4bf6dd2.

* Revert "DEV: Improve Guardian devex (#24706)"

This reverts commit 77b6a038ba.

* Revert "FIX: Introduce Guardian::BasicUser for oneboxing checks (#24681)"

This reverts commit de983796e1.
2023-12-06 16:37:32 +10:00
Martin Brennan
ac60b9fe72
DEV: Skip chat test (#24739)
This consistently fails on core now, see
https://github.com/discourse/discourse/actions/runs/7109919490/job/19355591619?pr=24738

Error: QUnit Test Failure: Browser Id 2 - Discourse Chat | Component | chat message collapser images: escapes link
not ok 444 Chrome 120.0 - [58 ms] - Browser Id 2 - Discourse Chat | Component | chat message collapser images: escapes link
    ---
        actual: >
            false
        expected: >
            true
        stack: >

Expected value is %3Cscript%3Esomeeviltitle%3C/script%3E and actual value is
&lt;script&gt;someeviltitle&lt;/script&gt;
2023-12-06 13:58:13 +10:00
Martin Brennan
9057272ee2
FIX: Use Guardian.basic_user instead of new (anon) (#24705)
c.f. de983796e1

There will soon be additional login_required checks
for Guardian, and the intent of many checks by automated
systems is better fulfilled by using BasicUser, which
simulates a logged in TL0 forum user, rather than an
anon user.

In some cases the use of anon still makes sense (e.g.
anonymous_cache), and in that case the more explicit
`Guardian.anon_user` is used
2023-12-06 11:56:21 +10:00
Alan Guo Xiang Tan
d9dca6482d
DEV: Incorrect setup for test (#24736)
Why this change?

The test in question is testing an anon user instead of a user that has
no permissions to a given topic.
2023-12-06 09:26:45 +08:00
Martin Brennan
a5d4bf6dd2
DEV: Remove unnecessary method_missing from GuardianUser (#24735)
Followup to 77b6a038ba, this
was a mistake and should have been removed before merge.
2023-12-06 11:24:19 +10:00
Martin Brennan
3141994e38
FIX: Add checkbox-label to notification bulk actions (#24734)
Followup to c80b5b718c
2023-12-06 11:22:48 +10:00
Martin Brennan
77b6a038ba
DEV: Improve Guardian devex (#24706)
It's quite confusing for blank? to be overridden
on AnonymousUser and BasicUser to represent
whether the fake user is authenticated or not;
we can achieve the same thing more clearly with
a wrapper GuardianUser class around these
user classes. Also fixes an issue where
`def user` would be returning nil.
2023-12-06 10:57:04 +10:00
Ella E
47629db3db
UX: Add a link from admin reports page to meta a topic (#24707)
* UX: Add a link from admin reports page to meta a topic
* DEV: apply prettier
2023-12-05 16:37:44 -07:00
Kris
4ad6c9ce34
FIX: shortcut typo (#24731) 2023-12-05 17:17:04 -05:00
Kris
3a98474983
A11Y: allow tab titles to use default translation (#24727) 2023-12-05 17:16:56 -05:00
dependabot[bot]
c4cc738d0a
Build(deps): Bump json from 2.6.3 to 2.7.1 (#24729)
Bumps [json](https://github.com/flori/json) from 2.6.3 to 2.7.1.
- [Release notes](https://github.com/flori/json/releases)
- [Changelog](https://github.com/flori/json/blob/master/CHANGES.md)
- [Commits](https://github.com/flori/json/compare/v2.6.3...v2.7.1)

---
updated-dependencies:
- dependency-name: json
  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-12-05 22:59:08 +01:00
dependabot[bot]
e305e7e218
Build(deps): Bump cgi from 0.4.0 to 0.4.1 (#24728)
Bumps [cgi](https://github.com/ruby/cgi) from 0.4.0 to 0.4.1.
- [Release notes](https://github.com/ruby/cgi/releases)
- [Commits](https://github.com/ruby/cgi/compare/v0.4.0...v0.4.1)

---
updated-dependencies:
- dependency-name: cgi
  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-12-05 22:58:57 +01:00
Jordan Vidrine
bdecb23fd4
UX: More adjustments (#24726) 2023-12-05 14:55:08 -06:00
Kris
b65f281842
FIX: escape category description text (#24724) 2023-12-05 15:48:13 -05:00
Mark VanLandingham
d4c02d738b
DEV: Add topicNotificationLevel fn to post model (#24723) 2023-12-05 12:08:29 -06:00
David Taylor
a5fc8f3253
FIX: Account activation under ember-5 build (#24722)
We were previously relying on Ember's 'vendor' bundle to make the jquery global available on the activate_account route. That no longer happens under our Ember 5 build.

This commit updates our activate-account script to remove the need for jquery, so that it works under both Ember 3 and Ember 5 builds.
2023-12-05 17:49:40 +00:00
Isaac Janzen
6aeddad333
DEV: Add search-menu-before-advanced-search plugin outlet (#24720) 2023-12-05 10:08:27 -07:00
Bianca Nenciu
8fb5b1fe7c
DEV: Fix assertion in embedding test (#24694)
The modified test used to be the same as the test above. The bad test
was introduced in commit 77d4c4d8dc,
during a refactoring.

This was not a serious problem because the same behavior was still
tested partially by the other tests below.
2023-12-05 18:30:52 +02:00
David Taylor
863c0cdecc
FIX: Ensure slugless topic URLs are correctly redirected (#24719)
Using `DiscourseURL.routeTo` with `replaceURL: true` wouldn't cause a true Ember redirect. That meant that the transition source would be be replaced in the browser's history stack, and the 'back' button wouldn't work as expected. Instead, we can use the router service to perform a proper redirect.
2023-12-05 15:37:01 +00:00
Discourse Translator Bot
cae2b83af8
Update translations (#24716) 2023-12-05 14:39:08 +01:00
chapoi
ad77a6876c
UX: fix alignment (#24718) 2023-12-05 14:19:21 +01:00
chapoi
3d710fa0b8
UX:; scope details change (#24715) 2023-12-05 13:56:17 +01:00
Daniel Waterworth
a6c79aa27a
DEV: Fix readonly admin login spec (#24714)
"prevents login by admins" should test with an admin.
2023-12-05 06:49:22 -06:00
Joffrey JAFFEUX
c5aa6b5e16
FIX: correctly update replies_count on chat_threads (#24711)
The previous query would look at the existing messages, count them, and update the associated thread.

But, if for some reason messages were **ALL** deleted without updating the `replies_count`, then the query wouldn't find any message, and wouldn't update any thread's `replies_count`.
2023-12-05 13:46:58 +01:00
chapoi
707acbe696
UX: details tag background colour (#24710) 2023-12-05 12:52:00 +01:00
Joffrey JAFFEUX
094d597ec8
FIX: increments message version when processed (#24713)
Incrementing version, ensures the message will re-play decorators.

Also removes a debugging line which had been forgotten.
2023-12-05 12:34:19 +01:00
dependabot[bot]
9362949687
Build(deps): Bump regexp_parser from 2.8.2 to 2.8.3 (#24701)
Bumps [regexp_parser](https://github.com/ammar/regexp_parser) from 2.8.2 to 2.8.3.
- [Changelog](https://github.com/ammar/regexp_parser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ammar/regexp_parser/compare/v2.8.2...v2.8.3)

---
updated-dependencies:
- dependency-name: regexp_parser
  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-12-05 11:50:48 +01:00
dependabot[bot]
9a10f9d240
Build(deps): Bump terser from 5.24.0 to 5.25.0 in /app/assets/javascripts (#24703)
* Build(deps): Bump terser in /app/assets/javascripts

Bumps [terser](https://github.com/terser/terser) from 5.24.0 to 5.25.0.
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/compare/v5.24.0...v5.25.0)

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

Signed-off-by: dependabot[bot] <support@github.com>

* Update lockfiles for ember version flag

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: discoursebuild <build@discourse.org>
2023-12-05 11:50:29 +01:00
Joffrey JAFFEUX
c6ee647b12
DEV: skip failing spec du to refactoring modal for now (#24712) 2023-12-05 11:47:39 +01:00
Ted Johansson
c7667f791e
DEV: Fix chat notifier deprecation warnings from job arguments (#24708)
We're seeing some deprecation warnings in production. This is because we're passing a raw Ruby timestamp, which gets stringified implicitly when written to Redis. As per #15842, this conversion needs to be done explicitly.
2023-12-05 18:03:30 +08:00