Skip to content

fix(site): make right panel scrollable on template editor #9344

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 2 commits into from
Aug 25, 2023
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(site): make right panel scrollable on template editor
  • Loading branch information
BrunoQuaresma committed Aug 25, 2023
commit 8f1f6c1dc691adb07cfa8457ec535d17869dcd6a
2 changes: 1 addition & 1 deletion site/src/components/Resources/ResourceCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const ResourceCard: FC<ResourceCardProps> = ({ resource, agentRow }) => {
: metadataToDisplay.slice(0, 4)

return (
<div key={resource.id} className={styles.resourceCard}>
<div key={resource.id} className={`${styles.resourceCard} resource-card`}>
<Stack
direction="row"
alignItems="flex-start"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ export const TemplateVersionEditor: FC<TemplateVersionEditorProps> = ({
</div>

<div
className={`${styles.panel} ${
className={`${styles.panel} ${styles.resources} ${
selectedTab === 1 ? "" : "hidden"
}`}
>
Expand Down Expand Up @@ -518,11 +518,21 @@ const useStyles = makeStyles<
flex: 1,
borderLeft: `1px solid ${theme.palette.divider}`,
overflow: "hidden",
display: "flex",
flexDirection: "column",
},
panel: {
overflowY: "auto",
height: "100%",

"&.hidden": {
display: "none",
},

// Hack to access customize resource-card from here
"& .resource-card": {
border: 0,
},
},
tabs: {
borderBottom: `1px solid ${theme.palette.divider}`,
Expand Down Expand Up @@ -593,7 +603,8 @@ const useStyles = makeStyles<
buildLogs: {
display: "flex",
flexDirection: "column",
overflowY: "auto",
height: "100%",
},
resources: {
paddingBottom: theme.spacing(2),
},
}))