Skip to content
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

upcoming: [M3-7857] - Account Management Copy Updates & Improvements #10270

Merged
merged 5 commits into from
Mar 12, 2024

Conversation

jaalah-akamai
Copy link
Contributor

@jaalah-akamai jaalah-akamai commented Mar 11, 2024

Description πŸ“

This PR addresses some updating messaging and account management fixes / improvements.

Changes πŸ”„

  • Update Proxy Account Closure Tooltip (Proxy User):
    • When attempting to close an account as a proxy user, the tooltip should now read: "Contact customer support to close this account."
  • Clarify Account Closure Instructions (Parent User):
    • Change the tooltip text from "Remove indirect customers before closing the account." to "Remove child accounts before closing the account."
  • Update Account Login Indicator (General):
    • Modify the account indicator text from "You are currently logged in as:" to "Current account:"
  • New PAT Tooltip for Proxy View (Proxy User):
    • For proxy users, introduce a new tooltip for disabled Personal Access Tokens (PAT) creation with the text: "You can't perform this action on child accounts."
  • Fix Billing Contact Info Bug (Parent User):
    • Address the bug preventing parent users from updating billing contact information due to the company field not being omitted from the payload.
  • Limit Proxy Account Login Toast (Proxy User):
    • Ensure the login toast for proxy accounts only appears once per session by utilizing local storage to manage its visibility.

Target release date πŸ—“οΈ

3/18

Preview πŸ“·

Before After
Screenshot 2024-03-11 at 10 39 16 AM Screenshot 2024-03-11 at 10 38 36 AM
Screenshot 2024-03-11 at 10 33 55 AM Now you can update contact information!
Screenshot 2024-03-11 at 11 28 32 AM Screenshot 2024-03-11 at 11 27 56 AM
Screenshot 2024-03-11 at 11 29 46 AM Screenshot 2024-03-11 at 11 29 24 AM

How to test πŸ§ͺ

Prerequisites

(How to setup test environment)

Verification steps

  • Verify changes above...

As an Author I have considered πŸ€”

Check all that apply

  • πŸ‘€ Doing a self review
  • ❔ Our contribution guidelines
  • 🀏 Splitting feature into small PRs
  • βž• Adding a changeset
  • πŸ§ͺ Providing/Improving test coverage
  • πŸ” Removing all sensitive information from the code and PR description
  • 🚩 Using a feature flag to protect the release
  • πŸ‘£ Providing comprehensive reproduction steps
  • πŸ“‘ Providing or updating our documentation
  • πŸ•› Scheduling a pair reviewing session
  • πŸ“± Providing mobile support
  • β™Ώ Providing accessibility support

@jaalah-akamai jaalah-akamai self-assigned this Mar 11, 2024
@jaalah-akamai jaalah-akamai requested a review from a team as a code owner March 11, 2024 15:34
@jaalah-akamai jaalah-akamai requested review from dwiley-akamai, hkhalil-akamai, jdamore-linode and mjac0bs and removed request for a team March 11, 2024 15:34
@jaalah-akamai jaalah-akamai changed the title upcoming: [M3-7857] - Account Management Copy/Updates upcoming: [M3-7857] - Account Management Copy Updates & Improvements Mar 11, 2024
isProxyUser
? 'You can only create tokens for your own company.'
: undefined
<Button
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed this to a Button in order to show the tooltip icon for the disabled state. AddNewLink should probably be deprecated in the future.

Copy link

github-actions bot commented Mar 11, 2024

Coverage Report: βœ…
Base Coverage: 81.39%
Current Coverage: 81.39%

@mjac0bs mjac0bs added the Bug Fixes for regressions or bugs label Mar 11, 2024
Copy link
Contributor

@jdamore-linode jdamore-linode left a comment

Choose a reason for hiding this comment

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

Looks good, thanks @jaalah-akamai! Approved pending update for wording in personal-access-tokens.spec.ts here:

.findByText('You can only create tokens for your own company.')

Edit: And maybe line 295 too

Copy link
Contributor

@dwiley-akamai dwiley-akamai left a comment

Choose a reason for hiding this comment

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

  • Update Proxy Account Tooltip (Proxy User):
    • When attempting to close an account as a proxy user, the tooltip should now read: "Contact customer support to close this account." βœ…
  • Clarify Account Closure Instructions (Proxy User):
    • Change the tooltip text from "Remove indirect customers before closing the account." to "Remove child accounts before closing the account."
    • Testing this with the mocks seemed inconsistent/tricky. When I first turned the MSW on and changed L558 to proxy, I saw this tooltip text, and continued to see it after commenting out L1364. Then I circled back after testing a few other things, and saw the "Contact customer support to close this account." text although there was a child user on the Users & Grants page. Then with L558 set to parent and L1364 commented out, I see this text although childAccountUser isn't getting returned in the response to */account/users'
  • Update Account Login Indicator (General):
    • Modify the account indicator text from "You are currently logged in as:" to "Current account:" βœ…
  • New PAT Tooltip for Proxy View (Proxy User):
    • For proxy users, introduce a new tooltip for disabled Personal Access Tokens (PAT) creation with the text: "You can’t create access tokens for child accounts. Instead, switch to your account and create the token there." βœ…
  • Fix Billing Contact Info Bug (Parent User):
    • Address the bug preventing parent users from updating billing contact information due to the company field not being omitted from the payload. βœ…
  • Limit Proxy Account Login Toast (Proxy User):
    • Ensure the login toast for proxy accounts only appears once per session by utilizing local storage to manage its visibility.
    • If this can be tested with the MSW, are there any precise steps to take?

The User Settings table looks like it needs some attention for Proxy users:
Screenshot 2024-03-11 at 3 51 01β€―PM

@jaalah-akamai
Copy link
Contributor Author

@dwiley-akamai We'll look into updating MSW, since it's not always a perfect reflection of the feature.

Copy link
Contributor

@mjac0bs mjac0bs left a comment

Choose a reason for hiding this comment

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

Confirmed:

βœ… Copy update to PAT button as proxy user
βœ… Copy updates for Close Account buttons depending on user type
βœ… Only saw the toast once and see the local storage value set - I just think we should document what we're doing here
βœ… Can edit a parent account's billing contact info without error
βœ… Copy update to user menu

Approving pending test updates and some minor nitpicks/comments.

@dwiley-akamai - to your point about the proxy user row: Thanks for checking on that, it is one case where the mocks don't reflect the feature. The proxy user will never appear in the general users table. Instead, it lives in its own table above the users table and is visible to child users and unrestricted proxy users. Table column count should be correct in that case, but not when it's currently mocked in the users table since we are not displaying some cols for the proxy user.

@@ -270,7 +272,7 @@ export const UserMenu = React.memo(() => {
>
<Stack data-qa-user-menu minWidth={250} spacing={2}>
{canSwitchBetweenParentOrProxyAccount && (
<Typography>You are currently logged in as:</Typography>
<Typography>Current account:</Typography>
Copy link
Contributor

@mjac0bs mjac0bs Mar 11, 2024

Choose a reason for hiding this comment

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

For posterity: this was an ask by UX, so it's an update to stay true to the mocks. It does feel a bit different from other Cloud Manager helper text in language/tone. (To me, "Current user" seems like a console statement just printed to the screen πŸ˜….) Perhaps we can revisit in the future with feedback from stakeholders (Product, resellers).

Comment on lines +29 to +31
const caseKey = isCloseAccountDisabled ? userType : 'default';

switch (caseKey) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Slightly unfortunate to also have a user_type named "default" when the default case of the switch is for the parent user. Wondering if this will be a cause for confusion in the future.

packages/manager/src/MainContent.tsx Outdated Show resolved Hide resolved
packages/manager/src/features/Account/constants.ts Outdated Show resolved Hide resolved
@jaalah-akamai jaalah-akamai requested a review from a team as a code owner March 12, 2024 14:51
@jaalah-akamai jaalah-akamai requested review from cliu-akamai and removed request for a team March 12, 2024 14:51
Copy link
Contributor

@hkhalil-akamai hkhalil-akamai left a comment

Choose a reason for hiding this comment

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

Verified all copy changes. One change is different from the PR description.

Testing via MSW, to unable to verify bug fixes to Billing Contact Info and Login Toast.

: undefined
<Button
tooltipText={
isProxyUser ? PROXY_USER_RESTRICTED_TOOLTIP_TEXT : undefined
Copy link
Contributor

Choose a reason for hiding this comment

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

This tooltip now reads "You can't perform this action on child accounts." instead of "You can’t create access tokens for child accounts. Instead, switch to your account and create the token there." -- just verifying this is an intentional change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes - let me update PR πŸ‘

@jaalah-akamai jaalah-akamai merged commit 74695aa into linode:develop Mar 12, 2024
17 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Fixes for regressions or bugs Parent / Child Account
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants