Skip to content

refactor: Minor design adjustments #1637

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

Merged
merged 4 commits into from
May 20, 2022
Merged
Show file tree
Hide file tree
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
Prev Previous commit
Make table row padding standard
  • Loading branch information
BrunoQuaresma committed May 20, 2022
commit ea280eaa884ba0e446a6fbfaeef364486aee47ce
8 changes: 1 addition & 7 deletions site/src/pages/TemplatesPage/TemplatesPageView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export const TemplatesPageView: React.FC<TemplatesPageViewProps> = (props) => {
</TableRow>
)}
{props.templates?.map((template) => (
<TableRow key={template.id} className={styles.templateRow}>
<TableRow key={template.id}>
<TableCell>
<Box alignItems="center" display="flex">
<Avatar variant="square" className={styles.templateAvatar}>
Expand Down Expand Up @@ -127,12 +127,6 @@ const useStyles = makeStyles((theme) => ({
lineHeight: `${theme.spacing(3)}px`,
},
},
templateRow: {
"& > td": {
paddingTop: theme.spacing(2),
paddingBottom: theme.spacing(2),
},
},
templateAvatar: {
borderRadius: 2,
marginRight: theme.spacing(1),
Expand Down
8 changes: 1 addition & 7 deletions site/src/pages/WorkspacesPage/WorkspacesPageView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export const WorkspacesPageView: React.FC<WorkspacesPageViewProps> = (props) =>
{props.workspaces?.map((workspace) => {
const status = getDisplayStatus(theme, workspace.latest_build)
return (
<TableRow key={workspace.id} className={styles.workspaceRow}>
<TableRow key={workspace.id}>
<TableCell>
<div className={styles.workspaceName}>
<Avatar variant="square" className={styles.workspaceAvatar}>
Expand Down Expand Up @@ -134,12 +134,6 @@ const useStyles = makeStyles((theme) => ({
lineHeight: `${theme.spacing(3)}px`,
},
},
workspaceRow: {
"& > td": {
paddingTop: theme.spacing(2),
paddingBottom: theme.spacing(2),
},
},
workspaceAvatar: {
borderRadius: 2,
marginRight: theme.spacing(1),
Expand Down
5 changes: 5 additions & 0 deletions site/src/theme/overrides.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ export const getOverrides = (palette: PaletteOptions) => {
// Gives the appearance of a border!
borderRadius: 2,
border: `1px solid ${palette.divider}`,

"& td": {
paddingTop: 16,
paddingBottom: 16,
},
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Other tables were using that "manually" so I extracted them to be the standard.

},
},
MuiTableCell: {
Expand Down