-
Notifications
You must be signed in to change notification settings - Fork 36
Paginate the user references tab against the new object-dependencies endpoint #4008
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
Merged
jcPimcore
merged 18 commits into
2025.4
from
fix/308-paginated-user-object-dependencies
Aug 27, 2026
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
af623d8
Paginate the user references tab against the new object-dependencies …
jcPimcore 66e9dcd
Automatic frontend build
jcPimcore 837fec8
Regenerate API client for the restored objectDependencies preview
jcPimcore 1e132fd
Automatic frontend build
jcPimcore 4fc25df
Address Copilot review feedback on user object-dependencies pagination
jcPimcore 59a5ee6
Automatic frontend build
jcPimcore 3e3a50c
Regenerate API client for the clarified object-dependencies doc comment
jcPimcore 199042d
Automatic frontend build
jcPimcore 88976d8
Regenerate API client - objectDependencies is no longer a breaking ch…
jcPimcore 9dcff81
Automatic frontend build
jcPimcore 7cea893
Address Copilot review feedback: error handling and stale-page loading
jcPimcore 5601c85
Automatic frontend build
jcPimcore f90e04c
Use currentData for table rows to avoid showing a stale page on failure
jcPimcore 6c55f2f
Automatic frontend build
jcPimcore 5ab36a7
Regenerate API client - totalItems is now optional, not source-breaking
jcPimcore 34d9402
Automatic frontend build
jcPimcore b6a2641
Generated API for 2025.4
jcPimcore f0672a4
Automatic frontend build
jcPimcore File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
48 changes: 48 additions & 0 deletions
48
.../core/modules/user/management/detail/tabs/references/components/pagination/pagination.tsx
This file contains hidden or 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,48 @@ | ||
| /** | ||
| * This source file is available under the terms of the | ||
| * Pimcore Open Core License (POCL) | ||
| * Full copyright and license information is available in | ||
| * LICENSE.md which is distributed with this source code. | ||
| * | ||
| * @copyright Copyright (c) Pimcore GmbH (https://www.pimcore.com) | ||
| * @license Pimcore Open Core License (POCL) | ||
| */ | ||
|
|
||
| import React from 'react' | ||
| import { type UserGetObjectDependenciesApiResponse } from '@Pimcore/modules/user/user-api-slice-enhanced' | ||
| import { useTranslation } from 'react-i18next' | ||
| import { Pagination as PimPagination } from '@Pimcore/components/pagination/pagination' | ||
| import { | ||
| PaginationSkeleton | ||
| } from '@Pimcore/modules/element/editor/shared-tab-manager/tabs/dependencies/components/pagination/skeleton' | ||
| import { DEFAULT_PAGE_SIZE } from '@Pimcore/modules/user/management/detail/tabs/references/constants' | ||
|
|
||
| type PaginationProps = Partial<UserGetObjectDependenciesApiResponse> & { | ||
| page: number | ||
| isLoading: boolean | ||
| onChange: (page: number, pageSize: number) => void | ||
| } | ||
|
|
||
| export const Pagination = (props: PaginationProps): React.JSX.Element => { | ||
| const { t } = useTranslation() | ||
|
|
||
| if (props.isLoading) { | ||
| return <PaginationSkeleton /> | ||
| } | ||
|
|
||
| if (!props.isLoading && props.totalItems === 0) { | ||
| return <></> | ||
| } | ||
|
|
||
| return ( | ||
| <PimPagination | ||
| current={ props.page } | ||
| defaultPageSize={ DEFAULT_PAGE_SIZE } | ||
| onChange={ props.onChange } | ||
| pageSizeOptions={ [10, 20, 50, 100] } | ||
| showSizeChanger | ||
| showTotal={ (total) => t('pagination.show-total', { total }) } | ||
| total={ props.totalItems ?? 0 } | ||
| /> | ||
| ) | ||
| } | ||
11 changes: 11 additions & 0 deletions
11
assets/js/src/core/modules/user/management/detail/tabs/references/constants.ts
This file contains hidden or 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,11 @@ | ||
| /** | ||
| * This source file is available under the terms of the | ||
| * Pimcore Open Core License (POCL) | ||
| * Full copyright and license information is available in | ||
| * LICENSE.md which is distributed with this source code. | ||
| * | ||
| * @copyright Copyright (c) Pimcore GmbH (https://www.pimcore.com) | ||
| * @license Pimcore Open Core License (POCL) | ||
| */ | ||
|
|
||
| export const DEFAULT_PAGE_SIZE = 20 |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.