Skip to content

fix: Optimistically update the UI when a workspace action is triggered #4929

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
Nov 8, 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
Fix minor styles
  • Loading branch information
BrunoQuaresma committed Nov 7, 2022
commit 603d74a5fcf35a295941075d65c25eeebbfec88c
3 changes: 1 addition & 2 deletions site/src/components/DropdownButton/ActionCtas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ const useStyles = makeStyles((theme) => ({
// this is all custom to work with our button wrapper
loadingButton: {
border: "none",
borderLeft: "1px solid #333740", // MUI disabled button
borderRadius: "3px 0px 0px 3px",
borderRadius: `${theme.shape.borderRadius} 0px 0px ${theme.shape.borderRadius}`,
},
}))
2 changes: 1 addition & 1 deletion site/src/components/DropdownButton/DropdownButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ const useStyles = makeStyles((theme) => ({
borderLeft: `1px solid ${theme.palette.divider}`,
borderRadius: `0px ${theme.shape.borderRadius}px ${theme.shape.borderRadius}px 0px`,
minWidth: "unset",
width: "63px", // matching cancel button so button grouping doesn't grow in size
width: "64px", // matching cancel button so button grouping doesn't grow in size
"& .MuiButton-label": {
marginRight: "8px",
},
Expand Down
4 changes: 2 additions & 2 deletions site/src/components/LoadingButton/LoadingButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const LoadingButton: FC<React.PropsWithChildren<LoadingButtonProps>> = ({
<span style={hidden}>{children}</span>
{loading && (
<div className={styles.loader}>
<CircularProgress size={18} className={styles.spinner} />
<CircularProgress size={16} className={styles.spinner} />
</div>
)}
{Boolean(loadingLabel) && loadingLabel}
Expand Down Expand Up @@ -63,7 +63,7 @@ const useStyles = makeStyles<Theme, StyleProps>((theme) => ({
top: "50%",
left: "50%",
height: 22, // centering loading icon
width: 18,
width: 16,
},
spinner: {
color: theme.palette.text.disabled,
Expand Down