Skip to content

Commit

Permalink
✨ Remove empty name column for issues in favor of description column (#…
Browse files Browse the repository at this point in the history
…1152)

In @pranavgaikwad's demo we saw that the issue `name` field is not
useful and perhaps always empty in real data, and instead the first line
of the `description` field is the more meaningful identifier for a row
in this table. This change removes the name column and renames the
description column header to "Issue" as discussed.

![Screenshot 2023-07-17 at 1 48 36
PM](https://github.com/konveyor/tackle2-ui/assets/811963/98810f14-281d-4967-af33-bbc7b3f1629d)

Signed-off-by: Mike Turley <mike.turley@alum.cs.umass.edu>
  • Loading branch information
mturley authored Jul 17, 2023
1 parent aad969a commit a18d5ba
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions client/src/app/pages/issues/issues-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,17 +99,16 @@ export const IssuesTable: React.FC<IIssuesTableProps> = ({ mode }) => {
const tableControlState = useTableControlUrlParams({
urlParamKeyPrefix: TableURLParamKeyPrefix.issues,
columnNames: {
name: "Issue",
description: "Description",
description: "Issue",
category: "Category",
source: "Source",
target: "Target(s)",
effort: "Effort",
affected:
mode === "singleApp" ? "Affected files" : "Affected applications",
},
sortableColumns: ["name", "category", "effort", "affected"],
initialSort: { columnKey: "name", direction: "asc" },
sortableColumns: ["description", "category", "effort", "affected"],
initialSort: { columnKey: "description", direction: "asc" },
filterCategories: [
...(mode === "allIssues" ? allIssuesSpecificFilterCategories : []),
{
Expand Down Expand Up @@ -171,7 +170,7 @@ export const IssuesTable: React.FC<IIssuesTableProps> = ({ mode }) => {
const hubRequestParams = getHubRequestParams({
...tableControlState, // Includes filterState, sortState and paginationState
hubSortFieldKeys: {
name: "name",
description: "description",
category: "category",
effort: "effort",
affected: mode === "singleApp" ? "files" : "applications",
Expand Down Expand Up @@ -309,7 +308,6 @@ export const IssuesTable: React.FC<IIssuesTableProps> = ({ mode }) => {
<Thead>
<Tr>
<TableHeaderContentWithControls {...tableControls}>
<Th {...getThProps({ columnKey: "name" })} />
<Th {...getThProps({ columnKey: "description" })} />
<Th {...getThProps({ columnKey: "category" })} />
<Th {...getThProps({ columnKey: "source" })} />
Expand Down Expand Up @@ -354,20 +352,13 @@ export const IssuesTable: React.FC<IIssuesTableProps> = ({ mode }) => {
rowIndex={rowIndex}
>
<Td
width={15}
{...getTdProps({ columnKey: "name" })}
modifier="truncate"
>
{report.name}
</Td>
<Td
width={25}
width={30}
{...getTdProps({ columnKey: "description" })}
modifier="truncate"
>
{report.description.split("\n")[0]}
</Td>
<Td width={10} {...getTdProps({ columnKey: "category" })}>
<Td width={20} {...getTdProps({ columnKey: "category" })}>
{report.category}
</Td>
<Td
Expand Down

0 comments on commit a18d5ba

Please sign in to comment.