manager icon indicating copy to clipboard operation
manager copied to clipboard

fix: [M3-7590] โ€“ Improve UX for Linode Resize dialog when linode data is being loaded or there is a form error

Open dwiley-akamai opened this issue 1 year ago โ€ข 2 comments

Description ๐Ÿ“

Improve the UX for the Linode Resize dialog.

Changes ๐Ÿ”„

  • Only display Linode Resize form if linode data has been loaded (if it is still loading, render a <CircleProgress />)
  • Prevent dialog title from being Resize Linode undefined by rendering an empty string when linode.label is undefined as the linode data loads
  • Implement scrollErrorIntoViewV2() to ensure errors are scrolled into view

Target release date ๐Ÿ—“๏ธ

7/8/24

Preview ๐Ÿ“ท

Before After
Error scrolls into view

https://github.com/linode/manager/assets/114682940/9ecc52bf-8773-49a3-ab04-a757d3a7bc87

How to test ๐Ÿงช

Reproduction steps

From the Linodes landing page, open the Resize dialog for a linode. Observe: the dialog title briefly says "Resize Linode undefined" and the body of the dialog shifts once the linode data is loaded.

For the error, either block requests to *resize* or choose a larger linode that you can resize to a smaller plan. Try to submit the form and observe that the form does not scroll to the error at the top.

Verification steps

  • Confirm the "Resize Linode undefined" and dialog body shift issues are no longer happening
  • Confirm we now scroll to errors

As an Author I have considered ๐Ÿค”

  • [X] ๐Ÿ‘€ Doing a self review
  • [X] โ” Our contribution guidelines
  • [X] ๐Ÿค Splitting feature into small PRs
  • [X] โž• Adding a changeset
  • [X] ๐Ÿงช Providing/Improving test coverage
  • [X] ๐Ÿ” Removing all sensitive information from the code and PR description
  • [X] ๐Ÿšฉ Using a feature flag to protect the release
  • [X] ๐Ÿ‘ฃ Providing comprehensive reproduction steps
  • [X] ๐Ÿ“‘ Providing or updating our documentation
  • [X] ๐Ÿ•› Scheduling a pair reviewing session
  • [X] ๐Ÿ“ฑ Providing mobile support
  • [X] โ™ฟ Providing accessibility support

dwiley-akamai avatar Jun 26 '24 18:06 dwiley-akamai

@abailly-akamai Any objections to this approach? I couldn't reproduce some of the items you mentioned in the ticket, but in prod I was seeing "Resize Linode undefined" as the dialog title and the dialog contents shifting abruptly (when opening from the Linodes landing page). Waiting until the linode data has been fetched before rendering the full form addresses those issues.

dwiley-akamai avatar Jun 26 '24 19:06 dwiley-akamai

@dwiley-akamai Yeah I can't reproduce some of those either, so this approach is a good first step, tho the code could use a cleanup too, but not a requirement.

One think i noticed however is the broken scrollErrorIntoView on first form submission. To reproduce you'd have to try to resize to a smaller plan and submit the form. You should use scrollErrorIntoViewV2 to fix this.

abailly-akamai avatar Jun 27 '24 13:06 abailly-akamai