-
Notifications
You must be signed in to change notification settings - Fork 33
[PB-5542]: Add file version history locked feature modal #1808
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
Are you sure you want to change the base?
[PB-5542]: Add file version history locked feature modal #1808
Conversation
- Added a locked feature modal to inform users about version restoration capabilities in paid plans. - Updated i18n translations for the new locked feature. - Refactored file version service imports and related tests. - Enhanced version history menu configuration to handle locked states. - Implemented dropdown positioning hook for better UI interactions. - Added tests for version item actions and dropdown positioning. - Integrated version limits fetching in the PlansSection for better user experience.
Deploying drive-web with
|
| Latest commit: |
4315ad2
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://751fe0df.drive-web.pages.dev |
| Branch Preview URL: | https://feature-file-version-history-8eiq.drive-web.pages.dev |
- Add downloadName option to DownloadItem type to support custom filenames - Update downloadWorkerHandler to accept and use custom download names - Format version download filenames as "(DD-MM-YYYY at HH:mm) filename.ext" - Use dateService and itemsUtils from @internxt/lib for proper formatting - Pass custom filename through downloadOptions instead of modifying item name
| const MODAL_DIMENSIONS = { | ||
| width: '282px', | ||
| height: '333px', | ||
| } as const; |
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.
The modal has to have this fixed sizes?
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.
Yes, since it’s inside the file, the version sidebar will not have any issues on smaller screens
| if (item.isFolder) { | ||
| return item.name; | ||
| } | ||
| return item.type ? `${item.name}.${item.type}` : item.name; |
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.
Will the name never include the extension?
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.
No, the name/plainName does not include the extension, it's stored separately in the type field.
| <div className="absolute inset-0 z-10 flex items-center justify-center bg-black/10 dark:bg-black/30 backdrop-blur-[3px]"> | ||
| <div | ||
| className="mx-6 flex max-w-xs flex-col items-center gap-4 rounded-2xl border border-gray-10 bg-surface pt-6 dark:border-gray-5 dark:bg-gray-1" | ||
| style={MODAL_DIMENSIONS} |
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.
nit: Whenever possible, use classes instead of inline styles
|



Description
Implement a locked feature modal for file version history when versioning
is not enabled, prompting users to upgrade to access the feature.
Changes:
Refactor:
(upgrade flow now handled in context menu and Sidebar)
Translations:
(en, es, fr, de, it, ru, zh, tw)
Tests:
Related Issues
Related Pull Requests
Checklist
Testing Process
Additional Notes