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

✨ Add Tasks tab to the Applications table application details drawer #2123

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

EstyBiton
Copy link

@EstyBiton EstyBiton commented Oct 8, 2024

Enhancing the application details drawer by adding a "Tasks" tab, displaying a table of tasks associated with the application, implementing filtering, sorting, and pagination functionalities, and including columns for Task ID, Task Kind, Status, and Priority.

Fixes: #1937

screenshot of result:
Screenshot from 2024-10-30 11-36-28

@EstyBiton EstyBiton marked this pull request as draft October 8, 2024 12:21
@EstyBiton EstyBiton marked this pull request as ready for review October 9, 2024 06:37
Copy link

codecov bot commented Oct 29, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 41.97%. Comparing base (b654645) to head (fc085f3).
Report is 240 commits behind head on main.

Files with missing lines Patch % Lines
.../app/components/task-manager/TaskManagerDrawer.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2123      +/-   ##
==========================================
+ Coverage   39.20%   41.97%   +2.77%     
==========================================
  Files         146      175      +29     
  Lines        4857     5629     +772     
  Branches     1164     1395     +231     
==========================================
+ Hits         1904     2363     +459     
- Misses       2939     3145     +206     
- Partials       14      121     +107     
Flag Coverage Δ
client 41.97% <50.00%> (+2.77%) ⬆️
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.

The work done is quite good. There are some things that need to be changed.

  1. On the side bar table, either drop the priority column or make the initial width of the drawer larger. With the current width of the drawer, the action kebab are not visible. The other option is to make the drawer something like 100px wider initially so the task action kebab is shown.

  2. When linking to the task details, the URL is breaking. You can follow the same format as navigateToAnalysisDetails(), but it should really be its own path.

  3. The status column should use the same column style as the tasks-page (status icon, name, and link). See:

    state: (
    <IconWithLabel
    icon={<TaskStateIcon state={state} />}
    label={
    <Link
    to={formatPath(Paths.taskDetails, {
    taskId: id,
    })}
    >
    {t(taskStateToLabel[state ?? "No task"])}
    </Link>
    }
    />
    ),

  4. Need to fix the link that are being generated on task manager table (see specific comment).

I have a few more specific comment in the review.

@@ -41,7 +41,7 @@ export const DevPaths = {

dependencies: "/dependencies",
tasks: "/tasks",
taskDetails: "/tasks/:taskId",
taskDetails: "/tasks/:taskId/:isFApplication",
Copy link
Member

Choose a reason for hiding this comment

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

This is causing a bad path on the Task Manager page:
image

Comment on lines +639 to +649
const tableControls = useTableControlProps({
...tableControlState,
idProperty: "id",
currentPageItems: currentPageItems,
totalItemCount,
isLoading: isFetching,
selectionState: useSelectionState({
items: currentPageItems,
isEqual: (a, b) => a.name === b.name,
}),
});
Copy link
Member

Choose a reason for hiding this comment

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

I think a compact table looks better here. Add prop variant: "compact", and see if you agree.

modifier="nowrap"
{...getTdProps({ columnKey: "status" })}
>
{task.state}
Copy link
Member

Choose a reason for hiding this comment

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

Make this render like on the task manager page -- status icon with a link to view the task details

item={task}
rowIndex={rowIndex}
>
<Td width={10} {...getTdProps({ columnKey: "taskId" })}>
Copy link
Member

Choose a reason for hiding this comment

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

The Td widths are not necessary. All of the patterfly examples put any width values on the Th tags only. Since I don't see any difference with them here or not, easiest is to remove them.

const [applicationName, setApplicationName] = useState<string | undefined>();
const [applicationId, setApplicationId] = useState<number | undefined>();

useEffect(() => {
Copy link
Member

Choose a reason for hiding this comment

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

@rszwajko Can you have a look at these changes? I don't remember exactly how these components hang together.

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.

Add Tasks tab to the Applications table application details drawer
2 participants