Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 20 additions & 14 deletions .github/workflows/studio-e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,7 @@ name: Selfhosted Studio E2E Tests
on:
push:
branches: [master]
paths:
- 'packages/pg-meta/**/*'
- 'apps/studio/**'
- 'e2e/studio/**'
- 'pnpm-lock.yaml'
pull_request:
paths:
- 'packages/pg-meta/**/*'
- 'apps/studio/**'
- 'e2e/studio/**'
- 'pnpm-lock.yaml'
- '.github/workflows/studio-e2e-test.yml'

# Cancel old builds on new commit for same workflow + branch/PR
concurrency:
Expand All @@ -33,28 +22,45 @@ jobs:

steps:
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: filter
with:
filters: |
studio:
- 'packages/pg-meta/**'
- 'apps/studio/**'
- 'apps/ui-library/**'
- 'apps/design-system/**'
- 'e2e/studio/**'
- 'pnpm-lock.yaml'
- '.github/workflows/studio-e2e-test.yml'
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
if: steps.filter.outputs.studio == 'true'
name: Install pnpm
with:
run_install: false
- name: Use Node.js
if: steps.filter.outputs.studio == 'true'
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version-file: '.nvmrc'
cache: 'pnpm'

- name: Install dependencies
if: steps.filter.outputs.studio == 'true'
run: pnpm install --frozen-lockfile

- name: Install Playwright Browsers
if: steps.filter.outputs.studio == 'true'
run: pnpm -C e2e/studio exec playwright install chromium --with-deps --only-shell

- name: 🚀 Run Playwright tests against Vercel Preview
if: steps.filter.outputs.studio == 'true'
id: playwright
run: pnpm e2e

- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
if: always()
if: always() && steps.filter.outputs.studio == 'true'
with:
name: playwright-artifacts
path: |
Expand All @@ -64,13 +70,13 @@ jobs:

- name: Comment Playwright test results on PR
uses: daun/playwright-report-comment@be9e270edd5ad86038604d3caa84a819a6ff6fed # v3.10.0
if: always() && github.event_name == 'pull_request' && !github.event.pull_request.head.repo.fork
if: always() && steps.filter.outputs.studio == 'true' && github.event_name == 'pull_request' && !github.event.pull_request.head.repo.fork
with:
report-file: e2e/studio/test-results/test-results.json
comment-title: '🎭 Playwright Test Results'

- name: Fail job if tests failed
if: steps.playwright.outcome != 'success' || steps.summarize.outputs.flaky_count > 0
if: steps.filter.outputs.studio == 'true' && (steps.playwright.outcome != 'success' || steps.summarize.outputs.flaky_count > 0)
run: |
echo "E2E tests failed" >&2
exit 1
2 changes: 1 addition & 1 deletion apps/docs/components/HomePageCover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ const HomePageCover = (props) => {
href: '/guides/getting-started/quickstarts/nuxtjs',
},
{
tooltip: 'refine',
tooltip: 'Refine',
icon: '/docs/img/icons/refine-icon',
href: '/guides/getting-started/quickstarts/refine',
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ export const gettingstarted: NavMenuConstant = {
url: '/guides/getting-started/quickstarts/redwoodjs' as `/${string}`,
},
{
name: 'refine',
name: 'Refine',
url: '/guides/getting-started/quickstarts/refine',
},
],
Expand Down Expand Up @@ -438,7 +438,7 @@ export const gettingstarted: NavMenuConstant = {
url: '/guides/getting-started/tutorials/with-sveltekit' as `/${string}`,
},
{
name: 'refine',
name: 'Refine',
url: '/guides/getting-started/tutorials/with-refine' as `/${string}`,
},
],
Expand Down
4 changes: 3 additions & 1 deletion apps/docs/content/_partials/uiLibCta.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

UI components built on shadcn/ui that connect to Supabase via a single command.

<Button type="primary">Explore Components</Button>
<Button type="primary" asChild>
<a href="https://supabase.com/ui">Explore Components</a>
</Button>

</Admonition>
2 changes: 1 addition & 1 deletion apps/docs/content/guides/database/replication.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Replication is the process of copying changes from your database to another loca

You might use replication for:

- **Analytics and Data Warehousing**: Replicate your operational database to analytics platforms like BigQuery for complex analysis without impacting your application's performance.
- **Analytics and Data Warehousing**: Replicate your operational database to analytics platforms for complex analysis without impacting your application's performance.
- **Data Integration**: Keep your data synchronized across different systems and services in your tech stack.
- **Backup and Disaster Recovery**: Maintain up-to-date copies of your data in different locations.
- **Read Scaling**: Distribute read operations across multiple database instances to improve performance.
Expand Down
8 changes: 4 additions & 4 deletions apps/docs/content/guides/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,10 @@ hideToc: true
enabled: isFeatureEnabled('docs:framework_quickstarts'),
},
{
title: 'refine',
title: 'Refine',
href: '/guides/getting-started/quickstarts/refine',
description:
'Learn how to create a Supabase project, add some sample data to your database, and query the data from a refine app.',
'Learn how to create a Supabase project, add some sample data to your database, and query the data from a Refine app.',
icon: '/docs/img/icons/refine-icon',
enabled: isFeatureEnabled('docs:framework_quickstarts'),
},
Expand Down Expand Up @@ -286,10 +286,10 @@ hideToc: true
icon: '/docs/img/icons/svelte-icon',
},
{
title: 'refine',
title: 'Refine',
href: '/guides/getting-started/tutorials/with-refine',
description:
'Learn how to build a user management app with refine and Supabase Database, Auth, and Storage functionality.',
'Learn how to build a user management app with Refine and Supabase Database, Auth, and Storage functionality.',
icon: '/docs/img/icons/refine-icon',
}
]
Expand Down
32 changes: 16 additions & 16 deletions apps/docs/content/guides/getting-started/quickstarts/refine.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: 'Use Supabase with refine'
subtitle: 'Learn how to create a Supabase project, add some sample data to your database, and query the data from a refine app.'
title: 'Use Supabase with Refine'
subtitle: 'Learn how to create a Supabase project, add some sample data to your database, and query the data from a Refine app.'
breadcrumb: 'Framework Quickstarts'
hideToc: true
---
Expand All @@ -15,11 +15,11 @@ hideToc: true

<StepHikeCompact.Step step={2}>

<StepHikeCompact.Details title="Create a refine app">
<StepHikeCompact.Details title="Create a Refine app">

Create a [refine](https://github.com/refinedev/refine) app using the [create refine-app](https://refine.dev/docs/getting-started/quickstart/).
Create a [Refine](https://github.com/refinedev/refine) app using the [create refine-app](https://refine.dev/docs/getting-started/quickstart/).

The `refine-supabase` preset adds `@refinedev/supabase` supplementary package that supports Supabase in a refine app. `@refinedev/supabase` out-of-the-box includes the Supabase dependency: [supabase-js](https://github.com/supabase/supabase-js).
The `refine-supabase` preset adds `@refinedev/supabase` supplementary package that supports Supabase in a Refine app. `@refinedev/supabase` out-of-the-box includes the Supabase dependency: [supabase-js](https://github.com/supabase/supabase-js).

</StepHikeCompact.Details>

Expand All @@ -34,9 +34,9 @@ hideToc: true
</StepHikeCompact.Step>

<StepHikeCompact.Step step={3}>
<StepHikeCompact.Details title="Open your refine app in VS Code">
<StepHikeCompact.Details title="Open your Refine app in VS Code">

You will develop your app, connect to the Supabase backend and run the refine app in VS Code.
You will develop your app, connect to the Supabase backend and run the Refine app in VS Code.

</StepHikeCompact.Details>

Expand All @@ -54,7 +54,7 @@ hideToc: true
<StepHikeCompact.Step step={4}>
<StepHikeCompact.Details title="Start the app">

Start the app, go to http://localhost:5173 in a browser, and you should be greeted with the refine Welcome page.
Start the app, go to http://localhost:5173 in a browser, and you should be greeted with the Refine Welcome page.

</StepHikeCompact.Details>

Expand All @@ -65,7 +65,7 @@ hideToc: true
```

<StepHikeCompact.Code>
![refine welcome page](/docs/img/refine-qs-welcome-page.png)
![Refine welcome page](/docs/img/refine-qs-welcome-page.png)
</StepHikeCompact.Code>

</StepHikeCompact.Code>
Expand All @@ -75,7 +75,7 @@ hideToc: true
<StepHikeCompact.Step step={5}>
<StepHikeCompact.Details title="Update `supabaseClient`">

You now have to update the `supabaseClient` with the `SUPABASE_URL` and `SUPABASE_KEY` of your Supabase API. The `supabaseClient` is used in auth provider and data provider methods that allow the refine app to connect to your Supabase backend.
You now have to update the `supabaseClient` with the `SUPABASE_URL` and `SUPABASE_KEY` of your Supabase API. The `supabaseClient` is used in auth provider and data provider methods that allow the Refine app to connect to your Supabase backend.

<ProjectConfigVariables variable="url" />
<ProjectConfigVariables variable="publishable" />
Expand Down Expand Up @@ -110,15 +110,15 @@ hideToc: true

You have to then configure resources and define pages for `instruments` resource.

Use the following command to automatically add resources and generate code for pages for `instruments` using refine Inferencer.
Use the following command to automatically add resources and generate code for pages for `instruments` using Refine Inferencer.

This defines pages for `list`, `create`, `show` and `edit` actions inside the `src/pages/instruments/` directory with `<HeadlessInferencer />` component.

The `<HeadlessInferencer />` component depends on `@refinedev/react-table` and `@refinedev/react-hook-form` packages. In order to avoid errors, you should install them as dependencies with `npm install @refinedev/react-table @refinedev/react-hook-form`.

<Admonition type="note">

The `<HeadlessInferencer />` is a refine Inferencer component that automatically generates necessary code for the `list`, `create`, `show` and `edit` pages.
The `<HeadlessInferencer />` is a Refine Inferencer component that automatically generates necessary code for the `list`, `create`, `show` and `edit` pages.

More on [how the Inferencer works is available in the docs here](https://refine.dev/docs/packages/documentation/inferencer/).

Expand Down Expand Up @@ -151,13 +151,13 @@ hideToc: true

<StepHikeCompact.Code>
```tsx name=src/App.tsx
import { Refine, WelcomePage } from "@refinedev/core";
import { Refine } from "@refinedev/core";
import { RefineKbar, RefineKbarProvider } from "@refinedev/kbar";
import routerBindings, {
import routerProvider, {
DocumentTitleHandler,
NavigateToResource,
UnsavedChangesNotifier,
} from "@refinedev/react-router-v6";
} from "@refinedev/react-router";
import { dataProvider, liveProvider } from "@refinedev/supabase";
import { BrowserRouter, Route, Routes } from "react-router-dom";

Expand All @@ -174,7 +174,7 @@ hideToc: true
dataProvider={dataProvider(supabaseClient)}
liveProvider={liveProvider(supabaseClient)}
authProvider={authProvider}
routerProvider={routerBindings}
routerProvider={routerProvider}
options={{
syncWithLocation: true,
warnWhenUnsavedChanges: true,
Expand Down
Loading
Loading