Skip to content

feat: custom users tab #44

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

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open

feat: custom users tab #44

wants to merge 18 commits into from

Conversation

brettkolodny
Copy link
Collaborator

Closes #40

Copy link

vercel bot commented Jul 7, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 16, 2025 7:25pm

@brettkolodny brettkolodny marked this pull request as ready for review July 8, 2025 20:37
@brettkolodny brettkolodny marked this pull request as draft July 9, 2025 15:43
@brettkolodny brettkolodny self-assigned this Jul 9, 2025
@brettkolodny brettkolodny marked this pull request as ready for review July 9, 2025 16:52
"$schema": "https://biomejs.dev/schemas/2.0.6/schema.json"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see a matching package.json version bump. do we not have biome as a dev dependency?

@@ -0,0 +1 @@

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

empty file?

Comment on lines +8 to +9
"experimentalScannerIgnores": [
"src/client/gen/types.ts",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is what we want to use here. The docs say the new replacement for files.ignore is actually...

{
  "files": {
    "include": ["!src/client/gen/types.ts"]
  }
}

(note the ! in there)

@@ -30,46 +30,35 @@
"level": "off"
},
"noParameterAssign": {
"level": "off"
"level": "off",
"options": {}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

feels weird to specify options for "off"

},
"useDefaultParameterLast": {
"level": "off"
},
"useSelfClosingElements": {
"level": "off"
"level": "off",
"options": {}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

@@ -101,6 +84,14 @@ export const App = () => {
);
};

useEffect(() => {
const newCurrentUser = users.find((u) => u.id === currentUser.id);

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

mega nit

Comment on lines +577 to +579
const selectedMissing = !users.some(
(owner) => currentUser.id === owner.id,
);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const selectedMissing = !users.some(
(owner) => currentUser.id === owner.id,
);
const selectedMissing = users.every((owner) => currentUser.id !== owner.id);

these should be equivalent, but this seems a tiny bit clearer to me

Comment on lines +600 to +604
{users.map((owner, index) => (
<SelectItem value={owner.id} key={index}>
{owner.full_name || owner.name}
</SelectItem>
))}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this mean currentUser gets shown twice?

@@ -60,7 +61,10 @@ app.get("/parameters/:shareId?/:example?", async (c, next) => {
</head>
<body>
<div id="root"></div>
<script type="module">{`window.CODE = ${JSON.stringify(exampleCode)}`}</script>
<script type="module">{`window.CODE = ${JSON.stringify(codeAndUsers.code)}`}</script>
{codeAndUsers.users ? (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: could probably be an &&, since the "else" here isn't anything important.

@@ -0,0 +1,21 @@
export const downloadData = (data: unknown, fileName: string) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love how janky the web platform is. thanks for moving it out into a function. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow users to add custom users
2 participants