Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore(ui-tests): disable invalidation test from ui tests * chore(core): accept mutation mode value in useMutationMode * feat(core): add button hooks * refactor(antd): refactor logics of buttons * refactor(chakra-ui): refactor logics of buttons * refactor(mantine): refactor logics of buttons * refactor(mui): refactor logics of buttons * chore: add changesets
- Loading branch information
Showing
58 changed files
with
1,769 additions
and
1,974 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@refinedev/core": patch | ||
--- | ||
|
||
chore: improved `useMutationMode` hooks usage by accepting explicit values to be passed for `mutationMode` and `undoableTimeout`, handling the precedence of the values inside the hook rather than outside to avoid repetition |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
"@refinedev/core": patch | ||
--- | ||
|
||
feat: added headless button hooks | ||
|
||
We've added a new set of hooks to make it easier to create and manage UI buttons of Refine. There's a hook for each type of button which previously had duplicated logic across the codebase between UI integrations of Refine. Now all these buttons will be powered by the same hooks maintained in the `@refinedev/core` package to ensure consistency and reduce duplication. | ||
|
||
New Hooks: | ||
|
||
- `useListButton`: A navigation button that navigates to the list page of a resource. | ||
- `useCreateButton`: A navigation button that navigates to the create page of a resource. | ||
- `useShowButton`: A navigation button that navigates to the show page of a record. | ||
- `useEditButton`: A navigation button that navigates to the edit page of a record. | ||
- `useCloneButton`: A navigation button that navigates to the clone page of a record. | ||
- `useRefreshButton`: A button that triggers an invalidation of the cache of a record. | ||
- `useDeleteButton`: A button that triggers a delete mutation on a record. | ||
- `useSaveButton`: A button to be used inside a form to trigger a save mutation. | ||
- `useExportButton`: A button to be used with `useExport` to trigger an export bulk data of a resource. | ||
- `useImportButton`: A button to be used with `useImport` to trigger an import bulk data for a resource. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
"@refinedev/antd": patch | ||
"@refinedev/chakra-ui": patch | ||
"@refinedev/mantine": patch | ||
"@refinedev/mui": patch | ||
--- | ||
|
||
refactor: moved internal logic of buttons to respective hooks from `@refinedev/core` | ||
|
||
We've moved the internal logic of buttons to their respective hooks in the `@refinedev/core` package to ensure consistency and reduce duplication. This change will make it easier to manage and maintain the buttons across different UI integrations of Refine. This will also benefit the users who want to customize the buttons via `swizzle` option or create their own buttons withouth having to duplicate the logic. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@refinedev/ui-tests": patch | ||
--- | ||
|
||
chore: updated refresh button tests to be more UI focused and hand off the logic to the `@refinedev/core`'s `useRefreshButton` hook |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.