Commit Graph

145 Commits

Author SHA1 Message Date
Charis
eed0f6e7ce fix: don't render hidden pages (#38477)
* fix: remove hidden guide pages from render

Guide pages hidden from nav are still rendered. This change removes them
from both build-time and on-demand rendering.

* fix: build llms script

The build llms script does not run in an environment where React is
available, so it must import from 'common/enabled-features', not from
'common', to avoid errors.

* fix: don't render hidden reference pages

Similar to guides, but for client SDK references. If a page is hidden
from the navigation (its feature flag is toggled off), don't render it
at all. This includes (a) at build time, (b) at request time, and (c) at
crawler request time.

* fix: types
2025-09-08 13:05:38 -04:00
Chris Chinchilla
6821c07811 docs: feature toggle tests (#38282)
* Docs feature toggle tests

* Prettier

* Types fix

* Hide unsupported languages

* Fix import

* Add unsupported code warning

* Further SDK toggling

* Temp intro text

* Auth toggles

* clean up conditional visibility code

* fix: typecheck, tests, tiny bug

---------

Co-authored-by: Charis Lam <26616127+charislam@users.noreply.github.com>
2025-09-04 16:46:08 +02:00
Charis
9551315f6a fix: search sync + sentry errors issues (#37912)
* fix: search sync + sentry errors issues

Fixes two issues:
1. Search sync: The embedded content now includes denormalized examples,
   so the examples codegen needs to be run before embeddings are
   created. Otherwise, the GitHub Action will fail because it cannot
   find the examples to use for content inclusion.
2. Sentry errors on pages that fail to load: Sentry errors were being
   sent for genuine 404s because the check for FileNotFoundErrors was
   wrong. The error that is caught is wrapped in a new Error by
   Result.unwrap(), so it's the child of this error, error.cause, that
   is potentially a FileNotFoundError, not the error itself.

* fix: remove double processing of mdx
2025-08-13 16:50:30 -04:00
Charis
e46ab9c1a2 refactor: reading markdown docs files (#37774)
* refactor: reading markdown docs files

Refactor how Markdown docs files are read:
- Reuses the same logic across search index generation & page generation
- Improves the indexed content for search:
  - Stops removing MDX components, which often contain useful
    information like Admonitions
  - Denormalizes Partials and CodeSamples for more complete content

This is a prerequisite step for implementing the "Copy docs as Markdown"
functionality.

Only touches regular guides for now, not federated ones.

* fix: tailwind build error (#37728)

We changed to default to ESM imports a while ago, which means local
builds are now breaking because the Tailwind uses a require. Changed to
CJS for Tailwind config file. (I have no idea how this has been working
on Vercel all this time.)

* style: prettier
2025-08-13 11:37:14 -04:00
Kevin Grüneberg
d60b3e3b9e feat: cached egress rollout (#37827) 2025-08-13 17:36:48 +08:00
Charis
ef93da79b0 feat(docs): code samples with ts type stripping (#37695)
* feat(docs): code samples with ts type stripping

Introduce a new option to `$CodeSample`, `convertToJs`, which takes a
code sample written in TypeScript and strips the types to produce a
JavaScript version.

Adds tests for type stripping.

* Clarify instructions

---------

Co-authored-by: Chris Chinchilla <chris@chrischinchilla.com>
2025-08-06 10:21:51 -04:00
Francesco Sansalvadore
6b172a2ee2 chore: remove lw15 banners (#37718)
remove lw15 banners
2025-08-06 07:42:27 -04:00
Charis
8b72d96d66 docs: add product-specific troubleshooting views (#37671)
We have a global troubleshooting view at /guides/troubleshooting, but
for greater visibility, we should also have product-specific
troubleshooting views. This is the same view and same data as the global
page, but filtered down to a specific product.
2025-08-05 18:31:11 -04:00
Chris Chinchilla
74a1cd8dfe docs: Update User management quickstart to Svelte 5 (#37646)
* General updates and switch to Svelte 5

* Update code example to Svelte 5

* Update some examples to use codesamples component

* Add Svelte to codesample component

* Final code updates

* Add more CodeSample components
2025-08-05 13:40:50 +00:00
Charis
0c0be801ae chore(docs): add logflare logging (#37310) 2025-07-31 15:10:37 -04:00
Charis
1c2312975b docs: add auth getClaims method (#37122) 2025-07-14 21:13:23 +00:00
Tomas Pozo
ec1c534013 New GuideTemplate with composable components (#36893)
* Add db wrappers open in dashboard cta

* Restore getLatestRelease return to null

* Add guide template components with flexible content positioning

* Add Guide components with composition pattern

* Remove default branch on tag value

* Add GuideTemplate component and do some clean up

* Restore original GuideTemplate

* Clean up code and unused props

* Remove displayName

* Remove unwanted export

* Refactor EditLink to its own helper file

* Apply several fixes

* Fix underline on cta button

* Remove default main tag

* More descriptive button cta label

* fix(docs): add iceberg_wrapper dashboard integration

---------

Co-authored-by: Charis Lam <26616127+charislam@users.noreply.github.com>
2025-07-09 16:42:54 +00:00
Francesco Sansalvadore
2afa8ba4f6 lw15 ticketing (#36916)
lw15 ticketing site
2025-07-08 17:43:04 +02:00
Charis
f107437ae0 docs(realtime error codes) (#36891)
Convert realtime error codes to the new format. This makes them available
through the shared ErrorCode component and via the Content API.
2025-07-04 16:07:58 -04:00
Joshen Lim
27d9b44526 Consolidate copy to clipboard (#36353)
* Consolidate copy to clipboard

* Fix

* Fix some extra clipboard events.

* Fix the tests. Fix a small issue with the copy button.

* Fix

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2025-06-13 13:08:08 +02:00
Charis
4e916fc16a feat(graphql): add paginated errors collection query (#36149)
* feat(graphql): add paginated errors collection query

- Add new GraphQL query field 'errors' with cursor-based pagination

- Add UUID id column to content.error table for cursor pagination

- Implement error collection resolver with forward/backward pagination

- Add comprehensive test suite for pagination functionality

- Update database types and schema to support new error collection

- Add utility functions for handling collection queries and errors

- Add seed data for testing pagination scenarios

This change allows clients to efficiently paginate through error codes using cursor-based pagination, supporting both forward and backward traversal. The implementation follows the Relay connection specification and includes proper error handling and type safety.

* docs(graphql): add comprehensive GraphQL architecture documentation

Add detailed documentation for the docs GraphQL endpoint architecture, including:
- Modular query pattern and folder structure
- Step-by-step guide for creating new top-level queries
- Best practices for error handling, field optimization, and testing
- Code examples for schemas, models, resolvers, and tests

* feat(graphql): add service filtering to errors collection query

Enable filtering error codes by Supabase service in the GraphQL errors collection:
- Add optional service argument to errors query resolver
- Update error model to support service-based filtering in database queries
- Maintain pagination compatibility with service filtering
- Add comprehensive tests for service filtering with and without pagination

* feat(graphql): add service filtering and fix cursor encoding for errors collection

- Add service parameter to errors GraphQL query for filtering by Supabase service
- Implement base64 encoding/decoding for pagination cursors in error resolver
- Fix test cursor encoding to match resolver implementation
- Update GraphQL schema snapshot to reflect new service filter field

* docs(graphql): fix codegen instruction
2025-06-09 10:24:17 -04:00
Charis
4b9662b21e ci(docs lint): fix commenting workflow (#36062)
* ci(docs): fix sync process

GraphQL codegen needs to be run before sync because otherwise the types
are missing. Missed this in local testing because codegen had already
been run for other reasons.

* fix(troubleshooting sync): unresolved import

* ci(docs lint): fix commenting workflow
2025-06-05 13:16:36 -04:00
Charis
3158807579 ci(docs): sync script (#36001)
Add a script for syncing error codes from the repo to the database. This
is part of the newly created rootSync script, where all sync scripts
should be moved eventually.
2025-06-05 12:28:45 -04:00
Charis
cf3ecc93eb chore(docs): turn on strictNullChecks (#36180)
strictNullChecks was off for docs, which lets errors slip through and
leads to incorrect required/optional typing on Zod-inferred types. This
PR enables strictNullChecks and fixes all the existing violations.
2025-06-04 17:05:37 -04:00
Ivan Vasilov
181f15752c chore: Move the files in ui-patterns under src folder (#36032)
* Move all components in ui-patterns into src folder. Add exports field for all files.

* Fix all apps to use the new ui-patterns.

* Fix the design-system build.

* Remove all unused rexports from ui-patterns index. Apps should use direct imports instead.

* Change the tailwind content property to include src folder of ui-patterns.

* Remove autoprefixer from the tailwind configs.

* Remove autoprefixer as a dependency.

* Fix the CVA conditions in FormLayout.
2025-05-30 12:46:22 +03:00
Charis
f58eead769 chore(docs): clean up environment variables (#36036)
Our environment variables are a bit of a mess, so cleaning them up:

- We have duplicate environment variables that resolve to the same thing
but just have different names, deduplicating all of these
- We have a .env.development (for publicly safe variables) and a
.env.example, we
really only need one
- Privately, we have a .env (for running scripts) and a .env.local (for
Next.js). Changing the dotenv source for scripts, so again we only need
one
2025-05-29 16:35:26 -04:00
Charis
33b9e1ed29 chore(docs): convert all scripts to esm (#35996)
Scripts currently use CJS, which is causing a bit of a mess when trying
to use shared utilities from the app. Converting everything to ESM so
there are fewer conflicts when adding new scripts going forward.
2025-05-29 15:44:55 -04:00
Charis
0e2183f5b1 feat(docs): add github link to troubleshooting articles (#36000) 2025-05-28 16:06:50 -04:00
Charis
8aea2cd6c7 seo(docs): canonical links for reference pages (#35977)
To avoid content duplication warnings, direct all canonical links for
reference pages to the newest library version.
2025-05-28 10:51:32 -04:00
Charis
75567e4075 chore(docs): remove unnecessary toml package (#35970)
We have two packages for handling toml, which is a bit unnecessary.
Settle on smol-toml as it is under more active maintenance.
2025-05-27 11:57:27 -04:00
Charis
37d92e81c3 refactor(docs): turn auth error codes table into data file (#35857)
* refactor(docs): turn auth error codes table into data file

Take the Markdown error codes table and turn it into a data file
instead. This makes it easy to parse and reuse in other places besides
Markdown documents.

* Update apps/docs/content/errorCodes/authErrorCodes.toml

Co-authored-by: Terry Sutton <saltcod@gmail.com>

---------

Co-authored-by: Terry Sutton <saltcod@gmail.com>
2025-05-27 14:10:40 +00:00
James
b1060751b9 Add rel=edit attribute to GitHub docs edit link (#35678)
Update GuidesMdx.template.tsx
2025-05-23 10:59:29 +00:00
Charis
3bfc74812e fix(troubleshooting sync): use proper graphql variables (#35813)
Don't know why I was using string interpolation instead of GraphQL
variables for the GitHub API calls, leading to all kinds of escaping
problems. Changed to using GraphQL variables properly.
2025-05-21 17:01:56 -04:00
Charis
e4d76be290 chore(docs): allow partners fetch to be revalidated by tag (#35676)
## Before

Partners fetch is showing stale data from a few months ago

## After

Partners fetch can be revalidated by tag. The revalidation will be
triggered by a DB function when the partners table is changed.
2025-05-14 14:13:11 -04:00
Charis
6ba23ac7c9 fix(docs): crawlers page generation for pages with mdx components (#35629)
# Before

Crawlers pages that used MDX components with defined attributes errored.
Example: /docs/reference/kotlin/installing

# After

The pages do not error.
2025-05-13 09:24:21 -04:00
Ivan Vasilov
0cb08341f6 chore: Bump nextjs for the docs app (#35333)
* Bump all versions of postcss to 8.5.3.

* Run next/codemod on the docs app.

* Move two experimental flags into stable. Add next-mdx-remote as a transpiled package.

* Add extra folders to the clean command in docs.

* Fix type errors in docs test.

* Run prettier on the new files.

* remove turbopack, fix fetch revalidation, fix metadata awaits

Couple of minor fixes:
- Turbopack doesn't work in dev because of known MDX loader limitations
(cannot load functions in MDX plugin config)
- Fetches not cached by default anymore in Next 15 so need to manually
cache the ones we need
- Missing a few awaits for metadata generation with page params

* Bump the graphiql version because headlessui/react is not building with Next 15.

---------

Co-authored-by: Charis Lam <26616127+charislam@users.noreply.github.com>
2025-05-08 09:27:22 +00:00
Charis
03dcd51700 feat(content api): search result for cli reference (#35488)
## Before

Search results ignored if they are CLI references.

## After

Search results returned for CLI references.
2025-05-06 19:23:40 -04:00
Kevin Grüneberg
e1bd23d66f fix: do not translate USD prices (#35466)
When translation tools go over prices, they wrongfully convert USD into other currencies without changing the price. $25 becomes Rp25 (Rupiah).

By using `translate='no'` we avoid the translation of pricing info. There are some tooltips left that are not covered yet, but this should be the majority already.

Kept the docs Pricing component as simple as possible, just wrapping in a span to avoid translation, not modifying any formatting.
2025-05-06 12:03:35 +08:00
Charis
bf71606db8 refactor (content api): helper classes for errors (#35288)
Splitting out a PR with some helper classes for error handling that will be used
donwnstream.
2025-05-05 14:03:42 -04:00
Francesco Sansalvadore
a4cfcd9b2e global user dropdown in docs and www (#35063)
* docs: user nav dropdown

* www: user dropdown nav

* update menus

* chore: add complete local storage allowlist

* move all local-storage to common

* reload after logOut

* add local storage key changes from #35175

* fix errors

* add more keys

* fix merge bugs

---------

Co-authored-by: Alaister Young <a@alaisteryoung.com>
2025-05-05 11:48:06 +02:00
Alaister Young
2b419c70a1 chore: add usercentrics for consent management (#35384)
* chore: add usercentrics for consent management

* client component to make next.js happy

* address feedback

* move consent state to common

* fix import

* ensure page events are sent correctly

* add feature flag provider to ui library site

* fix ui lib 500 error

* skip in test env

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
Co-authored-by: Jordi Enric <jordi.err@gmail.com>
2025-05-05 13:18:48 +08:00
Charis
f611fa11d9 feat (content api): add schemas and models for search results and guides (#35284)
Add models and GraphQL interface definitions for search results and guides (representing Markdown documents such as tutorials, etc.).

These aren't connected to anything yet, but putting them in a separate
PR to keep the review short and relatively simple.

Towards DOCS-214
2025-05-02 12:03:41 -04:00
Charis
02aea98053 docs(third-party auth,clerk): correct examples (#35412)
Correct the code examples for the Clerk third-party auth docs:
- Fix TypeScript error
- Change RLS policy check to accept both [Clerk v1 and v2
JWTs](https://clerk.com/docs/backend-requests/resources/session-tokens)

Pulled code samples from an example app that I've checked in to make
maintenance and testing easier in the future.
2025-05-02 11:13:19 -04:00
Charis
ee87cc20e8 ci(docs): fix build timeouts (#35336)
Fix build timeouts by skipping type generation for reference pages
2025-04-28 16:54:07 -04:00
Charis
9846052217 build (docs): lower docs preview build times (#35183)
An experiment in lowering docs preview build times. Build times have gotten quite long again (~12 minutes) because we are generating types on code blocks during prerendering. This wastes compute time building a lot of pages on preview branches that never get viewed, and slows down iteration speed.

Instead, let's only prerender on prod, and build on-demand for preview sites.

Limiting to realtime section for now to monitor the effects of changes.
2025-04-24 15:04:03 -04:00
Charis
9d9fdcd9fc feat (docs): on-demand revalidation for graphql and wrappers (#35177)
Before:

Revalidation was turned off entirely for wrappers pages, and done daily for GraphQL pages.

After:

Revalidation is via tag. There is an /api/revalidate endpoint that is used by GitHub Actions on the federated repos to trigger the revalidation. This decreases the number of unnecessary page generations by Vercel, and gives the maintainers of federated repos more fine-grained control over when to reploy their docs (see the docs deployment playbook for more info).
2025-04-24 14:59:38 -04:00
Francesco Sansalvadore
495cff3df0 remove lw14 promos (#35253)
remove lw14 promo
2025-04-24 10:33:39 -07:00
Charis
84914090f9 fix(docs): change code block theme (#34940)
Code block theme used Vitesse.

Code block theme uses the custom Supabase 2 theme, which matches the UI
library and design system sites.
2025-04-15 16:49:49 +00:00
Charis
258bc37919 docs: add type hints (#34678) 2025-04-08 13:25:46 -04:00
hallidayo
3bbccdfa65 fix: 34423 (#34714)
* min width class

* spacing
2025-04-04 14:47:31 +00:00
Charis
cd81c36ffd fix: docs tests (#34679) 2025-04-03 10:14:25 -04:00
Charis
c4afb75461 fix: code blocks (#34427) 2025-03-31 12:15:22 -04:00
Charis
7f1644c283 feat(docs): type hints mobile (#34521)
Also enable type hints on mobile.
2025-03-31 12:05:27 -04:00
Goszczu
94e919d417 lw14 ticketing #34444
* mamba init

* shader-updates

* feat: add better bloom

* cleanup

* Fix GLTF model loading to respect original material properties

Signed-off-by: Piotr Goszczyński <pg@tonik.com>

* Fix GLTF model loading to respect original material properties

Signed-off-by: Piotr Goszczyński <pg@tonik.com>

* stash changes

* Update font to Arial in mamba ticket component

Signed-off-by: Piotr Goszczyński <pg@tonik.com>

* Fix wireframe size in debug mode

Signed-off-by: Piotr Goszczyński <pg@tonik.com>

* Fix wireframe size in debug mode by attaching to child mesh instead of model

Signed-off-by: Piotr Goszczyński <pg@tonik.com>

* fix scaling

* fix

* feat: load png with color material

* fix: spline material

* add toggling of effects

* stash

* feat: ticket model

* load better model

* strcture

* fix rotation speed

* rotation

* fix rotation

* new model

* prepare final designs

* add color palette

* feat: add fonts and rendering

* render dynamic texture

* load all textures

* fix: color sace

* feat: secret model

* improve perf

* postprocessing

* fix: output pass

* improve shaders

* increase glitches

* cleanup

* update colors

* remove unused files

* add header

* feat: ui

* fix: raycaster

* feat: add button toggling

* Improve ui

* fix corners positoins

* add tunnel effect

* fix: dates

* add dynamic rocket position rendering

* add different logs

* feat: add migrations and connect to real data

* chore: state cleanup to use reducer

Migrate logic to centralized reducer for ease of debugging

* feat: add hud layout

* add grain effect to hud

* limit glitching, move page to main url

* add vignette effect

* fix: desktop layout

* remove vertical space

* feat: save secret state on ticket upgrade

* feat: make platinum version take priority over secret

* add mobile header

* remove unnecessary allocations

* fix: resize hud

* add page scaling for mobile layouts

* add ticket scaling based on resolution

* adjust mobile styles

* fix: resize texture distortion

* add gauges mobile breaking points

* feat: mobile claim layout

* mobile styles

* Show ticket referer

* rename files

* update copy links

* add partymode part 1

* feat: og images, lw14

* add presence tracking

* add live updates of guages

* Update meetups label

* update label

* username ticket lw14

* add proper subscription on first render

* remove green edge

* feat: remove species & planet from ticket scene

* change urls

* feat/mamba-assets: update assets

* feat: fix shader grain

* add color to shader

* remove vertical space

* fix: og image generation

* fix referal and removing of access token

* make urls nicer

* feat/mamba-assets: dynamic line break + dynamic background

* small adjustments

* add trimming to ogimages

* minor: missing font file

* fix og image line wrapping

* remove dot from meetups

* improve ticket quality

* upss, forgot to commit one file

* feat add dynamic og image linking

* update static site url

* fix low mobile resolution

* add banners

* simplify banner loading

* add missing fonts

* fix name breaking to prioritize spaces

* update quality based on devicePixelRatio

* fix button positioning

* revert: feature flags disabling

* update start date

* limit shader effects and disable axis, potential fix to chrome freeze

* feat: init mamba 01

* create narrow ticket scene

* narrow scene for ticket and fix follow mouse

* fix dates

* alternative version

* updated ticket page

* remove migrations

* remove files

* prettier

* prettier

* Fix TS and prettier issues

* Fix TS issues

* Test

* Remove console log

* fix updating ticket on share

* chore: lw cleanup

* fix ticket layout

* fix chrome crashes

* lower crt intensity

* tunnel improvements

* fix tunnel effect

* chore: z-index and prettier fix

* chore: padding

* fix double tunnel

* chore: font on banners

---------

Signed-off-by: Piotr Goszczyński <pg@tonik.com>
Co-authored-by: dztonik <dz@tonik.com>
Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
Co-authored-by: Francesco Sansalvadore <f.sansalvadore@gmail.com>
2025-03-27 15:55:47 +00:00
Charis
e99725ccf5 fix: syntax highlighting in cli reference (#34451)
Swap out the old code blocks for Shiki, which has a better highlighter and is consistent with code block styling elsewhere in docs.
2025-03-26 16:19:44 -04:00