-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Add const / permissions function for help side panel beta #59221
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
Changes from all commits
59f7a38
f55e52f
286f013
6205e0d
c967cd8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -58,6 +58,10 @@ function canUseTableReportView(betas: OnyxEntry<Beta[]>): boolean { | |
| return !!betas?.includes(CONST.BETAS.TABLE_REPORT_VIEW) || canUseAllBetas(betas); | ||
| } | ||
|
|
||
| function canUseHelpSidePanel(betas: OnyxEntry<Beta[]>): boolean { | ||
| return !!betas?.includes(CONST.BETAS.HELP_SIDE_PANEL) || canUseAllBetas(betas); | ||
| } | ||
|
Comment on lines
+61
to
+63
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So this isn't used anywhere? If so let's remove it.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We have a tracking issue to remove the beta when it's no longer needed anyway, not blocking on this.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ahh, I missed that one 🤦 I should've used this function as the selector of useOnyx. I'll refactor it for Stage 4 |
||
|
|
||
| function canUseTalkToAISales(betas: OnyxEntry<Beta[]>): boolean { | ||
| return !!betas?.includes(CONST.BETAS.NEW_DOT_TALK_TO_AI_SALES) || canUseAllBetas(betas); | ||
| } | ||
|
|
@@ -79,6 +83,7 @@ export default { | |
| canUseNSQS, | ||
| canUseCustomRules, | ||
| canUseTableReportView, | ||
| canUseHelpSidePanel, | ||
| canUseTalkToAISales, | ||
| canUseProhibitedExpenses, | ||
| }; | ||
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 wonder why we don't use
usePermissions()here? Thanks.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 don't know why but
usePermissionswas breaking GH checks here