Skip to content

feat: UX - Initial create form flow #33

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

Closed
wants to merge 45 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
18dd18f
Add several dependencies needed for API routes
bryphe-coder Jan 19, 2022
7329cca
Add placeholder API and projectService
bryphe-coder Jan 19, 2022
6726f40
Create initial workspaces API
bryphe-coder Jan 19, 2022
3f932c2
Port over SafeHydrate component
bryphe-coder Jan 19, 2022
6fdb43f
Stub pages for workspace creation
bryphe-coder Jan 19, 2022
97b2383
Add missed favicons
bryphe-coder Jan 19, 2022
086d533
Formatting
bryphe-coder Jan 19, 2022
82989d3
Merge branch 'bryphe/fix/css-hydration-errors' into bryphe/feat/initi…
bryphe-coder Jan 19, 2022
c305c8d
Initial select page
bryphe-coder Jan 19, 2022
cc411d0
Flip to light theme
bryphe-coder Jan 19, 2022
907a523
Start pulling out AppPage/FormPage
bryphe-coder Jan 19, 2022
56f7515
Start stubbing out API
bryphe-coder Jan 19, 2022
0a5c48a
Start scaffolding project selection
bryphe-coder Jan 19, 2022
aea58ae
Add placeholder icon if none available
bryphe-coder Jan 19, 2022
c92e454
Revert prototyping changes
bryphe-coder Jan 19, 2022
be4c90f
Revert sum changes
bryphe-coder Jan 19, 2022
308de2b
Initial create form
bryphe-coder Jan 19, 2022
d0b0ef1
Rename project function
bryphe-coder Jan 19, 2022
797c82b
Add formik
bryphe-coder Jan 19, 2022
5016b9a
Stub create workspace API
bryphe-coder Jan 19, 2022
8da382b
Hook up formik to create form
bryphe-coder Jan 20, 2022
6fc0a54
Initial shared loading logic
bryphe-coder Jan 20, 2022
e57d1b6
Set up dynamic form components
bryphe-coder Jan 20, 2022
08010c3
Remove leftover buildmode pkg
bryphe-coder Jan 20, 2022
8800445
Add note in api that this is temporary
bryphe-coder Jan 20, 2022
496b42e
Factor ProjectName to separate file
bryphe-coder Jan 20, 2022
646206e
Fix useStyles naming
bryphe-coder Jan 20, 2022
4b6f1c5
Remove accidentally duplicated SafeHydrate
bryphe-coder Jan 20, 2022
961a44b
Remove addition of srverr package
bryphe-coder Jan 20, 2022
eb46f4c
Fix usage of render prop pattern
bryphe-coder Jan 20, 2022
840a796
Fix some compilation issues
bryphe-coder Jan 20, 2022
f20171f
Clean up imports
bryphe-coder Jan 20, 2022
03236df
Add some initial form tests
bryphe-coder Jan 20, 2022
61cd37f
Add smoke test for ProjectIcon
bryphe-coder Jan 20, 2022
99d0a95
Add AppPage smoke test
bryphe-coder Jan 20, 2022
d52bd38
Fix up formatting
bryphe-coder Jan 20, 2022
76d11d4
Remove api from collection metrics since it is temporary
bryphe-coder Jan 20, 2022
ffac475
Clean up unused import
bryphe-coder Jan 20, 2022
e95d75f
Remove and consolidate form ty pes
bryphe-coder Jan 22, 2022
3e8069b
Formatting
bryphe-coder Jan 22, 2022
9492e8e
Merge master
bryphe-coder Jan 22, 2022
e5e02f9
Clean-up utilities
bryphe-coder Jan 22, 2022
5e4a44f
Revert "Remove and consolidate form ty pes"
bryphe-coder Jan 22, 2022
6fe7141
Merge branch 'main' into bryphe/feat/initial-create-form
bryphe-coder Jan 22, 2022
8343ef0
First round of lint failures
bryphe-coder Jan 22, 2022
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
Next Next commit
Factor ProjectName to separate file
  • Loading branch information
bryphe-coder committed Jan 20, 2022
commit 496b42ef3a0c38efa80971e2a9a707d5adef8423
40 changes: 5 additions & 35 deletions site/components/Project/ProjectIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from "react"
import { Box, makeStyles, SvgIcon, Typography } from "@material-ui/core"
import { Box, makeStyles } from "@material-ui/core"
import { ProjectName } from "./ProjectName"

export interface ProjectIconProps {
title: string
Expand All @@ -19,7 +20,9 @@ const useStyles = makeStyles((theme) => ({
},
},
}))

/**
* <Circle /> is just a placeholder icon for projects that don't have one.
*/
const Circle: React.FC = () => {
return (
<Box
Expand All @@ -33,39 +36,6 @@ const Circle: React.FC = () => {
)
}

const useStyles2 = makeStyles((theme) => ({
root: {
color: theme.palette.text.secondary,
display: "-webkit-box", // See (1)
marginTop: theme.spacing(0.5),
maxWidth: "110%",
minWidth: 0,
overflow: "hidden", // See (1)
textAlign: "center",
textOverflow: "ellipsis", // See (1)
whiteSpace: "normal", // See (1)

// (1) - These styles, along with clamping make it so that not only
// can text not overflow horizontally, but there can also only be a
// maximum of 2 line breaks. This is standard behaviour on OS files
// (ex: Windows 10 Desktop application) to prevent excessive vertical
// line wraps. This is important in Generic Applications, as we have no
// control over the application name used in the manifest.
["-webkit-line-clamp"]: 2,
["-webkit-box-orient"]: "vertical",
},
}))

export const ProjectName: React.FC = ({ children }) => {
const styles = useStyles2()

return (
<Typography className={styles.root} noWrap variant="body2">
{children}
</Typography>
)
}

export const ProjectIcon: React.FC<ProjectIconProps> = ({ icon, title, onClick }) => {
const styles = useStyles()

Expand Down
35 changes: 35 additions & 0 deletions site/components/Project/ProjectName.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import React from "react"
import { Box, makeStyles, Typography } from "@material-ui/core"

const useStyles = makeStyles((theme) => ({
root: {
color: theme.palette.text.secondary,
display: "-webkit-box", // See (1)
marginTop: theme.spacing(0.5),
maxWidth: "110%",
minWidth: 0,
overflow: "hidden", // See (1)
textAlign: "center",
textOverflow: "ellipsis", // See (1)
whiteSpace: "normal", // See (1)

// (1) - These styles, along with clamping make it so that not only
// can text not overflow horizontally, but there can also only be a
// maximum of 2 line breaks. This is standard behaviour on OS files
// (ex: Windows 10 Desktop application) to prevent excessive vertical
// line wraps. This is important in Generic Applications, as we have no
// control over the application name used in the manifest.
["-webkit-line-clamp"]: 2,
["-webkit-box-orient"]: "vertical",
},
}))

export const ProjectName: React.FC = ({ children }) => {
const styles = useStyles2()

return (
<Typography className={styles.root} noWrap variant="body2">
{children}
</Typography>
)
}