-
Notifications
You must be signed in to change notification settings - Fork 32
[PB-5466]: enhance version history with batch operations and SDK integration #1774
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
base: feature/file-version-history-v2
Are you sure you want to change the base?
[PB-5466]: enhance version history with batch operations and SDK integration #1774
Conversation
…ration - Update @internxt/sdk to 1.11.21 for improved version history support - Add batch delete functionality for multiple version selections - Implement version limits display showing used/total allowed versions - Fix file replace operation to properly upload new file content - Migrate from local FileVersion type to SDK types for better consistency - Add indeterminate checkbox state for partial selections - Improve version restoration to update current version state - Enhance skeleton loading to show more realistic version count - Add getLimits API call to fetch version constraints - Refactor CurrentVersionItem to use version info instead of full item data
| }); | ||
| } else { | ||
| const file = itemToUpload as File; | ||
| const { bridgeUser, bridgePass, encryptionKey, bucketId } = getEnvironmentConfig(!!selectedWorkspace); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I needed a way to upload the file content without creating the database entry in order to avoid the ‘this file exists’ error. This is the most efficient approach I found, but feel free to suggest any improvements.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, let's leave it here, but can you extract it to a function so that if we decide to move it somewhere else, we already have the logic encapsulated?
7630a19 to
f3a74ba
Compare
Tests will be added in a separate PR |
xabg2
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job man! 🚀
| <> | ||
| <CurrentVersionItem key={item.id} version={item} userName={userName} /> | ||
| <CurrentVersionItem | ||
| key={currentVersion?.id ?? item.id} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extract this to a variable.
| <CurrentVersionItem key={item.id} version={item} userName={userName} /> | ||
| <CurrentVersionItem | ||
| key={currentVersion?.id ?? item.id} | ||
| createdAt={currentVersion?.createdAt ?? item.createdAt} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same.
| <AutosaveSection | ||
| totalAutosaveCount={totalAutosaveCount} | ||
| totalVersionsCount={totalVersionsCount} | ||
| totalAllowedVersions={limits?.versioning.maxVersions ?? 0} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same.
|


Description
Related Issues
Related Pull Requests
Checklist
Testing Process
Additional Notes