From aba96f039fc323b1eb0753b97a4a7925f17389bc Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Fri, 11 Oct 2019 13:22:53 +0200 Subject: [PATCH] Add specific "no issues" message if the user has no edits Don't use "other features" language since "my edits" validation checks are no longer per-feature --- data/core.yaml | 5 +++-- dist/locales/en.json | 7 ++++--- modules/ui/issues.js | 10 +++++++--- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/data/core.yaml b/data/core.yaml index d6834bd83..cb4fb98f9 100644 --- a/data/core.yaml +++ b/data/core.yaml @@ -1325,11 +1325,12 @@ en: everything_in_view: Everything in view looks fine edits: Your edits look fine edits_in_view: Your edits in view look fine + no_edits: You have no edits yet hidden_issues: none: Detected issues will appear here elsewhere: "Issues elsewhere: {count}" - other_features: "Issues with other features: {count}" - other_features_elsewhere: "Issues elsewhere with other features: {count}" + everything_else: "Issues with everything else: {count}" + everything_else_elsewhere: "Issues elsewhere with everything else: {count}" disabled_rules: "Issues with disabled rules: {count}" disabled_rules_elsewhere: "Issues elsewhere with disabled rules: {count}" ignored_issues: "Ignored issues: {count}" diff --git a/dist/locales/en.json b/dist/locales/en.json index b1c07372b..f39c6a0aa 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -1626,13 +1626,14 @@ "everything": "Everything looks fine", "everything_in_view": "Everything in view looks fine", "edits": "Your edits look fine", - "edits_in_view": "Your edits in view look fine" + "edits_in_view": "Your edits in view look fine", + "no_edits": "You have no edits yet" }, "hidden_issues": { "none": "Detected issues will appear here", "elsewhere": "Issues elsewhere: {count}", - "other_features": "Issues with other features: {count}", - "other_features_elsewhere": "Issues elsewhere with other features: {count}", + "everything_else": "Issues with everything else: {count}", + "everything_else_elsewhere": "Issues elsewhere with everything else: {count}", "disabled_rules": "Issues with disabled rules: {count}", "disabled_rules_elsewhere": "Issues elsewhere with disabled rules: {count}", "ignored_issues": "Ignored issues: {count}", diff --git a/modules/ui/issues.js b/modules/ui/issues.js index 2fc496af7..e78cea04e 100644 --- a/modules/ui/issues.js +++ b/modules/ui/issues.js @@ -422,9 +422,9 @@ export function uiIssues(context) { checkForHiddenIssues({ elsewhere: { what: 'edited', where: 'all' }, - other_features: { what: 'all', where: 'visible' }, + everything_else: { what: 'all', where: 'visible' }, disabled_rules: { what: 'edited', where: 'visible', includeDisabledRules: 'only' }, - other_features_elsewhere: { what: 'all', where: 'all' }, + everything_else_elsewhere: { what: 'all', where: 'all' }, disabled_rules_elsewhere: { what: 'edited', where: 'all', includeDisabledRules: 'only' }, ignored_issues: { what: 'edited', where: 'visible', includeIgnored: 'only' }, ignored_issues_elsewhere: { what: 'edited', where: 'all', includeIgnored: 'only' } @@ -435,7 +435,7 @@ export function uiIssues(context) { messageType = 'edits'; checkForHiddenIssues({ - other_features: { what: 'all', where: 'all' }, + everything_else: { what: 'all', where: 'all' }, disabled_rules: { what: 'edited', where: 'all', includeDisabledRules: 'only' }, ignored_issues: { what: 'edited', where: 'all', includeIgnored: 'only' } }); @@ -461,6 +461,10 @@ export function uiIssues(context) { }); } + if (_options.what === 'edited' && context.history().difference().summary().length === 0) { + messageType = 'no_edits'; + } + _pane.select('.issues-none .message') .text(t('issues.no_issues.message.' + messageType));