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

🐛 Refactor task state to icon mapping #1984

Merged
merged 2 commits into from
Jun 27, 2024
Merged

Conversation

rszwajko
Copy link
Collaborator

Follow the mapping used by the drawer with following changes:

  1. use PauseCircleIcon also for QuotaBlocked state
  2. use TaskIcon for Ready state (instead of CheckCircleIcon)
  3. use CheckCircleIcon for state Succeeded

Part-of: #1969

@rszwajko
Copy link
Collaborator Author

Screenshot from 2024-06-25 21-08-39
Screenshot from 2024-06-25 21-04-44

Copy link

codecov bot commented Jun 25, 2024

Codecov Report

Attention: Patch coverage is 43.75000% with 9 lines in your changes missing coverage. Please review.

Project coverage is 42.23%. Comparing base (b654645) to head (c29552e).
Report is 179 commits behind head on main.

Files Patch % Lines
client/src/app/components/Icons/TaskStateIcon.tsx 27.27% 8 Missing ⚠️
.../app/components/task-manager/TaskManagerDrawer.tsx 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1984      +/-   ##
==========================================
+ Coverage   39.20%   42.23%   +3.03%     
==========================================
  Files         146      170      +24     
  Lines        4857     5443     +586     
  Branches     1164     1355     +191     
==========================================
+ Hits         1904     2299     +395     
- Misses       2939     3128     +189     
- Partials       14       16       +2     
Flag Coverage Δ
client 42.23% <43.75%> (+3.03%) ⬆️
server ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@sjd78 sjd78 left a comment

Choose a reason for hiding this comment

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

Icon to state mapping looks good.

Can you make taskStateToIcon a normal functional component instead of a function? I think it'll look more consistent when used.

Follow the mapping used by the drawer with following changes:
1. use PauseCircleIcon also for QuotaBlocked state
2. use TaskIcon for Ready state (instead of CheckCircleIcon)
3. use CheckCircleIcon for state Succeeded

Signed-off-by: Radoslaw Szwajkowski <rszwajko@redhat.com>
Signed-off-by: Radoslaw Szwajkowski <rszwajko@redhat.com>
Copy link
Member

@sjd78 sjd78 left a comment

Choose a reason for hiding this comment

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

LGTM

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