Skip to content
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

Refactor/app router refs #28095

Merged
merged 35 commits into from
Aug 13, 2024
Merged

Refactor/app router refs #28095

merged 35 commits into from
Aug 13, 2024

Conversation

charislam
Copy link
Contributor

@charislam charislam commented Jul 19, 2024

Migrates client SDK References to App Router. (Management and CLI API references aren't migrated yet, nor are self-hosting config references.)

Some notes:

  • Big changes to the way crawler pages are built and individual section URLs (e.g., javascript/select) are served. All of these used to be SSG-generated pages, but the number of heavy pages was just too much to handle -- slow as molasses and my laptop sounded like it was taking off, and CI sometimes refuses to build it all at all.

    Tried various tricks with caching and pre-generating data but no dice.

    So I changed to only building one copy of each SDK version page, then serving the sub-URLs through a response rewrite. That's for the actual user-visible pages.

    For the bot pages, each sub-URL needs to be its own page, but prebuilding it doesn't work, and rendering on demand from React components is too slow (looking for super-fast response here for SEO). Instead I changed to using an API route that serves very minimal, hand-crafted HTML. It looks ugly, but it's purely for the search bots.

    You can test what bots see by running curl --user-agent "Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25 (compatible; Googlebot/2.1; http://www.google.com/bot.html)" <URL_OF_PAGE>

    Also added some smoke tests to run against prod for the crawler routes, since we don't keep an eye on those regularly, and Vercel config changes could surprise-break them. Tested the meta images on Open Graph and all seems to work fine.

    With this approach, full production builds are really fast: ~5 minutes

  • Starts using the new type spec handling, which is better at finding params automatically, so I could remove some of the manually written ones from the spec files.

Copy link

supabase bot commented Jul 19, 2024

No changes detected in supabase directory.
This pull request has been ignored for the connected project xguihxuzqibwxjnimxev due to its connection settings.
Go to Project Integrations Settings ↗︎ in order to change this behavior.


Branching Preview Branches by Supabase.
Learn more about Supabase for Git ↗︎.

Copy link

vercel bot commented Jul 19, 2024

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

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 12, 2024 5:50pm
5 Skipped Deployments
Name Status Preview Comments Updated (UTC)
design-system ⬜️ Ignored (Inspect) Visit Preview Aug 12, 2024 5:50pm
studio ⬜️ Ignored (Inspect) Visit Preview Aug 12, 2024 5:50pm
studio-self-hosted ⬜️ Ignored (Inspect) Visit Preview Aug 12, 2024 5:50pm
studio-staging ⬜️ Skipped (Inspect) Aug 12, 2024 5:50pm
zone-www-dot-com ⬜️ Skipped (Inspect) Aug 12, 2024 5:50pm

@vercel vercel bot temporarily deployed to Preview – docs July 22, 2024 21:22 Inactive
@vercel vercel bot temporarily deployed to Preview – docs July 22, 2024 21:40 Inactive
@vercel vercel bot temporarily deployed to Preview – zone-www-dot-com July 23, 2024 00:49 Inactive
@vercel vercel bot temporarily deployed to Preview – studio-staging July 23, 2024 00:49 Inactive
@vercel vercel bot temporarily deployed to Preview – studio-staging July 23, 2024 00:50 Inactive
@vercel vercel bot temporarily deployed to Preview – zone-www-dot-com July 23, 2024 00:50 Inactive
@vercel vercel bot temporarily deployed to Preview – docs July 23, 2024 00:57 Inactive
@vercel vercel bot temporarily deployed to Preview – studio-staging July 23, 2024 04:02 Inactive
@@ -0,0 1,72 @@
import { load } from 'cheerio'
Copy link
Contributor

Choose a reason for hiding this comment

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

great!

@saltcod
Copy link
Contributor

saltcod commented Aug 13, 2024

a lot happening here but seems to do as described! :^)

@charislam charislam merged commit fc164b5 into master Aug 13, 2024
17 checks passed
@charislam charislam deleted the refactor/app-router-refs branch August 13, 2024 20:13
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.

3 participants