manager
manager copied to clipboard
fix: [M3-7977] - Improve visibility of errors in Linode Config dialog
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
scrollErrorIntoViewbecause the scrolling can happen before the general error is updated in form state (viaformik.setStatus), and therefore there is no notice to scroll to in the DOM, sincegeneralErrorbeing 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:
- Add a Config.
- Primary interface should be eth0.
- Set eth0 to VLAN and give it an IP a name and optionally IP address.
- Set eth1 to None.
- Set eth2 to None.
- Click Add Configuration.
- Observe nothing happens.
- 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 see https://github.com/linode/manager/pull/10459 for POC for improved util
@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!
Coverage Report: โ
Base Coverage: 82.29%
Current Coverage: 82.29%