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

First batch of React error fixes #1270

Merged
merged 9 commits into from
Oct 27, 2023
5 changes: 4 additions & 1 deletion src/components/common/needsShutdown.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,10 @@ export const VmNeedsShutdown = ({ vm }) => {
position="bottom"
hasAutoWidth
bodyContent={body}>
<Label className="resource-state-text" href="javascript:null" color="blue" id={`vm-${vm.name}-needs-shutdown`} icon={<PendingIcon />}>{_("Changes pending")}</Label>
<Label className="resource-state-text" color="blue" id={`vm-${vm.name}-needs-shutdown`}
icon={<PendingIcon />} onClick={() => null}>
Copy link
Contributor

Choose a reason for hiding this comment

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

This added line is not executed by any test. Details

Copy link
Member

Choose a reason for hiding this comment

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

Wondering if dropping onClick is enough?

Copy link
Member Author

Choose a reason for hiding this comment

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

I added it. It needs to have either a href= or an onClick handler to become focusable, and I think that was the original intent for that hack.

{_("Changes pending")}
</Label>
</Popover>
);
};
1 change: 0 additions & 1 deletion test/machineslib.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,6 @@ def setUp(self):
'Warning: Each child in a list should have a unique "key" prop',
"Warning: React does not recognize the .* prop on a DOM element",
"Warning: An update .* was scheduled from inside an update function",
"Warning: A future version of React will block javascript: URLs as a security precaution.",
# FIXME:: https://github.com/cockpit-project/cockpit-machines/issues/1272
"Warning: Failed.*type:.*The prop `format` is marked as required in `VolumeCreateBody`, but its value is `undefined`",
# FIXME: https://github.com/cockpit-project/cockpit-machines/issues/1273
Expand Down