Skip to content

[dashboard] Personal Access Token empty page #14660

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
merged 1 commit into from
Nov 14, 2022

Conversation

laushinka
Copy link
Contributor

@laushinka laushinka commented Nov 14, 2022

Description

Implements empty /personal-access-token page behind personalAccessTokensEnabled feature flag.

Screenshot 2022-11-14 at 16 24 30

Related Issue(s)

Fixes #14614

How to test

  1. Go to the preferences page and you should not be able to see "Personal Access Tokens" tab or access the /personal-access-token page.
  2. Add your userId to ConfigCat non-prod for personalAccessTokensEnabled.
  3. You should be able to see the "Personal Access Tokens" tab and access the page.

Release Notes

NONE

Documentation

Werft options:

  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-integration-tests=all
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-laushinka-implement-empty-personalaccesstoken.1 because the annotations in the pull request description changed
(with .werft/ from main)

@laushinka laushinka force-pushed the laushinka/implement-empty-personalaccesstoken-14614 branch from b2dfba5 to f3185f4 Compare November 14, 2022 14:42
@laushinka laushinka marked this pull request as ready for review November 14, 2022 14:48
@laushinka laushinka requested a review from a team November 14, 2022 14:48
@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label Nov 14, 2022
@laushinka
Copy link
Contributor Author

laushinka commented Nov 14, 2022

/werft run

👍 started the job as gitpod-build-laushinka-implement-empty-personalaccesstoken.5
(with .werft/ from main)

Copy link
Member

@easyCZ easyCZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/hold for Qs

Looking good, thanks for starting with a feature flag and placeholder for the feature!

@@ -29,6 +30,14 @@ export default function getSettingsMenu(params: { userBillingMode?: BillingMode
link: [settingsPathNotifications],
},
...renderBillingMenuEntries(params.userBillingMode),
...(params.showPersonalAccessTokens
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noob question, can we not use the FeatureFlagContext directly in this method to avoid having to pass it in as an argument?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since feature flags is now wrapped a React Context, the FeatureFlagsContext can only be used in a React component, which this file isn't.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What prevents it from being a React file? I'm fine with this change, just trying to understand the reasoning a bit better.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I think when we know we're not returning JSX or HTML, there is no need to have something be a React component. But I actually wondered why the feature flag needed to be a Context 🤔

@laushinka laushinka force-pushed the laushinka/implement-empty-personalaccesstoken-14614 branch from f3185f4 to 95f91eb Compare November 14, 2022 15:14
@roboquat roboquat merged commit ad24506 into main Nov 14, 2022
@roboquat roboquat deleted the laushinka/implement-empty-personalaccesstoken-14614 branch November 14, 2022 15:26
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed Change is completely running in production labels Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: webapp Meta team change is running in production deployed Change is completely running in production release-note-none size/M team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement empty PersonalAccessToken page in the dashboard
3 participants