manager icon indicating copy to clipboard operation
manager copied to clipboard

fix: [M3-7977] - Improve visibility of errors in Linode Config dialog

Open mjac0bs opened this issue 1 year ago โ€ข 2 comments

Description ๐Ÿ“

There were a couple of problems in the Add/Edit Configuration dialog:

  • Interface select errors were not always being surfaced.
  • ~This was fixed in PR #: General errors were not reliably being focused by scrollErrorIntoView because the scrolling can happen before the general error is updated in form state (via formik.setStatus), and therefore there is no notice to scroll to in the DOM, since generalError being defined is a condition for rendering the notice.~

Changes ๐Ÿ”„

  • ...
  • ...

Target release date ๐Ÿ—“๏ธ

6/10

Preview ๐Ÿ“ท

Before After
๐Ÿ“ท ๐Ÿ“ท

How to test ๐Ÿงช

Reproduction steps

(How to reproduce the issue, if applicable)

  • Test the following in production:

Error: assigning a VLAN to eth0 is not a valid configuration, but does not surface an error Repro:

  1. Add a Config.
  2. Primary interface should be eth0.
  3. Set eth0 to VLAN and give it an IP a name and optionally IP address.
  4. Set eth1 to None.
  5. Set eth2 to None.
  6. Click Add Configuration.
  7. Observe nothing happens.
  8. Open the browser tools and note the failed 400 POST request with the error:
{reason: "Field is not allowed for this interface type", field: "interfaces[0].primary"}

Verification steps

(How to verify changes)

  • Check out this branch and repeat the above steps to trigger errors.
  • Confirm that for each error, it is scrolled into view.
  • Confirm that assigning a VLAN to eth0 does show a surfaced error.

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

mjac0bs avatar May 01 '24 16:05 mjac0bs

@mjac0bs see https://github.com/linode/manager/pull/10459 for POC for improved util

abailly-akamai avatar May 13 '24 20:05 abailly-akamai

@mjac0bs https://github.com/linode/manager/pull/10459 has been merge so this PR is unblocked

please let me know if you need any help moving forward. Sorry it took a while!

abailly-akamai avatar May 21 '24 20:05 abailly-akamai

Coverage Report: โœ…
Base Coverage: 82.29%
Current Coverage: 82.29%

github-actions[bot] avatar May 28 '24 21:05 github-actions[bot]