Skip to content

Latest commit

 

History

History
159 lines (107 loc) · 7.37 KB

CHANGELOG.md

File metadata and controls

159 lines (107 loc) · 7.37 KB

Changelog

3.3.1

  • Fix <AdminGuesser> type is missing the required API connection strings (fzaninotto)
  • Fix @raphiniert/ra-data-postgrest and @supabase/supabase-js dependencies are missing (fzaninotto)

3.3.0

  • Add <AdminGuesser> for a zero-config application scaffolding based on the OpenAPI Schema (#80) (fzaninotto)
  • Add <ListGuesser>, <ShowGuesser>, <EditGuesser>, and <CreateGuesser> to automatically generate page components based on the OpenAPI Schema (#80) (fzaninotto)

3.2.1

  • Fix authProvider.getPermissions() should not throw error when not logged in (#79) (fzaninotto)
  • [Doc] Improve email setup instructions (#78) (djhi)
  • [Demo] Configure local Supabase instance to support invitation and password reset out of the box (#77) (slax57)

3.2.0

  • Add ability to pass additional options to postgrest (#74) (fzaninotto)
  • Fix Reset Password form doesn't redirect to login page (#75) (fzaninotto)
  • Improve UI of set password & reset password pages (#76) (fzaninotto)
  • [Doc] Fix example in material UI readme (#73) (Patys)
  • [Doc] Fix code in dataProvider example in readme (#72) (Patys)
  • [Doc] Align style in readme for language packages(#71) (Patys)

3.1.1

3.1.0

  • Feat: Handle HashRouter & BrowserRouter for Supabase redirections (#67) (arimet)
  • Fix: It is no longer possible to access a page using direct URL if user is logged out (#65) (jonathan-marmelab)

3.0.0

  • The <LoginPage> will no longer automatically redirect to the app if the user is already authenticated

2.3.0

  • Update supabase-js dev to match new auth system (#55) (Revarh)
  • [TypeScript] Allow react-router To type for UseRedirectIfAuthenticatedOptions (#56) (MohammedFaragallah)

2.2.0

  • Add getPermissions support in authProvider

2.1.0

  • Update to latest ra-data-postgrest (#47) (slax57)

2.0.6

  • Fixes set password flow doesn't work (#44) n0rmanc

2.0.5

  • Fix ra-supabase-language-french main export should be named raSupabaseFrenchMessages (#43) vicam001

2.0.4

  • Add support for redirectTo in supabaseAuthProvider
  • Document spanish translations

2.0.3

  • Fix wrong build in 2.0.2

2.0.2

2.0.1

  • Fix invitations and password reset handling

2.0.0

  • Add compatibility with react-admin v4
  • Use ra-data-postgrest for the dataProvider
  • Add support for third party authentication providers

Migration

DataProvider

As we now use ra-data-postgrest, you now longer need to describe your resources. However, you must now pass the supabaseInstanceUrl and the apiKey:

// in dataProvider.js
import { supabaseDataProvider } from 'ra-supabase-core';
import { supabaseClient } from './supabase';

-const resources = {
-    posts: ['id', 'title', 'body', 'author_id', 'date'],
-    authors: ['id', 'full_name'],
-};

-export const dataProvider = supabaseDataProvider(supabaseClient, resources);
+export const dataProvider = supabaseDataProvider({
+    instanceUrl: 'YOUR_SUPABASE_URL',
+    apiKey: 'YOUR_SUPABASE_ANON_KEY',
+    supabaseClient
+});

When specifying the source prop of filter inputs, you can now either set it to the field name for simple equality checks or add an operator suffix for more control. For instance, the gte (Greater Than or Equal) or the ilike (Case insensitive like) operators:

const postFilters = [
    <TextInput label="Title" source="title@ilike" alwaysOn />,
    <TextInput label="Views" source="views@gte" />,
];

export const PostList = () => (
    <List filters={postFilters}>
        ...
    </List>
);

See the PostgREST documentation for a list of supported operators.

We used to have full-text search support that required a special configuration:

// in dataProvider.js
import { supabaseDataProvider } from 'ra-supabase';
import { supabase } from './supabase';

const resources = {
    posts: {
        fields: ['id', 'title', 'body', 'author_id', 'date'],
        fullTextSearchFields: ['title', 'body'],
    },
    authors: {
        fields: ['id', 'full_name'],
        fullTextSearchFields: ['full_name'],
    },
};

export const dataProvider = supabaseDataProvider(supabase, resources);

This is now longer required as you can use PostgREST operators for this purpose (fts, plfts and wfts). However this means the field on which you apply those operators must be of type tsvector. You can follow Supabase documentation to create one.

Here's how to add a SearchInput for such a column:

<SearchInput source="fts@my_column" />