diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 45f606db8ca69..4cbc1dd85a8fb 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -265,8 +265,7 @@ jobs: env: CHECKOUT_TIMEOUT: 10 run: | - GLOBIGNORE="plugins/chat/*"; - LOAD_PLUGINS=1 RAILS_ENABLE_TEST_LOG=1 RAILS_TEST_LOG_LEVEL=error bin/turbo_rspec --use-runtime-info --profile=50 --verbose --format documentation plugins/*/spec/system + LOAD_PLUGINS=1 RAILS_ENABLE_TEST_LOG=1 RAILS_TEST_LOG_LEVEL=error bin/turbo_rspec --exclude-pattern="plugins/chat/*" --use-runtime-info --profile=50 --verbose --format documentation plugins/*/spec/system shell: bash timeout-minutes: 30 diff --git a/Gemfile.lock b/Gemfile.lock index 3c2866ad51dc7..a09fe1a025cb2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -220,7 +220,7 @@ GEM rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) literate_randomizer (0.4.0) - logger (1.6.5) + logger (1.7.0) lograge (0.14.0) actionpack (>= 4) activesupport (>= 4) @@ -413,7 +413,7 @@ GEM io-console (~> 0.5) request_store (1.7.0) rack (>= 1.4) - rexml (3.4.0) + rexml (3.4.1) rinku (2.0.6) rotp (6.3.0) rouge (4.5.1) @@ -513,9 +513,9 @@ GEM sassc-embedded (1.77.7) sass-embedded (~> 1.77) securerandom (0.4.1) - selenium-devtools (0.132.0) + selenium-devtools (0.135.0) selenium-webdriver (~> 4.2) - selenium-webdriver (4.28.0) + selenium-webdriver (4.31.0) base64 (~> 0.2) logger (~> 1.4) rexml (~> 3.2, >= 3.2.5) diff --git a/app/assets/javascripts/admin/addon/components/admin-site-settings-filter-controls.gjs b/app/assets/javascripts/admin/addon/components/admin-site-settings-filter-controls.gjs index 39818db2413f7..73d837d95551e 100644 --- a/app/assets/javascripts/admin/addon/components/admin-site-settings-filter-controls.gjs +++ b/app/assets/javascripts/admin/addon/components/admin-site-settings-filter-controls.gjs @@ -6,7 +6,6 @@ import { action } from "@ember/object"; import didInsert from "@ember/render-modifiers/modifiers/did-insert"; import didUpdate from "@ember/render-modifiers/modifiers/did-update"; import DButton from "discourse/components/d-button"; -import autoFocus from "discourse/modifiers/auto-focus"; import { i18n } from "discourse-i18n"; export default class AdminSiteSettingsFilterControls extends Component { @@ -72,7 +71,6 @@ export default class AdminSiteSettingsFilterControls extends Component { {{/if}} {{/each}} {{#if this.category.hasMore}} - {{#if this.currentUser.use_admin_sidebar}} -

{{i18n - "admin.site_settings.more_site_setting_results_no_category_sidebar" - count=this.category.maxResults - }}

- {{else}} -

{{i18n - "admin.site_settings.more_site_setting_results" - count=this.category.maxResults - }}

- {{/if}} +

{{i18n + "admin.site_settings.more_site_setting_results" + count=this.category.maxResults + }}

{{/if}} {{else}} diff --git a/app/assets/javascripts/admin/addon/templates/site-settings.hbs b/app/assets/javascripts/admin/addon/templates/site-settings.hbs index e7da32e1c7722..4b4b33d6b45eb 100644 --- a/app/assets/javascripts/admin/addon/templates/site-settings.hbs +++ b/app/assets/javascripts/admin/addon/templates/site-settings.hbs @@ -19,39 +19,32 @@ @onToggleMenu={{this.toggleMenu}} /> -{{#if this.showSettingCategorySidebar}} -
-
-{{/if}} + {{category.name}} + {{#if category.count}} + ({{category.count}}) + {{/if}} + + + {{/each}} + + -
+
{{outlet}}
diff --git a/app/assets/javascripts/discourse/app/components/post-list/item/details.gjs b/app/assets/javascripts/discourse/app/components/post-list/item/details.gjs index d4699c0edbc18..a59644a0136eb 100644 --- a/app/assets/javascripts/discourse/app/components/post-list/item/details.gjs +++ b/app/assets/javascripts/discourse/app/components/post-list/item/details.gjs @@ -115,7 +115,7 @@ export default class PostListItemDetails extends Component { {{! diff --git a/app/assets/javascripts/discourse/app/components/post/menu.gjs b/app/assets/javascripts/discourse/app/components/post/menu.gjs index c1957880475da..f6d79764aa566 100644 --- a/app/assets/javascripts/discourse/app/components/post/menu.gjs +++ b/app/assets/javascripts/discourse/app/components/post/menu.gjs @@ -15,7 +15,10 @@ import SmallUserList, { import UserTip from "discourse/components/user-tip"; import concatClass from "discourse/helpers/concat-class"; import DAG from "discourse/lib/dag"; -import { applyMutableValueTransformer } from "discourse/lib/transformer"; +import { + applyMutableValueTransformer, + applyValueTransformer, +} from "discourse/lib/transformer"; import { i18n } from "discourse-i18n"; import PostMenuButtonConfig from "./menu/button-config"; import PostMenuButtonWrapper from "./menu/button-wrapper"; @@ -81,7 +84,11 @@ export default class PostMenu extends Component { @service siteSettings; @service store; - @tracked collapsed = true; // TODO (glimmer-post-menu): Some plugins will need a value transformer + @tracked collapsed = applyValueTransformer( + "post-menu-collapsed", + true, + this.#prepareStaticMethodsState({ collapsed: true }) + ); @tracked isWhoLikedVisible = false; @tracked likedUsers = []; @tracked totalLikedUsers; @@ -113,23 +120,7 @@ export default class PostMenu extends Component { @cached get staticMethodsState() { - return Object.freeze({ - canCreatePost: this.args.canCreatePost, - collapsed: this.collapsed, - currentUser: this.currentUser, - filteredRepliesView: this.args.filteredRepliesView, - isWhoLikedVisible: this.isWhoLikedVisible, - isWhoReadVisible: this.isWhoReadVisible, - isWikiMode: this.isWikiMode, - repliesShown: this.args.repliesShown, - replyDirectlyBelow: - this.args.nextPost?.reply_to_post_number === - this.args.post.post_number && - this.args.post.post_number !== this.args.post.filteredRepliesPostNumber, - showReadIndicator: this.args.showReadIndicator, - suppressReplyDirectlyBelow: - this.siteSettings.suppress_reply_directly_below, - }); + return this.#prepareStaticMethodsState(); } @cached @@ -205,6 +196,8 @@ export default class PostMenu extends Component { // map to keep track of the labels that should be shown for each button if the plugins wants to override the default const buttonLabels = new Map(); + // map to keep track of the collapsed state of each button if the plugins wants to override the default + const collapsedButtons = new Map(); const showMoreButtonPosition = configuredItems.indexOf( buttonKeys.SHOW_MORE @@ -232,6 +225,17 @@ export default class PostMenu extends Component { return buttonLabels.delete(key); }, }, + collapsedButtons: { + hide(key) { + collapsedButtons.set(key, true); + }, + show(key) { + collapsedButtons.set(key, false); + }, + default(key) { + return collapsedButtons.delete(key); + }, + }, buttonKeys, firstButtonKey: this.configuredItems[0], lastHiddenButtonKey: hiddenButtonKeys.length @@ -254,6 +258,7 @@ export default class PostMenu extends Component { key, Component: ButtonComponent, apiAdded: addedKeys.has(key), // flag indicating if the button was added using the API + hidden: collapsedButtons.get(key), owner: getOwner(this), // to be passed as argument to the static methods position, replacementMap, @@ -571,6 +576,26 @@ export default class PostMenu extends Component { this.isWhoReadVisible = true; } + #prepareStaticMethodsState({ collapsed } = {}) { + return Object.freeze({ + canCreatePost: this.args.canCreatePost, + collapsed: collapsed ?? this.collapsed, + currentUser: this.currentUser, + filteredRepliesView: this.args.filteredRepliesView, + isWhoLikedVisible: this.isWhoLikedVisible, + isWhoReadVisible: this.isWhoReadVisible, + isWikiMode: this.isWikiMode, + repliesShown: this.args.repliesShown, + replyDirectlyBelow: + this.args.nextPost?.reply_to_post_number === + this.args.post.post_number && + this.args.post.post_number !== this.args.post.filteredRepliesPostNumber, + showReadIndicator: this.args.showReadIndicator, + suppressReplyDirectlyBelow: + this.siteSettings.suppress_reply_directly_below, + }); + } +