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

[frontend] Handle null scope on task #4080

Merged
merged 2 commits into from
Aug 16, 2023
Merged

[frontend] Handle null scope on task #4080

merged 2 commits into from
Aug 16, 2023

Conversation

RomuDeuxfois
Copy link
Member

@Archidoit
Copy link
Member

Archidoit commented Aug 16, 2023

Tested and works well
But maybe you can change the color for scope Rule in the Background tasks list, because grey is not really lisible and is rather a color for errors/uncompleted fields etc
image

<Typography variant="h3" gutterBottom={true}>
{t('Scope')}
</Typography>
<TaskScope scope={task.scope} label={t(computeLabel(task.type, task.scope))} />
Copy link
Member

Choose a reason for hiding this comment

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

can't we just do something like: t(task.scope ?? task.type) instead of creating a function just for that?

Copy link
Member Author

Choose a reason for hiding this comment

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

I prefer to separate the logic from the purely UI part. But, we can discuss it.

@yassine-ouaamou yassine-ouaamou added the filigran team use to identify PR from the Filigran team label Aug 16, 2023
Copy link
Member

@SarahBocognano SarahBocognano left a comment

Choose a reason for hiding this comment

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

Tested ✅

@RomuDeuxfois RomuDeuxfois merged commit 847ebd2 into master Aug 16, 2023
6 checks passed
@RomuDeuxfois RomuDeuxfois deleted the issue/4079 branch August 16, 2023 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
filigran team use to identify PR from the Filigran team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants