From 84cbd83d36c7f5937f740f985283d8c126099c18 Mon Sep 17 00:00:00 2001 From: xnorly <90561547+xnorly@users.noreply.github.com> Date: Wed, 2 Mar 2022 08:15:43 +0100 Subject: [PATCH] trying to improve the filtering options for target validators (#7080) * removing redundant word 'only' When applying a filtering option, it is obvious that the resulting list will ONLY contain items that passed the filter. The remaining filtering options don't make use of the word 'only', o why use it here?. * positive wording These filtering options contain the word 'no' and may sound negative. Changing them slightly to achieve positive wording may improve UX. * The label 'single from operator' may sound unclear, especially for new users. Maybe being a bit more descriptive with 'one validator per operator' could help. --- packages/page-staking/src/Filtering.tsx | 2 +- packages/page-staking/src/Targets/index.tsx | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/page-staking/src/Filtering.tsx b/packages/page-staking/src/Filtering.tsx index f2090b26c8..f6f87a9e1e 100644 --- a/packages/page-staking/src/Filtering.tsx +++ b/packages/page-staking/src/Filtering.tsx @@ -52,7 +52,7 @@ function Filtering ({ children, className, nameFilter, setNameFilter, setWithIde {api.query.identity && ( ('only with an identity')} + label={t('with an identity')} onChange={setWithIdentity} value={withIdentity} /> diff --git a/packages/page-staking/src/Targets/index.tsx b/packages/page-staking/src/Targets/index.tsx index 6d4ba1434e..831e572247 100644 --- a/packages/page-staking/src/Targets/index.tsx +++ b/packages/page-staking/src/Targets/index.tsx @@ -310,7 +310,7 @@ function Targets ({ className = '', isInElection, ownStashes, targets: { avgStak > ('single from operator')} + label={t('one validator per operator')} onChange={setToggle.withGroup} value={toggles.withGroup} /> @@ -318,8 +318,8 @@ function Targets ({ className = '', isInElection, ownStashes, targets: { avgStak className='staking--buttonToggle' label={ MAX_COMM_PERCENT > 0 - ? t('no {{maxComm}}%+ comm', { replace: { maxComm: MAX_COMM_PERCENT } }) - : t('no median+ comm') + ? t('comm. < {{maxComm}}%', { replace: { maxComm: MAX_COMM_PERCENT } }) + : t('comm. < median') } onChange={setToggle.withoutComm} value={toggles.withoutComm} @@ -328,8 +328,8 @@ function Targets ({ className = '', isInElection, ownStashes, targets: { avgStak className='staking--buttonToggle' label={ MAX_CAP_PERCENT < 100 - ? t('no {{maxCap}}%+ capacity', { replace: { maxCap: MAX_CAP_PERCENT } }) - : t('no at capacity') + ? t('capacity < {{maxCap}}%', { replace: { maxCap: MAX_CAP_PERCENT } }) + : t('with capacity') } onChange={setToggle.withoutOver} value={toggles.withoutOver} @@ -345,7 +345,7 @@ function Targets ({ className = '', isInElection, ownStashes, targets: { avgStak )} ('only elected')} + label={t('currently elected')} onChange={setToggle.withElected} value={toggles.withElected} />