diff --git a/css/80_app.css b/css/80_app.css index 1d2844427..dcaa8ee16 100644 --- a/css/80_app.css +++ b/css/80_app.css @@ -420,72 +420,84 @@ button.secondary-action { /* Icons ------------------------------------------------------- */ +/* + Unfortunately our icons in the rapid spritesheet are inconsistent. + They should really fill the viewbox, but they generally take up + less space than that. This is why they default size them to 20px. + The icons we use from FontAwesome are consistent and use the entire + viewbox, so we default size them at 16px. +*/ .icon { - vertical-align: middle; - width: 20px; - height: 20px; + vertical-align: middle; + width: 20px; + height: 20px; +} +.icon.icon-fas { + width: 16px; + height: 16px; + margin: 2px; } .icon.operation use { - fill: #222; - color: #79f; + fill: #222; + color: #79f; } button.disabled .icon.operation use, .icon.operation.disabled use { - fill: rgba(32,32,32,.2); - color: rgba(40,40,40,.2); + fill: rgba(32,32,32,.2); + color: rgba(40,40,40,.2); } .icon.monochrome use { - fill: currentColor; + fill: currentColor; } .icon.inline { - vertical-align: text-top; - display: inline-block; - width: 1.17em; - height: 1.17em; - margin: 0px 3px; + vertical-align: text-top; + display: inline-block; + width: 1.17em; + height: 1.17em; + margin: 0px 3px; } .icon.pre-text { - margin-right: 5px; + margin-right: 5px; } .ideditor[dir='rtl'] .icon.pre-text { - margin-left: 5px; - margin-right: 0; + margin-left: 5px; + margin-right: 0; } .icon.pre-text.user-icon { - margin-left: 5px; - margin-right: 5px; + margin-left: 5px; + margin-right: 5px; } .icon.light { - color: #fff; - fill: currentColor; + color: #fff; + fill: currentColor; } .icon.created { - color: #00ca07; + color: #00ca07; } .icon.modified { - color: #666; + color: #666; } .icon.deleted { - color: #ea0000; + color: #ea0000; } .user-icon { - max-height: 20px; - max-width: 20px; - height: auto; - width: auto; - border-radius: 3px; + max-height: 20px; + max-width: 20px; + height: auto; + width: auto; + border-radius: 3px; } .icon-annotation { - color: #333; - vertical-align: baseline; + color: #333; + vertical-align: baseline; } @@ -3209,195 +3221,250 @@ div.full-screen > button:focus { /* Issues ------------------------------------------------------- */ .issue { - overflow: hidden; + overflow: hidden; } .issue .issue-label, .issue-label .issue-text { - width: 100%; - display: flex; - flex-flow: row nowrap; - cursor: pointer; - text-align: initial; - background: none; + width: 100%; + display: flex; + flex-flow: row nowrap; + cursor: pointer; + text-align: initial; + background: none; } .issue-text .issue-icon { - flex: 0 0 auto; - padding: 2px 3px; + flex: 0 0 auto; + padding: 2px 4px; +} +.issue-container .issue-text .issue-icon { + padding: 2px 6px; } .issue-text .issue-message { - flex: 1 1 auto; - padding: 4px 5px; + flex: 1 1 auto; + padding: 4px 5px; } .issue-label .issue-autofix { - flex: 0 0 auto; - padding: 5px 8px; + flex: 0 0 auto; + padding: 5px 8px; } .issue-label .issue-info-button { - height: unset; - width: 32px; - flex: 0 0 auto; - border-left: 1px solid #ccc; - background-color: rgba(0,0,0,0); + height: unset; + width: 32px; + flex: 0 0 auto; + border-left: 1px solid #ccc; + background-color: rgba(0,0,0,0); } .ideditor[dir='rtl'] .issue-label .issue-info-button { - border-left: 0; - border-right: 1px solid #ccc; + border-left: 0; + border-right: 1px solid #ccc; } .issue-container .issue-label .issue-info-button .icon { - opacity: 0.5; + opacity: 0.5; } .issue-container.active .issue-label .issue-info-button .icon { - opacity: 0.7; + opacity: 0.7; } .issue-label .issue-info-button:last-child { - border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; } .ideditor[dir='rtl'] .issue-label .issue-info-button:last-child { - border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; } button.autofix.action { - flex: 0 0 20px; - height: 20px; - width: 20px; - background: #7092ff; - color: #fff; - padding: 0; + flex: 0 0 20px; + height: 20px; + width: 20px; + background: #7092ff; + color: #fff; + padding: 0; } button.autofix.action:focus, button.autofix.action:active, button.autofix.action.active { - background: #597be7; + background: #597be7; } @media (hover: hover) { - button.autofix.action:hover { - background: #597be7; - } + button.autofix.action:hover { + background: #597be7; + } } /* fix all */ .autofix-all { - display: flex; - flex-flow: row nowrap; - justify-content: flex-end; - margin-top: -25px; - padding-bottom: 5px; + display: flex; + flex-flow: row nowrap; + justify-content: flex-end; + margin-top: -25px; + padding-bottom: 5px; } .autofix-all-link-text { - padding: 0; + padding: 0; } .autofix-all-link-icon svg { - margin: 0 9px; - background: currentColor; - border-radius: 4px; + margin: 0 9px; + background: currentColor; + border-radius: 4px; } .autofix-all-link-icon svg use { - color: #fff; + color: #fff; +} + +/* error styles */ +.error-list, +.error-list *, +.issue-container.active .issue.severity-error, +.issue-container.active .issue.severity-error * { + border-color: #f77; +} + +.error-list .issue.severity-error .issue-label, +.issue.severity-error .issue-fix-list, +.error-section { + background: #ffd6d6; +} + +.issue-container.active .issue.severity-error .issue-label { + background: #ffc6c6; +} + +.issue.severity-error .issue-fix-item button.actionable, +.issue-container.active .issue.severity-error .issue-info-button { + color: #b91201; + fill: #b91201; +} +.issue.severity-error .issue-icon { + color: #dd1400; +} +.error-list .issue.severity-error .issue-label:active, +.error-list .issue.severity-error .issue-label:focus, +.issue.severity-error .issue-fix-item button.actionable:active, +.issue.severity-error .issue-fix-item button.actionable:focus { + background: #ffb6b6; +} +.issue.severity-error .issue-fix-item button.actionable:active, +.issue.severity-error .issue-fix-item button.actionable:focus, +.issue-container.active .issue.severity-error .issue-info-button:active, +.issue-container.active .issue.severity-error .issue-info-button:focus { + color: #840c00; + fill: #840c00; +} +@media (hover: hover) { + .error-list .issue.severity-error .issue-label:hover, + .issue.severity-error .issue-fix-item button.actionable:hover { + background: #ffb6b6; + } + .issue.severity-error .issue-fix-item button.actionable:hover, + .issue-container.active .issue.severity-error .issue-info-button:hover { + color: #840c00; + fill: #840c00; + } } /* warning styles */ -.warnings-list, -.warnings-list *, +.warning-list, +.warning-list *, .issue-container.active .issue.severity-warning, .issue-container.active .issue.severity-warning * { - border-color: #fb2; + border-color: #fb2; } -.warnings-list .issue.severity-warning .issue-label, +.warning-list .issue.severity-warning .issue-label, .issue.severity-warning .issue-fix-list, .warning-section { - background: #ffc; + background: #ffc; } .issue-container.active .issue.severity-warning .issue-label { - background: #ffa; + background: #ffa; } .issue.severity-warning .issue-icon { - color: #f90; + color: #f90; } .issue.severity-warning .issue-fix-item button.actionable, .issue-container.active .issue.severity-warning .issue-info-button { - color: #b15500; - fill: #b15500; + color: #b15500; + fill: #b15500; } -.warnings-list .issue.severity-warning .issue-label:active, -.warnings-list .issue.severity-warning .issue-label:focus, +.warning-list .issue.severity-warning .issue-label:active, +.warning-list .issue.severity-warning .issue-label:focus, .issue.severity-warning .issue-fix-item button.actionable:active, .issue.severity-warning .issue-fix-item button.actionable:focus { - background: #ff8; + background: #fafa30; } .issue.severity-warning .issue-fix-item button.actionable:active, .issue.severity-warning .issue-fix-item button.actionable:focus, .issue-container.active .issue.severity-warning .issue-info-button:active, .issue-container.active .issue.severity-warning .issue-info-button:focus { - color: #7f3d00; - fill: #7f3d00; + color: #7f3d00; + fill: #7f3d00; } @media (hover: hover) { - .warnings-list .issue.severity-warning .issue-label:hover, - .issue.severity-warning .issue-fix-item button.actionable:hover { - background: #ff8; - } - .issue.severity-warning .issue-fix-item button.actionable:hover, - .issue-container.active .issue.severity-warning .issue-info-button:hover { - color: #7f3d00; - fill: #7f3d00; - } + .warning-list .issue.severity-warning .issue-label:hover, + .issue.severity-warning .issue-fix-item button.actionable:hover { + background: #fafa30; + } + .issue.severity-warning .issue-fix-item button.actionable:hover, + .issue-container.active .issue.severity-warning .issue-info-button:hover { + color: #7f3d00; + fill: #7f3d00; + } } -/* error styles */ -.errors-list, -.errors-list *, -.issue-container.active .issue.severity-error, -.issue-container.active .issue.severity-error * { - border-color: #f77; +/* suggestion styles */ +.suggestion-list, +.suggestion-list *, +.issue-container.active .issue.severity-suggestion, +.issue-container.active .issue.severity-suggestion * { + border-color: #68abab; } -.errors-list .issue.severity-error .issue-label, -.issue.severity-error .issue-fix-list, -.error-section { - background: #ffd6d6; +.suggestion-list .issue.severity-suggestion .issue-label, +.issue.severity-suggestion .issue-fix-list, +.suggestion-section { + background: #c7fafa; } -.issue-container.active .issue.severity-error .issue-label { - background: #ffc6c6; +.issue-container.active .issue.severity-suggestion .issue-label { + background: #c7fafa; } -.issue.severity-error .issue-fix-item button.actionable, -.issue-container.active .issue.severity-error .issue-info-button { - color: #b91201; - fill: #b91201; +.issue.severity-suggestion .issue-icon { + color: #00a7a7; } -.issue.severity-error .issue-icon { - color: #dd1400; + +.issue.severity-suggestion .issue-fix-item button.actionable, +.issue-container.active .issue.severity-suggestion .issue-info-button { + color: #098787; + fill: #098787; } -.errors-list .issue.severity-error .issue-label:active, -.errors-list .issue.severity-error .issue-label:focus, -.issue.severity-error .issue-fix-item button.actionable:active, -.issue.severity-error .issue-fix-item button.actionable:focus { - background: #ffb6b6; +.suggestion-list .issue.severity-suggestion .issue-label:active, +.suggestion-list .issue.severity-suggestion .issue-label:focus, +.issue.severity-suggestion .issue-fix-item button.actionable:active, +.issue.severity-suggestion .issue-fix-item button.actionable:focus { + background: #7cfafa; } -.issue.severity-error .issue-fix-item button.actionable:active, -.issue.severity-error .issue-fix-item button.actionable:focus, -.issue-container.active .issue.severity-error .issue-info-button:active, -.issue-container.active .issue.severity-error .issue-info-button:focus { - color: #840c00; - fill: #840c00; +.issue.severity-suggestion .issue-fix-item button.actionable:active, +.issue.severity-suggestion .issue-fix-item button.actionable:focus, +.issue-container.active .issue.severity-suggestion .issue-info-button:active, +.issue-container.active .issue.severity-suggestion .issue-info-button:focus { + color: #066262; + fill: #066262; } @media (hover: hover) { - .errors-list .issue.severity-error .issue-label:hover, - .issue.severity-error .issue-fix-item button.actionable:hover { - background: #ffb6b6; - } - .issue.severity-error .issue-fix-item button.actionable:hover, - .issue-container.active .issue.severity-error .issue-info-button:hover { - color: #840c00; - fill: #840c00; - } + .suggestion-list .issue.severity-suggestion .issue-label:hover, + .issue.severity-suggestion .issue-fix-item button.actionable:hover { + background: #7cfafa; + } + .issue.severity-suggestion .issue-fix-item button.actionable:hover, + .issue-container.active .issue.severity-suggestion .issue-info-button:hover { + color: #066262; + fill: #066262; + } } @@ -3492,6 +3559,7 @@ input.square-degrees-input { } .section-entity-issues .issue-container.active .issue-label button.issue-text { + align-items: center; font-weight: bold; } .section-entity-issues .issue-container:not(:last-of-type) { @@ -4598,19 +4666,24 @@ li.issue-fix-item button:not(.actionable) .fix-icon { .source-switch a.chip.live { background: #d32232; - color: #fff; } -.feature-warning a.chip { +.filter-info a.chip { background: #1e90ff; } -.issues-info a.chip.resolved-count { - background: #15911e; +.issues-info a.chip.error-count { + background: #d32232; } -.issues-info a.chip.warnings-count { +.issues-info a.chip.warning-count { background: #df8500; } +.issues-info a.chip.suggestion-count { + background: #00a7a7; +} +.issues-info a.chip.resolved-count { + background: #15911e; +} .issues-info > *:not(:last-child), .project-links > *:not(:last-child) { margin-right: 5px; diff --git a/data/core.yaml b/data/core.yaml index a8c2ce723..244ebe13d 100644 --- a/data/core.yaml +++ b/data/core.yaml @@ -1783,13 +1783,10 @@ en: indirect_noedit: "You may not edit indirect restrictions. Instead, edit the nearby direct restriction." issues: title: Issues - list_title: Issues - errors: - list_title: Errors - warnings: - list_title: Warnings - rules: - title: Rules + errors: Errors + warnings: Warnings + suggestions: Suggestions + rules: Rules user_resolved_issues: Issues resolved by your edits warnings_and_errors: Warnings and errors no_issues: @@ -1812,7 +1809,7 @@ en: what: title: "Check:" edited: My Edits - all: "Everything" + all: Everything where: title: "Where:" visible: In View diff --git a/data/l10n/core.en.json b/data/l10n/core.en.json index ec99c5310..4a850d2d3 100644 --- a/data/l10n/core.en.json +++ b/data/l10n/core.en.json @@ -2179,16 +2179,10 @@ }, "issues": { "title": "Issues", - "list_title": "Issues", - "errors": { - "list_title": "Errors" - }, - "warnings": { - "list_title": "Warnings" - }, - "rules": { - "title": "Rules" - }, + "errors": "Errors", + "warnings": "Warnings", + "suggestions": "Suggestions", + "rules": "Rules", "user_resolved_issues": "Issues resolved by your edits", "warnings_and_errors": "Warnings and errors", "no_issues": { diff --git a/modules/core/ValidationSystem.js b/modules/core/ValidationSystem.js index 08a533a87..e21fc822c 100644 --- a/modules/core/ValidationSystem.js +++ b/modules/core/ValidationSystem.js @@ -363,15 +363,34 @@ export class ValidationSystem extends AbstractSystem { * @param {Object} options - see `getIssues` * @return {Object} result like: * { - * error: Array of errors, - * warning: Array of warnings + * error: Array, + * warning: Array, + * suggestion: Array * } */ getIssuesBySeverity(options) { - let groups = utilArrayGroupBy(this.getIssues(options), 'severity'); - groups.error = groups.error ?? []; - groups.warning = groups.warning ?? []; - return groups; + const groups = utilArrayGroupBy(this.getIssues(options), 'severity'); + return { // note, we want them in this order + error: groups.error ?? [], + warning: groups.warning ?? [], + suggestion: groups.suggestion ?? [] + }; + } + + + /** + * getSeverityIcon + * @param {string} severity - one of 'error', 'warning', 'suggestion', or 'resolved' + * @return {string} The name of the icon to use + */ + getSeverityIcon(severity) { + const icons = { + error: '#rapid-icon-error', + warning: '#fas-triangle-exclamation', + suggestion: '#fas-circle-arrow-up', + resolved: '#rapid-icon-apply' + }; + return icons[severity] || '#fas-triangle-exclamation'; } @@ -470,7 +489,7 @@ export class ValidationSystem extends AbstractSystem { * disableRules * Disables given validation rules, * then reruns the validation so that the user sees something happen in the UI - * @param ruleIDs Complete set of rules that should be disabled + * @param {Array} ruleIDs - Complete set of rules that should be disabled */ disableRules(ruleIDs = []) { this._disabledRuleIDs = new Set(ruleIDs); diff --git a/modules/core/lib/ValidationIssue.js b/modules/core/lib/ValidationIssue.js index 25c5df382..12050f899 100644 --- a/modules/core/lib/ValidationIssue.js +++ b/modules/core/lib/ValidationIssue.js @@ -11,7 +11,7 @@ export class ValidationIssue { this.type = props.type; // required - name of rule that created the issue (e.g. 'missing_tag') this.subtype = props.subtype; // optional - category of the issue within the type (e.g. 'relation_type' under 'missing_tag') - this.severity = props.severity; // required - 'warning' or 'error' + this.severity = props.severity; // required - 'warning', 'error', 'suggestion' this.entityIds = props.entityIds; // required - Array of IDs of entities involved in the issue this.loc = props.loc; // optional - [lon, lat] to zoom in on to see the issue this.data = props.data; // optional - object containing extra data for the fixes @@ -44,8 +44,8 @@ export class ValidationIssue { // (bhousel - why is this? so they can use the latest graph?) let fixes = (typeof this.dynamicFixes === 'function') ? this.dynamicFixes() : []; - // For warnings, create an "ignore" option - if (this.severity === 'warning') { + // For minor issues, create an "ignore" option + if (this.severity !== 'error') { const l10n = this.context.systems.l10n; const validator = this.context.systems.validator; diff --git a/modules/ui/UiFilterStatus.js b/modules/ui/UiFilterStatus.js index 2b35db7e6..0c1859447 100644 --- a/modules/ui/UiFilterStatus.js +++ b/modules/ui/UiFilterStatus.js @@ -56,12 +56,12 @@ export class UiFilterStatus { const l10n = context.systems.l10n; // Create/remove wrapper div if necessary - let $wrap = $parent.selectAll('.feature-warning') + let $wrap = $parent.selectAll('.filter-info') .data([0]); const $$wrap = $wrap.enter() .append('div') - .attr('class', 'feature-warning'); + .attr('class', 'filter-info'); const $$chip = $$wrap .append('a') diff --git a/modules/ui/UiValidatorStatus.js b/modules/ui/UiValidatorStatus.js index 67d1c41a7..863bb6ffb 100644 --- a/modules/ui/UiValidatorStatus.js +++ b/modules/ui/UiValidatorStatus.js @@ -68,40 +68,35 @@ export class UiValidatorStatus { // Gather info to display - const warningsItem = { - id: 'warnings', - count: 0, - iconID: 'rapid-icon-alert', - tooltip: this.IssuesTooltip - }; - - const resolvedItem = { - id: 'resolved', - count: 0, - iconID: 'rapid-icon-apply', - tooltip: this.ResolvedTooltip - }; - - const shownItems = []; - const liveIssues = validator.getIssues({ + const chips = []; + const openIssues = validator.getIssuesBySeverity({ what: storage.getItem('validate-what') ?? 'edited', where: storage.getItem('validate-where') ?? 'all' }); - if (liveIssues.length) { - warningsItem.count = liveIssues.length; - shownItems.push(warningsItem); + + for (const [severity, issues] of Object.entries(openIssues)) { + if (issues.length) { + chips.push({ + id: severity, + count: issues.length, + tooltip: this.IssuesTooltip + }); + } } if (storage.getItem('validate-what') === 'all') { const resolvedIssues = validator.getResolvedIssues(); if (resolvedIssues.length) { - resolvedItem.count = resolvedIssues.length; - shownItems.push(resolvedItem); + chips.push({ + id: 'resolved', + count: resolvedIssues.length, + tooltip: this.ResolvedTooltip + }); } } let $chips = $wrap.selectAll('.chip') - .data(shownItems, d => d.id); + .data(chips, d => d.id); $chips.exit() .remove(); @@ -117,7 +112,7 @@ export class UiValidatorStatus { $$chip .on('click', this.click) .call(d.tooltip) - .call(uiIcon(`#${d.iconID}`)); + .call(uiIcon(validator.getSeverityIcon(d.id))); $$chip .append('span') diff --git a/modules/ui/commit_warnings.js b/modules/ui/commit_warnings.js index b93f3e967..9af1656f9 100644 --- a/modules/ui/commit_warnings.js +++ b/modules/ui/commit_warnings.js @@ -10,10 +10,10 @@ export function uiCommitWarnings(context) { const issuesBySeverity = validator .getIssuesBySeverity({ what: 'edited', where: 'all', includeDisabledRules: true }); - for (let severity in issuesBySeverity) { + for (const severity of ['error', 'warning']) { // no 'suggestions' here let issues = issuesBySeverity[severity]; - if (severity !== 'error') { // exclude 'fixme' and similar - iD#8603 + if (severity === 'warning') { // exclude 'fixme' and similar - iD#8603 issues = issues.filter(issue => issue.type !== 'help_request'); } @@ -72,7 +72,7 @@ export function uiCommitWarnings(context) { }); buttons - .call(uiIcon('#rapid-icon-alert', 'pre-text')); + .call(uiIcon(validator.getSeverityIcon(severity), 'pre-text')); buttons .append('strong') diff --git a/modules/ui/icon.js b/modules/ui/icon.js index 453492217..5a98edd68 100644 --- a/modules/ui/icon.js +++ b/modules/ui/icon.js @@ -1,9 +1,11 @@ export function uiIcon(href, klass = '', title = '') { const iconID = href.replace('#', ''); + const prefix = iconID.split('-')[0]; return function render(selection) { const classList = ['icon']; - if (iconID) classList.push(`icon-${iconID}`); + if (prefix) classList.push(`icon-${prefix}`); // 'icon-fas', 'icon-rapid' + if (iconID) classList.push(`icon-${iconID}`); // 'icon-fas-triangle-exclamation', 'icon-rapid-icon-error' if (klass) classList.push(klass); const svgEnter = selection.selectAll(`svg.icon-${iconID}`) diff --git a/modules/ui/sections/entity_issues.js b/modules/ui/sections/entity_issues.js index ba07bc8b7..707e18660 100644 --- a/modules/ui/sections/entity_issues.js +++ b/modules/ui/sections/entity_issues.js @@ -23,7 +23,7 @@ export function uiSectionEntityIssues(context) { let section = uiSection(context, 'entity-issues') .shouldDisplay(() => _issues.length) .label(() => { - return l10n.t('inspector.title_count', { title: l10n.t('issues.list_title'), count: _issues.length }); + return l10n.t('inspector.title_count', { title: l10n.t('issues.title'), count: _issues.length }); }) .disclosureContent(renderDisclosureContent); @@ -89,9 +89,8 @@ export function uiSectionEntityIssues(context) { textEnter .each((d, i, nodes) => { - const which = (d.severity === 'warning') ? 'alert' : 'error'; d3_select(nodes[i]) - .call(uiIcon(`#rapid-icon-${which}`, 'issue-icon')); + .call(uiIcon(validator.getSeverityIcon(d.severity), 'issue-icon')); }); textEnter diff --git a/modules/ui/sections/validation_issues.js b/modules/ui/sections/validation_issues.js index b552276c1..1b5aab3c4 100644 --- a/modules/ui/sections/validation_issues.js +++ b/modules/ui/sections/validation_issues.js @@ -13,7 +13,7 @@ const MAX_ISSUES = 1000; * uiSectionValidateIssues * @param `context` Global shared application context * @param `sectionID` String 'issues-errors' or 'issues-warnings' - * @param `severity` String 'error' or 'warning' + * @param `severity` String 'error', 'warning', or 'suggestion' */ export function uiSectionValidationIssues(context, sectionID, severity) { const editor = context.systems.editor; @@ -34,7 +34,7 @@ export function uiSectionValidationIssues(context, sectionID, severity) { function sectionLabel() { const countText = _issues.length > MAX_ISSUES ? `${MAX_ISSUES}+` : String(_issues.length); - const titleText = l10n.t(`issues.${severity}s.list_title`); + const titleText = l10n.t(`issues.${severity}s`); return l10n.t('inspector.title_count', { title: titleText, count: countText }); } @@ -74,7 +74,7 @@ export function uiSectionValidationIssues(context, sectionID, severity) { list = list.enter() .append('ul') - .attr('class', `layer-list issues-list ${severity}s-list`) + .attr('class', `layer-list issues-list ${severity}-list`) .merge(list); @@ -105,9 +105,8 @@ export function uiSectionValidationIssues(context, sectionID, severity) { .append('span') .attr('class', 'issue-icon') .each((d, i, nodes) => { - const which = (d.severity === 'warning') ? 'alert' : 'error'; d3_select(nodes[i]) - .call(uiIcon(`#rapid-icon-${which}`)); + .call(uiIcon(validator.getSeverityIcon(d.severity))); }); textEnter diff --git a/modules/ui/sections/validation_rules.js b/modules/ui/sections/validation_rules.js index dc196a613..9756943cc 100644 --- a/modules/ui/sections/validation_rules.js +++ b/modules/ui/sections/validation_rules.js @@ -16,7 +16,7 @@ export function uiSectionValidationRules(context) { const section = uiSection(context, 'issues-rules') .disclosureContent(renderDisclosureContent) - .label(l10n.t('issues.rules.title')); + .label(l10n.t('issues.rules')); let _ruleKeys = validator.getRuleKeys() diff --git a/modules/validations/curb_nodes.js b/modules/validations/curb_nodes.js index 48fd359c1..badba4b82 100644 --- a/modules/validations/curb_nodes.js +++ b/modules/validations/curb_nodes.js @@ -33,7 +33,7 @@ export function validationCurbNodes(context) { issues.push(new ValidationIssue(context, { type, subtype: 'missing_curb_nodes', - severity: 'warning', + severity: 'suggestion', message: () => way ? l10n.t('issues.curb_nodes.message', { feature: l10n.displayLabel(way, graph) }) : 'Way not found', reference: showReference, entityIds: [wayID], @@ -279,13 +279,13 @@ export function validationCurbNodes(context) { function getIconForCurbNode(tags) { let iconID = 'default-icon'; // Default icon if (tags.barrier === 'kerb' && tags.kerb === 'flush') { - iconID = 'temaki-kerb-flush'; + iconID = 'temaki-kerb-flush'; } else if (tags.barrier === 'kerb' && tags.kerb === 'raised') { - iconID = 'temaki-kerb-raised'; + iconID = 'temaki-kerb-raised'; } else if (tags.barrier === 'kerb' && tags.kerb === 'lowered') { - iconID = 'temaki-kerb-lowered'; + iconID = 'temaki-kerb-lowered'; } else if (tags.barrier === 'kerb' && tags.kerb === 'unspecified') { - iconID = 'temaki-kerb-unspecified'; + iconID = 'temaki-kerb-unspecified'; } return iconID; } diff --git a/scripts/build_data.js b/scripts/build_data.js index 5ec70d019..91c609b24 100644 --- a/scripts/build_data.js +++ b/scripts/build_data.js @@ -94,6 +94,7 @@ function buildDataAsync() { // Start with icons we want to use in the UI that aren't tied to other data. const icons = new Set([ 'far-star', + 'fas-circle-arrow-up', 'fas-arrow-rotate-left', 'fas-arrow-rotate-right', 'fas-backward-step', @@ -105,6 +106,7 @@ function buildDataAsync() { 'fas-question', 'fas-star', 'fas-th-list', + 'fas-triangle-exclamation', 'fas-user-cog' ]); diff --git a/svg/fontawesome/fas-circle-arrow-up.svg b/svg/fontawesome/fas-circle-arrow-up.svg new file mode 100644 index 000000000..049bff7db --- /dev/null +++ b/svg/fontawesome/fas-circle-arrow-up.svg @@ -0,0 +1 @@ + \ No newline at end of file