Commit Graph

21 Commits

Author SHA1 Message Date
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
Ivan Vasilov
070316cb87 chore: Migrate all scss files to css (#44268)
This pull request migrates all SCSS stylesheets in the `apps/studio` and
`apps/docs` projects to CSS, updates import paths accordingly, and
consolidates PostCSS configuration to use a shared config. The migration
includes renaming files, updating import statements, converting SCSS
comments to CSS comments, and removing redundant or legacy configuration
files. The changes improve maintainability and consistency across the
codebase.

**Migration from SCSS to CSS:**

* All SCSS stylesheets in `apps/studio/styles` and `apps/docs/styles`
have been renamed to `.css`, and their contents updated by converting
SCSS comments (`// ...`) to CSS comments (`/* ... */`). All relevant
import statements in the app entry points have been updated to reference
the new `.css` files.

**PostCSS configuration consolidation:**

* The separate `postcss.config.cjs` files in `apps/design-system`,
`apps/learn`, and `apps/studio` now all import from a shared
`config/postcss.config`, ensuring consistent PostCSS setup across
projects. The legacy `postcss.config.js` in `apps/studio` has been
removed.

**Code and style consistency improvements:**

* All instances of the SCSS-specific `#{!important}` in Tailwind
`@apply` rules have been replaced with the standard CSS `!important`
syntax.
* Minor fixes and comment updates were made throughout the stylesheets
to improve readability and maintainability, such as moving or clarifying
TODOs and notes.

These changes streamline the styling approach, reduce build complexity,
and make it easier to maintain and scale the design system and
documentation styles.

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

* **Refactor**
  * Consolidated PostCSS configuration across apps
  * Migrated many stylesheet imports from SCSS to CSS
  * Standardized CSS comment and @apply syntax for consistency

* **Chores**
  * Removed SCSS (sass) dev dependency
  * Added autoprefixer and tailwindcss/nesting to PostCSS plugins
  * Removed SCSS module type declarations (cleaned up typings)
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-04-20 13:58:01 +02:00
Ivan Vasilov
bed5a96349 chore: Bump Typescript to v6 (#44204) 2026-03-26 15:27:35 +01: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
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
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
fc164b5d07 Refactor/app router refs (#28095)
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.
2024-08-13 16:12:59 -04:00
Kevin Grüneberg
3601bb52f5 chore: use type imports / avoid unnecessary API type export (#28088) 2024-07-19 18:35:23 +08:00
Jonathan Summers-Muir
c73af5ec8f move to shared types (#23210)
* move to shared types

* Rename the package to api-types.

* Fix a forgotten dependency.

* Add more forgotten deps.

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2024-04-24 11:03:17 +02:00
Charis
85bcc3f7d4 feat: sort docs feedback by team (#22927) 2024-04-22 14:45:20 -04:00
Charis
66fc6fa30a feat: turn docs feedback comments on again (#22474) 2024-04-04 13:38:18 -04:00
Han Qiao
e10dd0cf2f fix: update docs api to match studio (#21862)
* fix: update branch docs to match latest api

* fix: type errors
2024-03-08 11:44:34 +08:00
Kevin Grüneberg
f7e60bf324 chore: upgrade prettier/eslint + autofix (#20785) 2024-01-30 10:54:02 +08:00
Charis
2a0c0e06b8 readd docs api config variables with fixes (#20309) 2024-01-23 07:53:10 +11:00
Charis
10da8f3f31 Revert "feat: display api urls and keys instead of placeholders in do… (#20302)
Revert "feat: display api urls and keys instead of placeholders in docs (#19672)"

This reverts commit 0e8ee2e890.
2024-01-10 05:45:44 -05:00
Charis
0e8ee2e890 feat: display api urls and keys instead of placeholders in docs (#19672)
**feat:** adds a component to display API endpoints and anon keys in docs if user is authenticated
makes the getting started UX smoother so users don't have to jump back and forth between docs and trying to find their keys in dashboard

**out of scope:** it would be very cool to display these directly in the code blocks. I looked into it and it would require quite a bit of work forking and modifying code-hike, so out of scope for now

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-01-09 15:00:31 -05:00
Kevin Grüneberg
0f576e93e2 chore: remove unused docs dependencies 2023-09-14 19:40:50 +02:00
Greg Richardson
b8df7d7c2b feat(docs): code hike 2023-06-04 15:15:58 -06:00
Greg Richardson
695b00c0ce chore(docs): yaml import types 2023-05-04 18:48:08 -06:00
Greg Richardson
bd83e9ba2f feat(docs-gpt): completion streaming 2023-02-03 01:10:13 -07:00
Jonathan Summers-Muir
007813b772 start adding react layout with updated sidebar 2022-11-14 23:56:29 +08:00