Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix: remove access column header
  • Loading branch information
AbhineetJain committed Jul 13, 2022
commit c7053d866f1cc2b0f09713799e8a0fdecf907451
6 changes: 3 additions & 3 deletions site/src/components/Resources/Resources.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ const Language = {
resourceLabel: "Resource",
agentsLabel: "Agents",
agentLabel: "Agent",
accessLabel: "Access",
}

interface ResourcesProps {
Expand Down Expand Up @@ -64,7 +63,7 @@ export const Resources: FC<ResourcesProps> = ({
<AgentHelpTooltip />
</Stack>
</TableCell>
{canUpdateWorkspace && <TableCell>{Language.accessLabel}</TableCell>}
{canUpdateWorkspace && <TableCell></TableCell>}
</TableHeaderRow>
</TableHead>
<TableBody>
Expand All @@ -80,7 +79,7 @@ export const Resources: FC<ResourcesProps> = ({
if (!agent) {
return (
<TableRow key={`${resource.id}-${agentIndex}`}>
<TableCell className={styles.resourceNameCell}>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you check if we are using this anywhere else? If not, I think we should remove the resourceNameCell from the makeStyles.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We're using it to show the border when agents exist. Removed it from the case when no agents exist.

<TableCell>
{resource.name}
<span className={styles.resourceType}>{resource.type}</span>
</TableCell>
Expand Down Expand Up @@ -184,5 +183,6 @@ const useStyles = makeStyles((theme) => ({
display: "flex",
gap: theme.spacing(0.5),
flexWrap: "wrap",
justifyContent: "right",
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think you should use flex-end. I think "right" is not well supported. This should be the reason for Chromatic getting different styles.

},
}))