Commit Graph

160 Commits

Author SHA1 Message Date
Pamela Chia 5ce163fd69 feat(docs): add BreadcrumbList JSON-LD to guide pages (#45477)
## Summary

Emits `BreadcrumbList` JSON-LD on every `/docs/guides/*` page served by
`GuideTemplate`. Search engines and AI crawlers get an explicit
hierarchical signal for the docs site (the marketing site already
shipped JSON-LD via #45451). The chain prepends `Docs > Guides` to the
existing resolver output, so a page like `/docs/guides/auth/passwords`
produces a 5-level chain with the leaf URL set per Google's spec.

## Changes

- New `apps/docs/lib/breadcrumbs.ts`: pure pathname → chain resolver,
server-safe. Extracted from the existing client `useBreadcrumbs` hook so
the same logic runs in both contexts.
- New `apps/docs/lib/json-ld.ts`: `serializeJsonLd` +
`breadcrumbListSchema` mirroring `apps/www/lib/json-ld.ts`.
- `Breadcrumbs.tsx` (visual) now delegates to the shared resolver —
single source of truth for visual + SEO chains.
- `GuideTemplate` takes a required `pathname` prop and emits `<script
type="application/ld+json">` next to `<Breadcrumbs />`. Skipped when the
chain is empty (e.g., page not in nav menu). Middle items without URLs
(e.g., the "Auth" section root) omit `item`, matching the visual
breadcrumb.
- 8 explicit-prop callers updated; `[[...slug]]` callers already spread
`data` (which carries `pathname`).

## Scope

**Out of scope:**
- `/docs/reference/*` (SDK reference) — no breadcrumbs rendered today,
would need separate traversal over spec JSON.
- `/guides/troubleshooting/*` — uses its own template, not
`GuideTemplate`.
- `TechArticle` per-page schema — high maintenance for marginal value.

## Testing (Vercel preview)

```bash
curl -s https://<preview>/docs/guides/auth/passwords | grep -oE '<script type="application/ld\+json"[^>]*>[^<]+</script>'
```

Expect a script tag with the chain `Docs > Guides > Auth > Flows
(How-tos) > Password-based`, leaf URL
`https://supabase.com/docs/guides/auth/passwords`.

- [x] `/docs/guides/auth/passwords` — 5-item chain, leaf URL present
- [x] `/docs/guides/getting-started/features` — 4-item chain, all items
have URLs
- [x] `/docs/guides/getting-started/ai-prompts/<slug>` — special-case
chain (`Getting started > AI Tools > Prompts > <slug>`), leaf URL falls
back to pathname
- [x] `/docs/guides/database/database-advisors` (explicit-prop caller) —
chain renders
- [x] Visual breadcrumb on the same pages still renders correctly
- [ ] Validate output through [Google Rich Results
Test](https://search.google.com/test/rich-results) on a deployed preview
URL
- [x] `/docs/guides/troubleshooting/<slug>` — no JSON-LD emitted
(different template, intentional)

## Linear

- fixes GROWTH-820

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Added JSON-LD breadcrumb markup to guide pages to improve
search/discovery.

* **Improvements**
* Centralized breadcrumb generation for consistent, accurate breadcrumbs
across guides.
* Multiple guide pages updated to ensure breadcrumbs and page context
display correctly.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-05-07 12:09:41 +08:00
Gildas Garcia 743d665dfe chore: migrate from next-mdx-remote to next-mdx-remote-client (#45149)
## Problem

We want to upgrade to react 19. However some libraries aren't compatible
with it. Besides, `next-mdx-remote` is now archived and not maintained
anymore.

## Solution

The [NextJS
documentation)[https://nextjs.org/docs/15/app/guides/mdx#remote-mdx]
suggest using
[`next-mdx-remote-client`](https://github.com/ipikuka/next-mdx-remote-client)
which was a fork of `next-mdx-remote`.

- [x] migrate `apps/www` from `next-mdx-remote` to
`next-mdx-remote-client`
- [x] migrate `apps/www` from `next-mdx-remote` to
`next-mdx-remote-client`

I haven't noticed any change in the pages.
When upgrading to react 19, we'll have to use v2 of
`next-mdx-remote-client`.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Refactor**
* Switched MDX rendering/serialization to a newer client-focused
implementation across docs and site for improved compatibility.

* **Bug Fixes**
* Improved handling of serialization errors so MDX failures render clear
fallback messages instead of breaking pages.

* **Chores**
* Updated local environment template value for the public anonymous key.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-05-06 16:02:49 +02:00
Jeremias Menichelli 5e6e2ec0c1 fix(Docs): Migrate the rest of the raw.githubcontent calls to new util (#44274) 2026-03-27 11:55:36 +01:00
Jeremias Menichelli b84068f173 fix(Docs): Apply retry strategy, improve error throwing (#44173) 2026-03-25 11:08:56 +01:00
Jeremias Menichelli c0e60adf3d fix(Docs): Remove raw GitHub endpoint calls and move ot Octokit. Create common util for GitHub files. (#44079) 2026-03-24 15:05:55 +01:00
Ali Waseem e99ea31e0a fix: updated guides data out of mdx into separate tsx file (#42751) 2026-02-12 12:45:25 -07:00
Ivan Vasilov 3a98d32b6e chore: upgrade next-mdx-remote to v6 in apps/docs (#42748)
## I have read the CONTRIBUTING.md file.

YES

## What kind of change does this PR introduce?

Dependency upgrade (next-mdx-remote v4 → v6)

## What is the current behavior?

The docs app uses next-mdx-remote v4.4.1 with MDX v2.

## What is the new behavior?

- Upgraded to next-mdx-remote v6.0.0 (uses MDX v3)
- Updated @mdx-js/loader and @mdx-js/react to v3
- Upgraded remark-gfm to v4 for MDX v3 compatibility
- Removed deprecated `useDynamicImport` option (now default)
- Added `blockJS: false` to preserve JS expressions in MDX content

Build compiles successfully. Testing shows the same pre-existing
prerender error on /guides/troubleshooting as on master (supabaseUrl is
required).

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Chores**
* Upgraded MDX and markdown tooling to major releases (MDX v3,
next-mdx-remote v6, remark-gfm v4).
* Adjusted MDX serialization to disable embedded JS handling and remove
legacy dynamic-import behavior for more consistent rendering of docs,
guides, and code examples.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-12 19:01:53 +00:00
Chris Chinchilla d158e7142a docs: Allow for customisable CLI profiles in ref docs (#40181)
* Allow for customisable CLI profiles in ref docs

* Prettier

* Type fix

* Prettier

* Changes from review

* Set default config

* Handle empty values
2025-11-06 08:51:15 +01:00
Ivan Vasilov 3e8baa2236 chore: Disable sending the Lock error to Sentry (#39999)
Disable sending the Lock error to Sentry.
2025-10-30 10:22:20 +01:00
Charis f1e4970352 db: allow public read access to troubleshooting entries table (#33172)
* db: allow public read access to troubleshooting entries table

* chore: allow troubleshooting generation from public client
2025-10-23 13:24:23 +00:00
Joshen Lim f2122b64f2 Chore/remove unpaginated projects endpoint from docs (#39771)
* Use paginated projects endpoint for docs

* Deprecate old projects query

* Fix

* Fix

* fix(docs branch selector)

* refactor(docs project selector): simplify dom

---------

Co-authored-by: Charis Lam <26616127+charislam@users.noreply.github.com>
2025-10-22 23:39:13 +08:00
Stojan Dimitrovski 401d6fe892 feat: add navigator lock debugging to track down some rare issue (#39688)
* feat: add navigator lock debugging to track down some rare issue

* send exception to sentry
2025-10-21 11:40:33 +02:00
Chris Chinchilla 671c109fa0 docs: update key dropdowns to use new key values (#39428)
* Draft

* Draft

* Draft

* fix: wrong query key

* Final tweaks

* Add to other pages

* Update apps/docs/content/guides/getting-started/quickstarts/ios-swiftui.mdx

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>

* Update apps/docs/content/guides/getting-started/quickstarts/kotlin.mdx

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>

* Update apps/docs/content/guides/getting-started/quickstarts/nextjs.mdx

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>

* Update apps/docs/content/guides/getting-started/quickstarts/nuxtjs.mdx

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>

* Update apps/docs/content/guides/getting-started/quickstarts/reactjs.mdx

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>

* Update apps/docs/content/guides/getting-started/quickstarts/solidjs.mdx

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>

* Update apps/docs/content/guides/getting-started/quickstarts/sveltekit.mdx

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>

* Update apps/docs/content/guides/getting-started/quickstarts/vue.mdx

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>

* Update apps/docs/content/guides/getting-started/quickstarts/refine.mdx

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>

* Update apps/docs/components/ProjectConfigVariables/ProjectConfigVariables.tsx

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>

* Update apps/docs/components/ProjectConfigVariables/ProjectConfigVariables.tsx

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>

* Prettier

---------

Co-authored-by: Charis Lam <26616127+charislam@users.noreply.github.com>
2025-10-16 15:48:57 +02:00
Charis f9ea453fc6 feat(docs): make page title customizable via feature flag (#39415) 2025-10-10 10:21:09 -04:00
Devanshu Sharma 0674343912 Fix(docs): prevent SecurityError from rapid history.replaceState call… (#38672)
* Fix(docs): prevent SecurityError from rapid history.replaceState calls during fast scrolling

* url now chases the scroll

* fixing merge conflicts

* refactor: minor changes to safeHistoryReplaceState

---------

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>
2025-09-18 21:00:10 +00: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
Charis 0c0be801ae chore(docs): add logflare logging (#37310) 2025-07-31 15:10:37 -04:00
Charis ce14f305ac feat: hybrid search (#37127)
Implement hybrid search for the /docs/api/graphql searchDocs endpoint. Prepend a more descriptive title and introduction to database advisor docs so they rank more highly when directly searched for.
2025-07-14 16:29:01 -04:00
Charis 68cb1a1870 feat(content api): add management api references to semantic search (#36289)
* docs: add cursor rule for embedding generation process

Add documentation for cursor IDE about how docs embeddings are generated,
including the workflow for creating and uploading semantic search content.

* feat: improve API reference metadata upload with descriptive content

- Add preembeddings script to run codegen before embedding generation
- Enhance OpenApiReferenceSource to generate more descriptive content including
  parameters, responses, path information, and better structured documentation

* feat: add Management API references to searchDocs GraphQL query

- Add ManagementApiReference GraphQL type and model for API endpoint search results
- Integrate Management API references into global search results
- Update test snapshots and add comprehensive test coverage for Management API search

* style: format
2025-06-18 09:12:03 -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 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 aba0095bd7 feat(content api): add error endpoint (#35941)
* feat(content api): add error endpoint

Add an endpoint to return the details of a Supabase error, given the
error code and service.

Schema additions:

```graphql
type RootQueryType {
  "...previous root queries"

  """Get the details of an error code returned from a Supabase service"""
  error(code: String!, service: Service!): Error
}

"""An error returned by a Supabase service"""
type Error {
  """
  The unique code identifying the error. The code is stable, and can be used for string matching during error handling.
  """
  code: String!

  """The Supabase service that returns this error."""
  service: Service!

  """The HTTP status code returned with this error."""
  httpStatusCode: Int

  """
  A human-readable message describing the error. The message is not stable, and should not be used for string matching during error handling. Use the code instead.
  """
  message: String
}

enum Service {
  AUTH
  REALTIME
  STORAGE
}
```

* test(content api): add tests for top-level query `error`
2025-05-29 15:39:47 -04: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
Charis badcf17f70 feat(content api): add client library api reference search results (#35484)
* feat(content api): add client library api reference search results

Allow searchDocs results to also return function references from the
client library APIs

* fix(content api): refine language enum handling
2025-05-06 13:11:29 -04:00
Charis df4b1867b8 feat (content api): add global search query (#35290)
Add a top-level field to search docs globally. Right now this only
returns Markdown guides (not references, GitHub discussions, or partner
pages.

The full GraphQL schema at this point:

```
schema {
  query: RootQueryType
}

type RootQueryType {
  """Get the GraphQL schema for this endpoint"""
  schema: String!

  """Search the Supabase docs for content matching a query string"""
  searchDocs(query: String!, limit: Int): SearchResultCollection
}

"""A collection of search results containing content from Supabase docs"""
type SearchResultCollection {
  """A list of edges containing nodes in this collection"""
  edges: [SearchResultEdge!]!

  """The nodes in this collection, directly accessible"""
  nodes: [SearchResult!]!

  """The total count of items available in this collection"""
  totalCount: Int!
}

"""An edge in a collection of SearchResults"""
type SearchResultEdge {
  """The SearchResult at the end of the edge"""
  node: SearchResult!
}

"""Document that matches a search query"""
interface SearchResult {
  """The title of the matching result"""
  title: String

  """The URL of the matching result"""
  href: String

  """The full content of the matching result"""
  content: String
}
```

Towards DOCS-214
2025-05-05 14:32:10 -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
Charis f3583a05bc fix(docs): branch for wrappers docs (#35340)
Wrappers docs should not be pulled from the main branch, which contains
unreleased content, but instead from the latest release tag.
2025-04-29 15:39:46 -04:00
Charis ef247b8f5f feat(docs): fetch conn string (#34492)
* feat(docs): fetch conn string

Add option to ProjectConfigVariables to fetch the Supavisor session mode connection string, for setting up MCP server

* docs(mcp): reminder to replace password placeholder in connection string

* fix: display helpful message if project paused

---------

Co-authored-by: Greg Richardson <greg.nmr@gmail.com>
2025-03-28 13:17:29 -04:00
Charis 37923df609 fix: move docs off deprecated endpoint (#34490)
Docs is using a deprecated endpoint to get the API keys for the project variables component. Move to a new endpoint.
2025-03-27 16:44:54 -04:00
Charis 311232b3e1 feat(docs): ts hover annotations on code blocks (#34327) 2025-03-21 15:48:32 -04:00
Charis 2709fa4a3e feat: pre-compile-time partials (#34028)
Partials are currently defined via MDX includes. This PR switches to pre-compile-time partials, which have a new syntax:

```
<$Partial path="path/to/file.mdx" />
```

## Rationale

This produces two improvements:

1. Partial substitution can occur in pipelines that don't use MDX compilation. For example, we can now do partial substitution before building the search index, so partial content will also be indexed.
2. After the App Router migration, the MDXProviders should've been deprecated, but were kept around for the sole reason of making partials work, and leading to us shipping unnecessary client-side code. We get a minor decrease in overall client bundle size (5.74 MB to 5.6 MB) by getting rid of the Providers.

## Breaking changes

Besides the change to partial syntax, the arguments are also less powerful than before because we are doing string substitution and don't have the full power of JS. Defining string variables is still possible (documented in the Contributing guide), and since that's all we actually do in practice, this shouldn't be too cumbersome. There is always the escape hatch of making a custom component for more complex content reuse cases.
2025-03-18 10:37:39 -04:00
Charis 44db2d3f16 refactor: split guide layouts by section (#32694)
Split guide layouts by section, so that nav data fetches can be pushed down to thesection where they're actually used. Limits blast radius of any data fetch problems, and also lets us push down client components in the future, since layouts now have context on the request path and we don't need a high-level usePathname.
2025-01-30 11:04:43 -05:00
Alaister Young 30c390c19c chore: unify telemetry event sending (#32861)
* chore: unify telemetry event sending

* organize some imports

* remove final useTelemetryProps

* add www telemetry actions typing and docs

* remove gaevents

* fix build

* move telemetry identify into PageTelemetry

* fix telemetry constants import

---------

Co-authored-by: Pamela Chia <pamelachiamayyee@gmail.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-01-22 23:52:32 +08:00
Alaister Young 9d534c9f5a fix: response error codes (#30581)
* fix: response error codes

* upgrade docs

* remove request url modification middleware

* move api routes for self-hosted to platform folder

* remove some lib/common/fetch usage

* docs: use middleware for openapi-fetch (#30600)

Get rid of the unauthedAllowedPost function (I don't think there's any harm in letting any requests that require authentication to just 403, they should be disabled at the React Query level and if not they will fail gracefully enough...)

* fix local count query

* add default values for clone mutation

* fix ts and codegen

* add missing lodash dep to playwright tests

* Fix the playwright tests to match the new folder structure for selfhosted variant.

* remove unused import

* Remove unused state

* remove unused sql debug mutation

* remove unused export

* fix notifications query

* fix jwt updating status

* fix typescript

* save sql snippet after renaming

* update codegen & fix ts error

* override array querySerializer

---------

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2025-01-20 11:27:38 +08:00
Ivan Vasilov 84311e7d09 chore: Fix the env vars for turbo (#31104)
* Check all env vars for studio and list them properly in turbo.json.

* Check all env vars for design-system.

* Fix all env vars for www.

* Fix all env vars for docs.

* Add the rest of the env vars from the packages folder.

* Revert the changes in the sign-in pages.

* Remove useless files. Fix a comment.

* Fix the links in extensions page to always point to supabase.com/docs.

* Change the feature flag rewrite in studio to point to supabase.com/.flags endpoint.

* Replace NEXT_PUBLIC_VERCEL_URL with NEXT_PUBLIC_VERCEL_BRANCH_URL because it's more stable on vercel.com. Remove it from apps where it's not needed.

* Add env vars from packages. Move all passthrough env vars to env vars since they're stable (don't change between pushes).

* Revert changes of studio files.

* Minor fixes for the merge commit.

* Replace all uses of SITE_URL with LW_URL (they're the same). SITE_ORIGIN is not constructed from env vars. LW_URL is constructed from SITE_ORIGIN and launch_week string.

* Use SITE_ORIGIN when fetching the ticket-og.
2025-01-17 11:08:14 +01:00
Charis 699f708b0c fix: make examples available for isr (#32610)
The examples folder needs to be explicitly included in the Vercel Serverless bundle. Because it's at the root of the monorepo rather than being within the `app/docs` folder, we copy it over pre-build (and pre-dev).

Test the examples/prompts fix by re-enabling revalidations on graphql pages. Added a temp version of the fetch function so we can gradually reenable and monitor Vercel error rates over time.
2025-01-14 18:38:21 -05:00
Alaister Young 4577389177 chore: send feature flags for page events (#32590) 2025-01-13 13:08:50 +08:00
Kevin Grüneberg 4eca1ecbb7 fix: deprecation comments (#32617)
Using `//` deprecations are not properly recognized as JSDoc doesn't work like that.
2025-01-07 15:58:06 +08:00
Julien Goux aa0fedfc39 chore: node v22 LTS compatibility for contributing (#30970)
* chore: node v22 LTS compatibility for contributing

* missing assertions

* apply prettier
2024-12-12 11:29:07 +01:00
Charis dbbbc20d63 enh(docs): more checks for external CodeSample (#29799)
We allow fetching external data in CodeSamples into a MDX environment, so we have to be careful about preventing code execution.

Current checks:

- External data is inserted as a code block (via the AST, not direct string manipulation), so it is escaped.

Added two new layers of checks:

- Allow-list of organizations, currently set to Supabase-only
- Only allow immutable commit references
2024-11-22 14:17:15 -05:00
Charis 4a82aabaf0 feat(docs): sync troubleshooting (#29933)
When a troubleshooting entry is created or updated in this repo, sync it to GitHub. This creates a new troubleshooting discussion if one does not exist, and updates the content on an existing troubleshooting discussion if it has changed.

To preserve the connections between GitHub discussions and Markdown files, record the discussion ID and URL to the database. The database ID is then written to the Markdown file, and a new PR is generated to commit the new Markdown with ID.

There is currently no mechanism to delete outdated discussions. That will be a follow-up.
2024-10-29 12:58:46 -04:00
Joshen Lim ed207751ad Update telemetry calls for docs to support PH (#29749)
* Update telemetry calls for docs to support PH

* Update telemetry calls for www to support PH

* Add ts ignore

* Remove use of useRouter for docs

* Add credentials include for www and docs for telemetry calls

* Update TELEMETRY_CONSENT in common for www and docs to reset telemetry opt in preference

* Update common telemetry to use new endpoint and payload, and trigger reset request when opting out of telemetry from ui patterns PrigacySettings

* Fix

* Fix

* Fix

* Fix build issue in docs

* Fix build issue in docs

* I hope this fixes the build issues

* once more...

* Fix

* Add credentials include

* Fix
2024-10-16 15:16:33 +08:00
Charis 41d924b074 feat: new docs ia (#29364)
New Docs IA, mainly splitting up the miscellaneous bucket that is Platform into multiple sections
2024-10-09 12:38:34 -04:00
Joshen Lim 336d623910 Chore/refactor telemetry calls for dashboard to support PH (#29747)
* Refactor telemetry event into RQ hook, and update to support PH

* Refactor telemetry identify into RQ hook, and update to support PH

* Refactor telemetry page into RQ hook, and update to support PH

* Clean up and deprecate lib/telemetry

* Pretty

* Add ts-ignore in docs for telemetry calls temporarily

* Add credentials include for send event, page and identify mutation hooks

* Add consent check for event and page telemetry, allow RQ mutations for those to fail silently without a toast
2024-10-09 14:32:30 +08:00
Charis a29dc5de4b feat(docs): main troubleshooting page (#29120)
* feat(docs): main troubleshooting page

* feat(docs): global troubleshooting page layout

* feat(docs): global troubleshooting page filter logic

* enhance(docs): troubleshooting page ui & filters

Improve UX and accessibility of global troubleshooting search page.

- Implement TroubleshootingFilterStateProvider for managing filter state
- Add TroubleshootingFilterEmptyState component
- Improve TroubleshootingFilter UI with applied filters display
- Update TroubleshootingPreview component with better layout and accessibility
- Add TroubleshootingEntryAssociatedErrors component for displaying related errors
- Refactor Troubleshooting utils and schemas
- Update troubleshooting content template

* feat(docs): individual troubleshooting pages

Add individual pages for detailed information on troubleshooting
entries. Small fixes to UI for troubleshooting displays.

- Wrap GlobalTroubleshootingPage with SidebarSkeleton
- Add TroubleshootingErrorListDetailed component for detailed error display
- Implement TroubleshootingBackLink component for navigation
- Update TroubleshootingPreview to use Next.js Link and include parent page
- Refactor Footer component to accept className prop
- Add hideFooter option to SidebarSkeleton
- Minor updates to TopNavBar and other utility functions

* fix: minor styling issues

* tweak(troubleshooting docs): use breadcrumbs

* tweak(troubleshooting docs): use sidebar for filter

* enhance(troubleshooting docs): navigation, keywords

Better navigation for individual troubleshooting entries, using a
version of the sidebar + keywords handling via search params for good
linking behavior

Details:

- Add TroubleshootingSidebar to TroubleshootingPage
- Implement query state management for keywords using nuqs
- Improve accessibility and styling of troubleshooting components
- Update empty state handling and related keywords display
- Upgrade nuqs package to version 1.19.1

* fix(docs): wrap useSearchParams in Suspense

* seo(docs): add canonical link to troubleshooting

* enhance(docs,troubleshooting): auto-reveal errors

On troubleshooting search pages, if the searched term matches a hidden
error, auto-reveal it when searching. When the search term is cleared,
hide programmatically-opened errors while preserving user-opened ones.

* enhance(docs,troubleshooting): search bar

Add search bar to individual troubleshooting pages

* fix(docs): breadcrumb links

Fix breadcrumb linking so it uses next/link instead of reloading entire
app on navigation.

* fix(docs): typo

* enh(docs): new troubleshooting design

* enh(docs): use new multi-select

* enh(docs): troubleshooting responsive styles

* Update apps/docs/content/troubleshooting/monitor-supavisor-postgres-connections.mdx
2024-10-02 17:10:12 +00:00
Ivan Vasilov cb1e3a8170 chore: Prep work for pnpm (#29610)
* Add all missing libraries in the packages/apps.

* Add all missing Vitest imports to the tests.

* Add some missing exports to ui.

* Fix the admonition export.

* Fix various minor bugs.

* Migrate the ui package to use vitest.
2024-10-01 11:29:37 +02:00
Charis 16f2b8e19a fix(docs): mkdocs admonitions (#29565) 2024-09-27 17:49:00 -04:00
Charis c2fe11850d feat: embed code samples from github (#29519)
Add the ability to embed code samples from GitHub into tutorials, so we can have a single source of truth for the source code.

Introduces the <$CodeSample /> syntax, which is a special syntax and not a real React component (see the directives/README.md for why on earth I did it this way -- in this specific case, CodeHike adjusts the MDX syntax tree before it gets compiled, and we need to adjust it ourselves before CodeHike sees it, so we need to get down to the level of manipulating the AST in order to make this work with CodeHike).

Adjusted one of the example tutorials to use this new feature as a test.
2024-09-26 15:54:57 -04:00