-
Notifications
You must be signed in to change notification settings - Fork 944
feat: Redesign workspaces page #1450
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
Changes from 10 commits
1a667d9
dc47ae0
c34ad45
104b1d9
52a4e76
83397e0
d19c124
db820ce
851111b
190b7d1
cbc1015
169d733
53781e9
f606a51
09ce0ec
71bf439
82641ab
82cdace
6044d91
bd50c9f
191c9d7
fccacfe
f87c8e7
a058b8c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,10 +21,15 @@ export const NavbarView: React.FC<NavbarViewProps> = ({ user, onSignOut, display | |
<nav className={styles.root}> | ||
<List className={styles.fixed}> | ||
<ListItem className={styles.item}> | ||
<NavLink className={styles.logo} to="/"> | ||
<NavLink className={styles.logo} to="/workspaces"> | ||
kylecarbs marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<Logo fill="white" opacity={1} width={125} /> | ||
</NavLink> | ||
</ListItem> | ||
<ListItem button className={styles.item}> | ||
<NavLink className={styles.link} to="/workspaces"> | ||
Workspaces | ||
</NavLink> | ||
</ListItem> | ||
<ListItem button className={styles.item}> | ||
<NavLink className={styles.link} to="/templates"> | ||
Templates | ||
|
@@ -47,13 +52,13 @@ const useStyles = makeStyles((theme) => ({ | |
justifyContent: "center", | ||
alignItems: "center", | ||
height: navHeight, | ||
background: theme.palette.navbar.main, | ||
background: theme.palette.background.paper, | ||
marginTop: 0, | ||
transition: "margin 150ms ease", | ||
"@media (display-mode: standalone)": { | ||
borderTop: `1px solid ${theme.palette.divider}`, | ||
}, | ||
borderBottom: `1px solid #383838`, | ||
borderBottom: `1px solid ${theme.palette.divider}`, | ||
}, | ||
fixed: { | ||
flex: 0, | ||
|
@@ -68,9 +73,9 @@ const useStyles = makeStyles((theme) => ({ | |
display: "flex", | ||
height: navHeight, | ||
paddingLeft: theme.spacing(4), | ||
paddingRight: theme.spacing(2), | ||
paddingRight: theme.spacing(4), | ||
"& svg": { | ||
width: 125, | ||
width: 109, | ||
}, | ||
}, | ||
title: { | ||
|
@@ -98,17 +103,16 @@ const useStyles = makeStyles((theme) => ({ | |
"&.active": { | ||
position: "relative", | ||
color: theme.palette.primary.contrastText, | ||
fontWeight: "bold", | ||
|
||
"&::before": { | ||
content: `"{"`, | ||
left: 10, | ||
position: "absolute", | ||
}, | ||
|
||
"&::after": { | ||
content: `"}"`, | ||
content: `" "`, | ||
bottom: 0, | ||
left: theme.spacing(3), | ||
background: "#C16800", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a good theme color that could go here in place of the hardcoded color? Like |
||
right: theme.spacing(3), | ||
height: 2, | ||
position: "absolute", | ||
right: 10, | ||
}, | ||
}, | ||
}, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { useMachine } from "@xstate/react" | ||
import dayjs from "dayjs" | ||
import relativeTime from "dayjs/plugin/relativeTime" | ||
import React from "react" | ||
import { workspacesMachine } from "../../xServices/workspaces/workspacesXService" | ||
import { WorkspacesPageView } from "./WorkspacesPageView" | ||
|
||
dayjs.extend(relativeTime) | ||
|
||
export const WorkspacesPage: React.FC = () => { | ||
const [workspacesState] = useMachine(workspacesMachine) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This reminds me that now that I'm doing a bunch of polling on the workspace page, I can and should There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh interesting. I never thought of that, but I suppose it makes sense. |
||
|
||
return ( | ||
<> | ||
<WorkspacesPageView | ||
workspaces={workspacesState.context.workspaces} | ||
error={workspacesState.context.getWorkspacesError} | ||
/> | ||
</> | ||
) | ||
} |
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question(if-minor): Are we able to remove this dependency now
"@react-theming/storybook-addon": "1.1.5",
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch.