Commit Graph

52145 Commits

Author SHA1 Message Date
bf48e14687 FIX: Move the search-menu-results-top plugin outlet (#24774)
The `search-menu-results-top` plugin outlet was not positioned at the top of `results` as expected. Additionally, the expected outlet arguments that existed in the "widget implementation" were not available on the glimmer search menu.
2023-12-07 12:36:39 -07:00
ddf3c571cf FIX: Prevent error when poster isn't present in message notification item (#24776) 2023-12-07 13:21:45 -06:00
9de0626356 FIX: Table builder spec (#24775) 2023-12-07 11:15:26 -08:00
ee05f57e2d FEATURE: Site setting to display user avatars in user menu (#24514) 2023-12-07 11:30:44 -06:00
e4c373194d DEV: Refactor Wizard components (#24770)
This commit refactors the Wizard component code in preparation for moving it to the 'static' directory for Embroider route-splitting. It also includes a number of general improvements and simplifications.

Extracted from https://github.com/discourse/discourse/pull/23678

Co-authored-by: Godfrey Chan <godfreykfc@gmail.com>
2023-12-07 16:33:38 +00:00
0139481188 UX: move monospace font to variable (#24762) 2023-12-07 09:51:14 -05:00
001d2176e5 UX: minor fixes in topic action modal (#24772) 2023-12-07 14:54:56 +01:00
edf074bf78 DEV: Only enable minio for core system tests (#24642)
Why this change?

Let's us not run stuff when we don't need it.
2023-12-07 13:46:14 +10:00
7d4fd19696 DEV: revert bg color from --tertiary-very-low to --tertiary-low (#24764) 2023-12-06 20:07:01 -07:00
7aab65887f UX: Fix edit navigation tags modal height too long on desktop (#24765)
Why this change?

The tags modal loads more tags via infinite loading based on when the last tag in the
given page appears in the viewport for the user. When it comes in to
view, a request is then triggered to fetch additional tags. To ensure
that we are only loading a single page of tags each time the modal is
opened, we previously set a max height on the modal's body to ensure
that the last tag which appears in the modal will be outside of the view
port in the initial load. However, this has regressed recently due to
unknown reasons and resulted in multiple pages of tags being loaded
immediately from the server as the modal's height was not restricted.
This regression was caught by an existing test but was unfortunately
determined as flaky.

What does this change do?

This change restores the max height on the edit navigation menu tags
modal on dekstop.
2023-12-07 09:42:04 +08:00
1a8b1fc698 DEV: Bump rswag-specs from 2.11.0 to 2.13.0 (#24654) 2023-12-07 08:16:47 +08:00
a192ae4c15 FIX: Ensure bulk select toggle appears for non-admin on new/unread (#24763)
TopicList is a classic component, so we need to use `.get()` for the argument to be autotracked in a native getter 😢
2023-12-06 23:55:41 +00:00
7afb5fc481 DEV: Use Discourse::SYSTEM_USER_ID in fixtures/009_users (#24743)
I couldn't find where we created the system user and
this is why -- everywhere else in the app we reference
SYSTEM_USER_ID but here.
2023-12-07 09:04:45 +10:00
c197f8c6ee UX: make github onebox styles more responsive (#24761) 2023-12-06 17:45:56 -05:00
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
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
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
8623631a06 DEV: Fix random typos (#24756) 2023-12-06 22:25:26 +01:00
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
42a75e3df9 FIX: saving tag changes without description (#24753) 2023-12-06 14:17:56 -05:00
48ec946702 UX: Restore category badge colours on 404 page (#24754) 2023-12-06 17:49:19 +00:00
42e5bbaf38 UX: fix double-scrollbar in keyboard-shortcuts-modal (#24751) 2023-12-06 17:12:14 +01:00
22bb1c8951 UX: improve poll text wrap (#24732) 2023-12-06 10:58:06 -05:00
efcb5bb3df DEV: Plugin outlet around user menu empty state (#24730) 2023-12-06 08:06:50 -06:00
6a66dc1cfb DEV: Fix Lint/BooleanSymbol (#24747) 2023-12-06 13:19:09 +01:00
138bf486d3 DEV: Fix Lint/DuplicateMethods (#24746) 2023-12-06 13:18:34 +01:00
4280c01153 DEV: Fix Lint/ShadowedArgument (#24733) 2023-12-06 13:16:10 +01:00
1e471f7ec2 FIX: Handle 404 correctly when transition has no path (#24748) 2023-12-06 12:12:19 +00:00
f7c514dc99 DEV: Add ember-5 to test matrix for core/chat system specs (#24721) 2023-12-06 12:12:04 +00:00
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
78c2f116e0 DEV: skip flaky upload spec for large image thumbnails (#24745) 2023-12-06 19:08:56 +08:00
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
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
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 9057272ee242b3bc977e50977b4142066c36c05d.

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

This reverts commit a5d4bf6dd28a8304ccd519536f33bd4a13232ed4.

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

This reverts commit 77b6a038bae010c9e9e630a137f9ccd570f60784.

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

This reverts commit de983796e1b66aa2ab039a4fb6e32cec8a65a098.
2023-12-06 16:37:32 +10:00
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
9057272ee2 FIX: Use Guardian.basic_user instead of new (anon) (#24705)
c.f. de983796e1b66aa2ab039a4fb6e32cec8a65a098

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
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
a5d4bf6dd2 DEV: Remove unnecessary method_missing from GuardianUser (#24735)
Followup to 77b6a038bae010c9e9e630a137f9ccd570f60784, this
was a mistake and should have been removed before merge.
2023-12-06 11:24:19 +10:00
3141994e38 FIX: Add checkbox-label to notification bulk actions (#24734)
Followup to c80b5b718c2e3dee70b7ad70c32b22b078080efe
2023-12-06 11:22:48 +10:00
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
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
4ad6c9ce34 FIX: shortcut typo (#24731) 2023-12-05 17:17:04 -05:00
3a98474983 A11Y: allow tab titles to use default translation (#24727) 2023-12-05 17:16:56 -05:00
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
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
bdecb23fd4 UX: More adjustments (#24726) 2023-12-05 14:55:08 -06:00
b65f281842 FIX: escape category description text (#24724) 2023-12-05 15:48:13 -05:00
d4c02d738b DEV: Add topicNotificationLevel fn to post model (#24723) 2023-12-05 12:08:29 -06:00
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
6aeddad333 DEV: Add search-menu-before-advanced-search plugin outlet (#24720) 2023-12-05 10:08:27 -07:00