Skip to content

Conversation

BretHudson
Copy link
Member

@BretHudson BretHudson commented Oct 17, 2025

🔎 Previews:

Astro Quickstart

Before:
image

After:
image

Expo Quickstart

Before:

image

After:

image
React Quickstart
Marks

Before:

image

After:

image
Full `pages/_app.tsx` file

Before:

image

After:

image
Next.js Pages Quickstart

Before:

image

After:

image

What does this solve?

What changed?

Checklist

  • I have clicked on "Files changed" and performed a thorough self-review
  • All existing checks pass

@BretHudson BretHudson requested a review from a team as a code owner October 17, 2025 22:32
@vercel
Copy link

vercel bot commented Oct 17, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
clerk-docs Ready Ready Preview Oct 21, 2025 3:58pm

💡 Enable Vercel Agent with $100 free credit for automated AI reviews

- [`<SignInButton />`](/docs/reference/components/unstyled/sign-in-button): An unstyled component that links to the sign-in page. In this example, since no props or [environment variables](/docs/guides/development/clerk-environment-variables) are set for the sign-in URL, this component links to the [Account Portal sign-in page](/docs/guides/customizing-clerk/account-portal#sign-in).

```astro {{ filename: 'src/layouts/Layout.astro' }}
```astro {{ filename: 'src/layouts/Layout.astro', mark: [[1, 5], [17, 27]] }}
Copy link
Contributor

Choose a reason for hiding this comment

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

This is the only one I question. Feels like lines 2 and 20-25 is the more specific Clerk parts to highlight.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm split – I highlighted all the lines that weren't in the generated Layout.astro file

Perhaps we remove title? This is also the only guide that is using <nav> inside of <header>, so we could remove that as well to stay in parody with the other guides.

Copy link
Member Author

Choose a reason for hiding this comment

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

Here's the updated version – I also folded the CSS

image

Copy link
Contributor

Choose a reason for hiding this comment

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

Why add <header /> into the highlights?

On second look, I see you're doing the in the React quick starts too.

Copy link
Contributor

Choose a reason for hiding this comment

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

Looking at other SDKs, we include the header as part of the highlighting, so I'd follow that for consistency on both astro and react changes, it seems.

Copy link
Contributor

Choose a reason for hiding this comment

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

I am on board with whatever is consistent.

Copy link
Member Author

Choose a reason for hiding this comment

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

While editing these, I followed the steps to create the project using npx create-[...]-app/etc, and then looked at what the line differences were. Any lines that we added to the file, I highlighted, as I had noticed that was the pattern we were doing across other quickstart guides.

Comment on lines +177 to +192
<a href="https://vite.dev" target="_blank">
<img src={viteLogo} className="logo" alt="Vite logo" />
</a>
<a href="https://react.dev" target="_blank">
<img src={reactLogo} className="logo react" alt="React logo" />
</a>
</div>
<h1>Vite + React</h1>
<div className="card">
<button onClick={() => setCount((count) => count + 1)}>count is {count}</button>
<p>
Edit <code>src/App.tsx</code> and save to test HMR
</p>
</div>
<p className="read-the-docs">Click on the Vite and React logos to learn more</p>
</>
Copy link
Contributor

Choose a reason for hiding this comment

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

Why add all of this tho? Think we want to keep the snippet as straightforward as possible.

Copy link
Member Author

Choose a reason for hiding this comment

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

Answered in the below comments because I think I'm making certain assumptions that I shouldn't 😅 ‍

Comment on lines +159 to +161
import reactLogo from './assets/react.svg'
import viteLogo from '/vite.svg'
import './App.css'
Copy link
Contributor

Choose a reason for hiding this comment

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

Same comment with these imports.

Copy link
Member Author

Choose a reason for hiding this comment

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

Why add all of this tho? Think we want to keep the snippet as straightforward as possible.

I agree that keeping snippets straightforward is ideal. I've also noticed that many of the quickstart guides include the rest of the generated file from the `npx create-[...]-app" results in the snippet, and then fold them, as I've done here.

Where exactly should I draw the line between "make sure this snippet is representative of the generated file" and "remove anything irrelevant from the generated file"?

For example, is persisting the template's React & Vite logos necessary?

Copy link
Contributor

@SarahSoutoul SarahSoutoul Oct 21, 2025

Choose a reason for hiding this comment

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

That's fair. I think this one is particularly flagrant to me because of the count code that is irrelevant to the rest of the code compared to other setup code in other SDKs. IMO, keeping the imports at the start would be fine, but I don't think we need all the code related to the count stuff.

A user experience is usually to copy the snippet and paste that into the file, which then removes the initial code anyway. So to me, that makes sense. I'd be keen to hear @alexisintech thoughts on this actually.

Copy link
Member

Choose a reason for hiding this comment

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

i think adding syntax highlighting is fine, but let's not add anything else to the quickstart

import './App.css'

function App() {
const [count, setCount] = useState(0)
Copy link
Contributor

Choose a reason for hiding this comment

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

And this too.

Copy link
Member Author

Choose a reason for hiding this comment

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

[cont] Is App.css something we should remove?

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.

4 participants