From d9af873f0d9adc03bc7b68a5b0fa18fae1ca06e9 Mon Sep 17 00:00:00 2001 From: Martin Brennan Date: Thu, 12 Sep 2024 16:44:12 +1000 Subject: [PATCH] UX: Fix confusing "claim reviewable" positioning (#28870) Previously for reviewables that could be claimed, we positioned the "you can claim / you must claim" message and button underneath the "Is there something wrong with this post?" message but _before_ the reviewable action buttons like Yes/No/Ignore. This was a confusing flow. This commit fixes the issue, and also makes it so if claiming is required and the reviewable has not been claimed, we don't show the "Is there something wrong with this post?" which was showing with no buttons. --- .../app/components/reviewable-item.hbs | 41 ++++++++++--------- .../app/components/reviewable-item.js | 32 +++++++++++++-- .../stylesheets/common/base/reviewables.scss | 3 +- 3 files changed, 52 insertions(+), 24 deletions(-) diff --git a/app/assets/javascripts/discourse/app/components/reviewable-item.hbs b/app/assets/javascripts/discourse/app/components/reviewable-item.hbs index ef65029ffda..fbe2b07647f 100644 --- a/app/assets/javascripts/discourse/app/components/reviewable-item.hbs +++ b/app/assets/javascripts/discourse/app/components/reviewable-item.hbs @@ -70,25 +70,7 @@ {{/if}}
- {{#if this.reviewable.last_performing_username}} -
{{html-safe - (i18n - "review.stale_help" - username=this.reviewable.last_performing_username - ) - }}
- {{else}} - {{#if this.claimEnabled}} -
- {{html-safe this.claimHelp}} - -
- {{/if}} - + {{#unless this.reviewable.last_performing_username}} {{#if this.canPerform}} {{#if this.editing}} {{html-safe + (i18n + "review.stale_help" + username=this.reviewable.last_performing_username + ) + }}
+ {{else}} + {{#if this.claimEnabled}} +
+ {{html-safe this.claimHelp}} + +
+ {{/if}} {{/if}} +