Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release: july 2024 #6058

Merged
merged 18 commits into from
Jul 5, 2024
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
b86648f
feat(mui): editable Data Grid #5744 (#5989)
lnikitadobrenkol Jun 20, 2024
8217028
fix(nestjs-query): can specify `0` as filter value (#6023)
yamadayutaka Jun 20, 2024
24db047
fix(cli): type imports in swizzle command (#6039)
aliemir Jun 20, 2024
658891c
fix(rtl-customisation): changed the header back button orientations o…
ApsMJ23 Jun 20, 2024
55cd066
fix(core): ensure consistent casing in resource names for access cont…
JayBhensdadia Jun 20, 2024
50d2107
fix: replace lodash imports from root with subpath imports (#6052)
aliemir Jun 20, 2024
030111d
Merge branch 'master' into releases/july
BatuhanW Jun 21, 2024
b516c18
fix(auto-save-indicator): rename key prop to translationKey (#6064)
aliemir Jun 26, 2024
f4e61b0
fix(supabase): nested embedded resources sorting (#6025)
youssefsiam38 Jun 26, 2024
a41e2b8
Merge branch 'master' into releases/july
BatuhanW Jun 26, 2024
4265ae2
fix(core): add unexported types (#6070)
FatimaSaleem21 Jun 26, 2024
853bef9
feat(core): add `selectedOptionsOrder` in `useSelect` (#6071)
Dominic-Preap Jul 1, 2024
311dcdc
fix(antd): useDrawerForm has unused props (#6074)
alicanerdurmaz Jul 1, 2024
41d877d
Merge branch 'master' into releases/july
BatuhanW Jul 1, 2024
da30241
Merge branch 'master' into releases/july
BatuhanW Jul 4, 2024
8bc2c1c
refactor(devtools): updated authentication flow (#6098)
aliemir Jul 4, 2024
322a84b
Merge branch 'master' into releases/july
BatuhanW Jul 4, 2024
ba8117f
chore(inferencer): remove `graphql-tag` from peer dependencies (#6099)
BatuhanW Jul 4, 2024
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
5 changes: 5 additions & 0 deletions .changeset/cuddly-brooms-leave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@refinedev/supabase": patch
---

fix supabase sorting with nested embedded resources
8 changes: 8 additions & 0 deletions .changeset/cuddly-wasps-boil.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@refinedev/devtools-server": patch
"@refinedev/devtools-ui": patch
---

refactor(devtools): updated flow for login callbacks

Previously, when the login flow had an error, the Devtools UI was displaying it in the secondary window, which was not user-friendly and lead to multiple clients to connect unnecessarily. This change updates the flow to display the error message in the main Devtools window.
7 changes: 7 additions & 0 deletions .changeset/curly-peas-swim.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@refinedev/devtools-ui": patch
---

chore(devtools-ui): fix slider image loader

In the welcome page of the Devtools UI, feature slider was re-mounting every image at transition, causing polluted network tab in the browser even though the images were cached and loaded already. This change fixes the issue by loading the images only once and reusing them on transition.
7 changes: 7 additions & 0 deletions .changeset/cyan-paws-press.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@refinedev/cli": patch
---

chore(cli): remove unused command

Previously `@refinedev/cli` had a `proxy` command that is no longer in use and not required in any of the projects. This change removes the command from the CLI without a fallback.
12 changes: 12 additions & 0 deletions .changeset/eleven-maps-glow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
"@refinedev/chakra-ui": patch
"@refinedev/mantine": patch
"@refinedev/antd": patch
"@refinedev/mui": patch
---

fix: ensure Sider component handles various resource name formats correctly

Updated Sider component to correctly handle lowercase and camelcased resource names, enhancing usability and functionality.

Fixes #6004
11 changes: 11 additions & 0 deletions .changeset/friendly-papayas-greet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
"@refinedev/antd": minor
---

fix: [`useDrawerForm`](https://refine.dev/docs/ui-integrations/ant-design/hooks/use-drawer-form/)'s `submit` and `form` props are not working (#6082).

- `submit` prop is removed from `useDrawerForm` hook. Instead, you can use `onFinish` prop to handle the form submission.
https://refine.dev/docs/guides-concepts/forms/#modifying-data-before-submission

- `form` prop is removed from `useDrawerForm` hook.
The purpose of `useDrawerForm` is to create a `form` instance. Because of that `form` instance cannot be passed as a prop.
7 changes: 7 additions & 0 deletions .changeset/funny-schools-draw.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@refinedev/devtools-shared": patch
---

chore(devtools-shared): add login callback events

Added new events to handle login errors on the main devtools window rather than external windows. This change is accompanied by new event handlers in the `@refinedev/devtools-ui` and `@refinedev/devtools-server` packages.
10 changes: 10 additions & 0 deletions .changeset/honest-beds-rhyme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
"@refinedev/mui": minor
---

feat: editable feature for MUI Data Grid #5656

It is now possible to make MUI Data Grid editable by
setting editable property on specific column.

Resolves #5656
11 changes: 11 additions & 0 deletions .changeset/loud-zebras-lie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
"@refinedev/core": minor
"@refinedev/antd": minor
"@refinedev/mui": minor
---

feat: add `selectedOptionsOrder` in `useSelect`

Now with `selectedOptionsOrder`, you can sort `selectedOptions` at the top of list when use `useSelect` with `defaultValue`.

Resolves [#6061](https://github.com/refinedev/refine/issues/6061)
24 changes: 24 additions & 0 deletions .changeset/neat-lobsters-return.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
"@refinedev/antd": patch
---

fix(antd): use appropriate icons for RTL direction layouts

Previously CRUD components and `<ThemedSiderV2 />` component used hardcoded icons which doesn't fit well for RTL layouts. This PR uses Ant Design's `ConfigProvider` context to use `direction` to determine the appropriate icons for RTL layouts.

**Example**

```tsx
import { ConfigProvider } from 'antd';
import { Refine } from '@refinedev/antd';

const App = () => (
<ConfigProvider direction="rtl">
<Refine
{/* ... */}
/>
</ConfigProvider>
);
```

When any CRUD component or `<ThemedSiderV2 />` component is rendered, the icons will be rendered with respect to the `direction` prop of `ConfigProvider`.
7 changes: 7 additions & 0 deletions .changeset/orange-seals-brush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@refinedev/core": patch
---

chore(core): add missing types of data hooks

Added missing props and return types of data hooks.
19 changes: 19 additions & 0 deletions .changeset/sharp-lies-wash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
"@refinedev/nestjs-query": patch
---

fix: can specify 0 as filter value

The following values do not apply to the filter.

- null
- undefined
- NaN
- Infinity / -Infinity

The following values can apply to the filter.

- 0
- ""

Resolves #6022
8 changes: 8 additions & 0 deletions .changeset/short-rabbits-flash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@refinedev/devtools-shared": patch
"@refinedev/devtools": patch
---

chore(devtools): update devtools url fallback values

Updated fallback values for the Devtools URL and use single fallback value until its provided by the `@refinedev/devtools-server` when client is connected.
29 changes: 29 additions & 0 deletions .changeset/silver-carrots-sell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
"@refinedev/antd": minor
---

fix: `useForm`'s `defaultFormValues` prop is not working (#5727).

From now on, `useForm`, `useDrawerForm`, and `useModalForm` hooks accept the `defaultFormValues` prop to pre-populate the form with data that needs to be displayed.

```tsx
useForm({
defaultFormValues: {
title: "Hello World",
},
});
```

Also, it can be provided as an async function to fetch the default values. The loading state can be tracked using the `defaultFormValuesLoading` state returned from the hook.

> 🚨 When `action` is "edit" or "clone" a race condition with `async defaultFormValues` may occur. In this case, the form values will be the result of the last completed operation.

```tsx
const { defaultFormValuesLoading } = useForm({
defaultFormValues: async () => {
const response = await fetch("https://my-api.com/posts/1");
const data = await response.json();
return data;
},
});
```
9 changes: 9 additions & 0 deletions .changeset/slow-cougars-sit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@refinedev/cli": patch
---

fix(cli): type imports are breaking the code structure on swizzle

When exporting elements with `swizzle` command, it will try to replace and combine imports from Refine packages. This process was broken if the target file was using `import type` syntax. This PR updates swizzle command to handle `import type` syntax separately.

Resolves [#6035](https://github.com/refinedev/refine/issues/6035)
8 changes: 8 additions & 0 deletions .changeset/small-mangos-matter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@refinedev/devtools-server": patch
"@refinedev/devtools-ui": patch
---

refactor(devtools): updated auth flow

Previously, a proxy in the Devtools Server was used as an auth server to handle sign-ins in the localhost (Devtools Server). This change updates the flow and moves the authentication flow to `https://auth.refine.dev` to handle sign-ins and sign-outs. Now the Devtools Server is only responsible for the connection between the auth server and the user interface while also managing the user's session.
9 changes: 9 additions & 0 deletions .changeset/smooth-maps-arrive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@refinedev/hasura": patch
---

fix(hasura): broken lodash import in bundle

ESM bundle of `@refinedev/hasura` was broken due to incorrect lodash import. Import has been replaced with subdirectory import to get handled properly in the bundling process.

Fixes [#6044](https://github.com/refinedev/refine/issues/6044)
7 changes: 7 additions & 0 deletions .changeset/spotty-turkeys-grab.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@refinedev/devtools-server": patch
---

refactor(devtools-server): handle project id without polluting user console

When project ID is missing in the project, Devtools Server was returning with `400` and `404` status codes, which leads to unwanted logs in the user console. To avoid this, the server now returns a `200` status code with an error message in the response body. This change is accompanied by a new error handler in the `@refinedev/devtools-ui` package to handle the error message and display it in the user interface.
7 changes: 7 additions & 0 deletions .changeset/tall-geckos-help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@refinedev/devtools-server": patch
---

fix(devtools-server): lodash import from root

`@refinedev/devtools-server` was using `lodash` imports from root which are interpreted as CJS imports in the ESM bundle. To avoid any future issues, lodash imports have been replaced with subdirectory imports.
9 changes: 9 additions & 0 deletions .changeset/ten-eyes-hunt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@refinedev/ui-tests": patch
---

fix: update tests to handle lowercase and camelcased resource names correctly

This update ensures that resource names are correctly handled in both lowercase and camelcased formats, improving test coverage and accuracy.

Fixes #6004
9 changes: 9 additions & 0 deletions .changeset/tough-elephants-teach.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@refinedev/core": patch
---

fix(core): add unexported types in `index.tsx`

The `refinedev/core` package has many unexported types that are not accessible for use outside the package. This change aims to address this limitation by exporting those missing types.

Resolves [#6041](https://github.com/refinedev/refine/issues/6041)
7 changes: 7 additions & 0 deletions .changeset/twenty-insects-eat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@refinedev/inferencer": patch
---

fix(inferencer): broken lodash import in bundle

ESM bundle of `@refinedev/inferencer` was broken due to incorrect lodash import. Import has been replaced with subdirectory import to get handled properly in the bundling process.
13 changes: 13 additions & 0 deletions .changeset/witty-papayas-look.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
"@refinedev/chakra-ui": patch
"@refinedev/mantine": patch
"@refinedev/antd": patch
"@refinedev/core": patch
"@refinedev/mui": patch
---

fix(auto-save-indicator): replace reserved `key` prop with `translationKey` in <Message /> components

`<AutoSaveIndicator />` components from UI libraries have been using a `<Message />` component internally that uses a `key` prop. Since `key` is a reserved prop in React, it was causing a warning in the console. This change replaces the `key` prop with `translationKey` to avoid the warning.

Resolves [#6067](https://github.com/refinedev/refine/issues/6067)
4 changes: 2 additions & 2 deletions documentation/docs/advanced-tutorials/real-time.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ export const CustomSider: typeof Sider = ({ render }) => {
return (
<CanAccess
key={route}
resource={name.toLowerCase()}
resource={name}
action="list"
params={{ resource: item }}
>
Expand Down Expand Up @@ -514,7 +514,7 @@ export const CustomSider: typeof Sider = ({ render }) => {
return (
<CanAccess
key={key}
resource={name.toLowerCase()}
resource={name}
action="list"
params={{ resource: item }}
>
Expand Down
14 changes: 14 additions & 0 deletions documentation/docs/data/hooks/use-select/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,20 @@ useSelect({
});
```

### selectedOptionsOrder

`selectedOptionsOrder` allows us to sort `selectedOptions` on `defaultValue`. It can be:

- `"in-place"`: sort `selectedOptions` at the bottom. It is by default.
- `"selected-first"`: sort `selectedOptions` at the top.

```tsx
useSelect({
defaultValue: 1, // or [1, 2]
selectedOptionsOrder: "selected-first", // in-place | selected-first
});
```

> For more information, refer to the [`useMany` documentation&#8594](/docs/data/hooks/use-many)

### debounce
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,23 @@ const { selectProps } = useCheckboxGroup({
});
```

### selectedOptionsOrder

`selectedOptionsOrder` allows us to sort `selectedOptions` on `defaultValue`. It can be:

- `"in-place"`: sort `selectedOptions` at the bottom. It is by default.
- `"selected-first"`: sort `selectedOptions` at the top.

```tsx
const { selectProps } = useCheckboxGroup({
resource: "languages",
// highlight-next-line
defaultValue: [1, 2],
// highlight-next-line
selectedOptionsOrder: "selected-first", // in-place | selected-first
});
```

The easiest way to select default values for checkbox fields is by passing in `defaultValue`.

### optionLabel and optionValue
Expand Down Expand Up @@ -260,3 +277,7 @@ Use `sorters` instead.

[baserecord]: /docs/core/interface-references#baserecord
[httperror]: /docs/core/interface-references#httperror

```

```
Loading
Loading