-
Notifications
You must be signed in to change notification settings - Fork 32
[PB-4568]: feat/block features depending on the user tier #1678
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
[PB-4568]: feat/block features depending on the user tier #1678
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
|
||
| export type UserTierFeatures = Tier['featuresPerService']; | ||
|
|
||
| // TODO: REMOVE THIS USELESS CALL |
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.
why didn't have removed?
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.
Because a reducer depends on this function and I do not want to remove a lot of thinks that, in fact, does not belongs to this task.
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 just added the comment to indicate that we can remove this as it is not longer used (or at list I think so).
| const [isRestrictedSharingDialogOpen, setIsRestrictedSharingDialogOpen] = useState<boolean>(false); | ||
| const [isRestrictedPasswordDialogOpen, setIsRestrictedPasswordDialogOpen] = useState<boolean>(false); |
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: Perhaps we should start considering using useReducer here, as the number of states is starting to become large
| }; | ||
|
|
||
| const onPasswordCheckboxChange = useCallback(() => { | ||
| if (!isPasswordSharingAvailable) { |
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.
forgot to add isPasswordSharingAvailable to the dendency array of useCallback
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.
Ops, on it.
| folderUuid: file.parentFolderId, | ||
| encryptVersion: StorageTypes.EncryptionVersion.Aes03, |
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.
have you checked that parentFolderId it is the folder uuid?
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.
Yep, it is. But this change does not belong to this PR. It belongs to this PR. I'm going to remove this change from this PR.
src/app/store/slices/user/index.ts
Outdated
| const userFeatures = await getAvailableUserFeatures(); | ||
|
|
||
| dispatch(userActions.setUserTierFeatures(userFeatures)); |
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.
There is no case handled if this fails or takes too long, perhaps we should implement a warning that there may be some unused features due to the failure 🤔
…ected' into feat/logic-to-block-shared-features-based-on-user-tier
…ected' into feat/logic-to-block-shared-features-based-on-user-tier
Deploying drive-web with
|
| Latest commit: |
a87f98c
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://e2930928.drive-web.pages.dev |
| Branch Preview URL: | https://feat-logic-to-block-shared-f.drive-web.pages.dev |
| "@internxt/css-config": "1.0.3", | ||
| "@internxt/lib": "1.3.1", | ||
| "@internxt/sdk": "=1.11.2", | ||
| "@internxt/sdk": "=1.11.11", |
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.
Does this not require any additional changes to function arguments? I say this because of the changes that have been made to some SDK functions
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. We need to merge the SDK update first.
…ected' into feat/logic-to-block-shared-features-based-on-user-tier
…ected' into feat/logic-to-block-shared-features-based-on-user-tier
|



Description
This PR implements the logic to block/open the dialogs when a shared feature is blocked, depending on the user tier.
Related Issues
Related Pull Requests
Checklist
Testing Process
Additional Notes