Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Planning: Adjust and improve the visual indication of the workflow status of Coverages #2029

Merged
merged 2 commits into from
Jul 24, 2024

Conversation

dzonidoo
Copy link
Contributor

SDESK-7311

Copy link
Member

@tomaskikutis tomaskikutis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix CI

return 'var(--sd-colour-success)';
} else if (isCoverageDraft(coverage) || get(coverage, 'workflow_status') === COVERAGES.WORKFLOW_STATE.ACTIVE) {
return 'var(--sd-colour-highlight)';
function getCoverageIconColor(item: IPlanningCoverageItem, field = 'state'): string {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not add field parameter if it's not used. It makes it appear as multiple options are available and in the end it makes it harder to understand all possible usages.

return 'var(--sd-colour-state--completed)';
}

if (item.assigned_to.user === null || item.assigned_to.desk === null) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid using negatives in naming and flow. For example, it wouldn't be a good name const notUnassigned= true because it is difficult to understand. In a similar manner, your if condition is whether "unassigned" label should be applied. Instead use the condition to determine if assigned should be applied and use "else" for unassigned.

@dzonidoo dzonidoo merged commit 3945157 into superdesk:develop Jul 24, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants