-
Notifications
You must be signed in to change notification settings - Fork 51
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
feat(machines): update DHCP and discovery forms to use the new API #1116 #4389
feat(machines): update DHCP and discovery forms to use the new API #1116 #4389
Conversation
Demo starting at https://maas-ui-4389.demos.haus |
a698680
to
8adb9ba
Compare
8adb9ba
to
26d43a1
Compare
26d43a1
to
a6224a6
Compare
a6224a6
to
36f3ca3
Compare
@rayito Decided not to implement the absolute positioning for the select dropdown - it can be tricky when there's not enough content on the page parts of the dropdown may get cut off. If you feel strongly about it I'd suggest we look into this in a separate ticket. |
Totally fine
Totally fine, closing it by clicking outside was more important than that. UX+1 |
Searching by machine id doesn't currently work and will be looked at in a separate ticket https://github.com/canonical/app-tribe/issues/1339 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @petermakowski apologies for the "code -1" but I think there are big enough changes needed that this will require another review.
Happy to chat if any of my comments don't make sense.
src/app/base/components/DhcpFormFields/MachineSelect/MachineSelectBox.tsx
Outdated
Show resolved
Hide resolved
src/app/base/components/DhcpFormFields/MachineSelect/MachineSelectBox.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing those changes @petermakowski. I think changing this to a FormikField
is worth doing in this PR (but not the ContextualMenu parts) as a fair bit of this will be made redundant.
src/app/base/components/DebounceSearchBox/DebounceSearchBox.tsx
Outdated
Show resolved
Hide resolved
src/app/base/components/DhcpFormFields/MachineSelect/MachineSelectBox/MachineSelectBox.tsx
Outdated
Show resolved
Hide resolved
<Field label={<span id={labelId}>{label}</span>} {...props}> | ||
<OutsideClickHandler onClick={() => setIsOpen(false)}> | ||
<SelectButton | ||
aria-describedby={labelId} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@huwshimi could you take another look at this please? |
- refactor OutsideClickHandler
- spread SearchBox props - fix debounced typo - simplify machineFactory - add docstring comments
- handle onKeyPress within MachineSelectTable
428c6c4
to
9897825
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can probably remove Loading
from this enum since it isn't used in the file any more
https://github.com/canonical/maas-ui/pull/4389/files#diff-3fc2d13129aa52e7573026eac1c141e58e9f922cf86d851e9e56fd4902f85ba5R19-R23
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy with the code over all but obviously QA can't be done until that error message in the discovery form is dealt with
As it's due to a bug in MAAS (https://bugs.launchpad.net/maas/+bug/1933408) I think it's fine to QA by verifying the right websocket message is being sent. Updated the QA description. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Done
SelectButton
componentQA
MAAS deployment
To run this branch you will need access to one of the following MAAS deployments:
Running the branch
You can run this branch by:
QA steps
MAAS/r/settings/dhcp
ws?csrftoken=
/MAAS/r/machine/[replace-this-with-your-selected-parent-id]
)Fixes
Fixes: https://github.com/canonical/app-tribe/issues/1116
Fixes: https://github.com/canonical/app-tribe/issues/1112
Fixes: https://github.com/canonical/app-tribe/issues/1340
Launchpad issue
Related Launchpad maas issue in the form
lp#number
.Backports
In general, please propose fixes against main rather than release branches (e.g. 2.7), unless the fix is only applicable for that specific release. Please apply backport labels to the PR (e.g. "Backport 2.7") for the appropriate releases to target.
Only bug and security fixes should be backported, new features should only land in main.
Screenshots