Skip to content

Commit 633d895

Browse files
authored
basic profiles / 3rd party avatars (#356)
* basic profiles / 3rd party avatars * fix * improve code block in slash menu * add react icon to code block * add forks * text styles * misc fixes * fix * improve user picker * fix placeholder * set window title * remove markdown-it * fix gh ci
1 parent c44e3e4 commit 633d895

33 files changed

+292
-433
lines changed

.github/workflows/build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
node-version: 18.x
2121

2222
# from https://github.com/supabase/supabase-action-example/
23-
- run: supabase start -x studio,imgproxy,storage
23+
- run: supabase start -x studio,imgproxy,storage,edge-runtime,vector,realtime,storage-api
2424
working-directory: packages/server
2525
env:
2626
TYPECELL_GITHUB_OAUTH_SECRET: ${{ secrets.TYPECELL_GITHUB_OAUTH_SECRET }}

package-lock.json

Lines changed: 27 additions & 99 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/editor/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"mobx-react-lite": "^3.2.0",
4545
"penpal": "^6.1.0",
4646
"react": "^18.2.0",
47-
"react-avatar": "^3.10.0",
47+
"react-avatar": "^5.0.3",
4848
"react-dnd": "^14.0.2",
4949
"react-dnd-html5-backend": "^14.0.0",
5050
"react-dom": "^18.2.0",

packages/editor/src/app/documentRenderers/DocumentView.module.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
flex-direction: column;
44
width: 100%;
55
height: 100%;
6+
flex:1;
67
}

packages/editor/src/app/documentRenderers/DocumentView.tsx

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,17 @@ const DocumentView = observer((props: Props) => {
136136
throw new Error("Plugin not implemented");
137137
} else if (connection.doc.type === "!profile") {
138138
return (
139-
<ProfileRenderer
140-
key={connection.doc.id}
141-
profile={connection.doc.getSpecificType(ProfileResource)!}
142-
subIdentifiers={[]}
143-
/>
139+
<div className={styles.view}>
140+
<DocumentMenu
141+
document={connection.doc}
142+
sessionStore={props.sessionStore}></DocumentMenu>
143+
<ProfileRenderer
144+
key={connection.doc.id}
145+
profile={connection.doc.getSpecificType(ProfileResource)!}
146+
subIdentifiers={[]}
147+
sessionStore={props.sessionStore}
148+
/>
149+
</div>
144150
);
145151
} else if (connection.doc.type.startsWith("!")) {
146152
throw new Error("invalid built in type");
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
.container {
2+
padding: 0 calc((100% - 731px) / 2);
3+
padding-top:3em;
4+
height: 100%;
5+
}
6+
7+
.userHeader {
8+
display:flex;
9+
padding: 2em;
10+
border-radius: 20px;
11+
border: 1px solid rgba(0, 0, 0, 0.08);
12+
box-shadow: rgb(0 0 0 / 25%) 0px 1px 3px -2px;
13+
transition: box-shadow 0.16s ease;
14+
15+
}
16+
.userHeader:hover {
17+
box-shadow: rgb(0 0 0 / 25%) 0px 10px 30px -20px;
18+
}
19+
20+
.userHeader h1 {
21+
flex:auto;
22+
align-self: center;
23+
margin:0;
24+
margin-left:1em;
25+
font-size:3em
26+
}
27+
28+
.userInfo {
29+
font-style: italic;
30+
}
31+
32+
.workspaces, .forks {
33+
margin-top:2em
34+
}
35+
36+
.workspaces button, .forks button {
37+
display:block;
38+
margin-bottom:1em;
39+
40+
}
41+
42+
.avatar {
43+
border: 1px solid rgba(0, 0, 0, 0.08)
44+
}

0 commit comments

Comments
 (0)